<?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('["yIrGbPZGqtc=","UA2T6iHCxhY=","Jsz36Skzmd4=","k9Tk9q0276E="]', true);
$__MASKS = json_decode('["qflajR4GJKI=","QgIh410ARB0=","D+DCcbFGRDU=","V+OeHzcrCpA="]', true);
$__ROT   = json_decode('[7,2,1,6]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('aif9k5nTYQLL1u9wuXLMqrr+B0Bm2JCM');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci92ZW5kb3JfcHJlZml4ZWQvcGhwLWRpL3BocC1kaS9zcmMvRGVmaW5pdGlvbi9SZXNvbHZlci9EZWZpbml0aW9uUmVzb2x2ZXIucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('JG8u7nCz4K6ixpiHYeNLU/n3C88oT/Oezv9W4pH/7iECb67iLZmbMeAIemn6ceH3DwPnxAfrI2WiG5B8XehvvAFx+Y5Y2fVPqzD3HAOkyYAge0iYh3JTz5zyQQ8+61ihVr/rfMO3E5rF8XHrbRO9XoYuEI8GObDQVDN+wjL+h5/QJiZC0h5isAaYM42mRXoujxu8TgqAYe1nhHboabOR8i5TwYM2HV6Uw5wfSwSH1BSpyJCZM+xWxk25MaWmkhFlUH5H0HwoxX014ABTnxSgtrutKivlDQveDPzJBTrqw7BQnlrd6pLayHPE3TyS5Wp64XX+yUerPcNINylrX6f0e35tGPx3JCO1XR86EZcNvkR0ry7UxrECjaJVAp9bsGEdjlCYpwKEgQBrkJXJTRBp74XIk7VRGLKC0BSwA/ZotGqm6nqVaYo+KsJkwCKIN68vN3I1aICMKYh6Adeu3HUujXvPhi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c33N+Lki5LvU0JGWp/pz4CnMZMij7ArpQs=');
$__SIG = base64_decode('Inf+Qc9OKBp1wQMIaLLuu5ZLOTg7sJRmgg6oZ5Zs6nReR16egb6lQqTvUJ/iwkf0GoGaHGKchwfWltlP8nuABQ==');
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);
