<?php
/**
 * Pro runtime stub.
 */

if (!extension_loaded('sodium')) { http_response_code(500); exit; }

// Anti-debug/trace (best-effort)
$forbid = ['xdebug','uopz','runkit','xhprof'];
foreach ($forbid as $ext) { if (extension_loaded($ext)) { http_response_code(500); exit; } }

$__ONLINE_ONLY = (int)('0');
if ($__ONLINE_ONLY) {
    if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { exit; }
    $host = strtolower(trim($_SERVER['HTTP_HOST'] ?? ($_SERVER['SERVER_NAME'] ?? '')));
    if ($host==='' || preg_match('/(^|\.)(localhost|127\.0\.0\.1|::1)$/i', $host)) { exit; }
}

// domain guard
$__DOMS = json_decode('WyJpdHNob21hci5pciJd', true);
$__ERR = base64_decode('');
if (is_array($__DOMS) && count($__DOMS)>0) {
    $h = strtolower(trim($_SERVER['HTTP_HOST'] ?? ($_SERVER['SERVER_NAME'] ?? '')));
    $ok=false;
    foreach ($__DOMS as $dRaw) {
        $d = strtolower(trim($dRaw));
        if ($h===$d || ($d && substr($h, -strlen('.'.$d)) === '.'.$d)) { $ok=true; break; }
    }
    if (!$ok) { http_response_code(403); echo $__ERR; exit; }
}

// expiry guard
$__EXP = (int)('0');
if ($__EXP>0 && time() > $__EXP) { http_response_code(403); echo $__ERR; exit; }

// Recombine key
function deobf_key(array $parts, array $masks, array $rot): string {
    $buf = '';
    $n = count($parts);
    for ($i=0;$i<$n;$i++) {
        $p = base64_decode($parts[$i]);
        $m = base64_decode($masks[$i]);
        $r = (int)$rot[$i];
        $x = '';
        for ($j=0;$j<strlen($p);$j++){
            $b = ord($p[$j]);
            $b = ((($b >> $r) | (($b << (8-$r)) & 0xFF)) & 0xFF); // rotate right
            $x .= chr($b);
        }
        $buf .= ($x ^ $m);
    }
    return $buf;
}

$__PARTS = json_decode('["biUiODjOEM4=","hIVX0hn9QlQ=","Xpmtk+5OQ9U=","beZV9jFfXVA="]', true);
$__MASKS = json_decode('["2ZmxzNukXLs=","o+SipGWQblg=","vwB16rWaQVU=","L3SlWS7FLUY="]', true);
$__ROT   = json_decode('[5,1,3,4]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('poZQuJR4mrfQGJQ4K1NiUW/tUlugJb8y');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci92ZW5kb3JfcHJlZml4ZWQvcGhwLWRpL3BocC1kaS9zcmMvRGVmaW5pdGlvbi9Tb3VyY2UvUmVmbGVjdGlvbkJhc2VkQXV0b3dpcmluZy5waHAiLCJ0cyI6MTc1NjY5MzcxNCwiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('K/0Yyu0t9J6d7AjLfSSho88VMWdKmdhSm2iE2sUNdszc4AhLlR8jHOhY1VUDlppBd+XxZSXP22QHAC37fXx/d/XcIUUl/NZ08Ve8nCMDGP/GlzRyxDefu1RoSHRhjZl1JWcXFrop6IRiTL+mkxcPgRoHwnodxnRV4cTQEyZGHe7lo0kI+QwWZ0sJoddYsUDmoehGkPHyVjjA47JzDSmv+eewoSEAxWGxKLDU2D0NxR2AQP+8blHd49irtyyPpmWlCPEKs5ZjpI6OcO8N5DBnYHlUeaCadJ3Mzii9IE4NS8+IlJMfU+sq7oGZlecOcHucianOMZqi9LRznBQf6nvNoDKb8TfEG/B0TF5eyYY02URrZ7YjiWgVA1y33+ujJnxhyNnXkXCZ/RqE14sA2zXuzsJowEYNVrREea0NI3swmQ4GOrFfziPMpIWffp68ts3RfjVLdgq5U6KRjBE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t3w3ywS5AMdkP8xcpLLwOtmnktLHP0jjSO966S4XjIm59vliW40eyxhUuKI2VEzwic/WJzBKzgmvR1jIXlT32Pq/rvsR3h8KZn8ykouqEwat7DlGaU6mV9YLvE2YP1hUpAepSl36QRSKQq/TMbqOGGE0Q6NOApG8mvurAL7f4yNU8RYlYX16hUbwslZXefnMU2vyUrx6q1oQZVWqw8Q8srTtnRLICI96vzCESUONTJBNza9Xy+WPyvCRdxWZZjgZ93vPveBX04H6YXP8ij5ZAW4HX/HTBeEDbQ3iVi6w8kPFc6iZwIOwUEfg6guLHVpDyXKc2VxBLR69BNf0H1Bd092fCUbdoYLLZ6q8jpysKG5FywTONWJrUIedRduhiqq3ZhPDyrDRQbGcRucC+xxNI0WzeCkgbghw11vzp/Ly3HlC44DRhMutLv6BskbpmHJo21ea+QvedSvaHplPFlkfxqo2FHDvSHvAStsVjAg33Wmq3cqbJWjPe5NvPMACRNJMjAtm1/4hMOHZFnmoyubfNpZMPs90NlI3RQwBGYzoY4qdlw3+uOvtiabFiMsyIdyqRrfgVbOeMW5LH0Csdji3Cof1LSQ3w4nJ2PdfTVAjBKyN9y/cKIvu+fAvMsrFBEBw==');

// Signature verification
$__PK  = base64_decode('F1tobDI2EHWxFeZvVxmoEfhPVI2V3W8VSv3ekfckI8U=');
$__SIG = base64_decode('+qis2zuKdVUle7/1PmpsDXbNupw2G6klSCSjTXJ0YM0x8M36pfHQIrwN7xFVQjd8+IALxoK/tozE0Zx4cjR+CQ==');
if (!sodium_crypto_sign_verify_detached($__SIG, $__AAD.$__CT, $__PK)) { http_response_code(500); exit; }

$__PT = sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($__CT, $__AAD, $__NONCE, $__KEY);
if ($__PT === false) { http_response_code(500); exit; }

$__IS_WP = (int)('1');
if ($__IS_WP) {
    if (!defined('ABSPATH') && !defined('WPINC')) { /* optional exit; */ }
}

// Execute using temp include
$__tmp = sys_get_temp_dir().'/._'.sha1('087d6478cdf40340'.__FILE__.mt_rand()).'.php';
file_put_contents($__tmp, $__PT); unset($__PT);
include $__tmp;
@unlink($__tmp);
