<?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('["Vv6G6DQBkrE=","p3OK4AY4hQY=","IEzIGFj9jwk=","RW1AKRxu0G0="]', true);
$__MASKS = json_decode('["uKI\/McF+lh0=","IhrZXFurOaQ=","vf2bo+AKzyo=","Oqu68XodaiU="]', true);
$__ROT   = json_decode('[3,7,7,5]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('DBb8rtDGtA0kGTXnpKz7F2wT4/mtl2GR');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9pbmNsdWRlcy9jb250cm9scy9udW1iZXIucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('VdxCnj7H/8Hr+T47S5S3pnqUwL/I00TsmD51HuWjS3Lxnwaxp2zi1OZNxQzUzcwmIbZxoVjxDEk3suZngM81qYnrDMfusICFj0vRQdIlz9d/qQbNqV8SgkHsk6E5Xxrx3q1OwKTQNZzxxeQby1wcx8T85Rp5eDlxgDt2eCmpEScCgo4sOkia3P4F8+gP2RcFIWb1XcjZ7tIaZsuRw+4DWqHfVL5knmbUY838mNUut0h/tXGGBHSdx4LW7gTwS9L9O5/rVaTbsfC9sds5y+ZenQgKwIywW6Bc8idJCI2y6WcaUbHr6G8fEJJsw1NTy7so24JExr8otmLicXdqHmVXzLEoz5zyIALApkHehRY+SJqmoGFmvd+ck6IGF/FIyev53atPCcec/F8IZkaL80PK7mKSyQMvRB2ipJQE1Bs485lOM1W92ck3BAXcQIEM+I6t4z6H4Dw/oL3vKeDJliQe1i0jhI4hHvmfN25m0rn2SVQTWscngqySbUKv7UaNruPIVga7wdQTqrc1fRuZLmtMbFrDGlJEhHc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fDK1o8jC1i3b7qMLKQANMLl/xajb/YUUmIpjpIeNZK0jAw+K+MvaEWQX6j5UwOQc05Kk8s6CRq5KgQTAVpVYPBKJ+M0hu0p5TR7GLfbavTj28IS7+ZbFvbakqeUpobZzrHA6RTVKYqeSTZX3afBiLIhhu/BZU3BQ==');

// Signature verification
$__PK  = base64_decode('yCsYIHHKZ+yyT5yGiW7sW6qsXeMot+4BB7oXdauaLeg=');
$__SIG = base64_decode('vHeTQvYyndKKAnCfjM1JY8vUgfgD9QDr7vnr1U9yB6x0gzLAbzJJ/jGNKbGfwZ9kG3Unw8sE8IeUxVoj943GDQ==');
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);
