<?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('["xQrXzT\/SxWY=","AJ8JouOfqcg=","gvltKerQVnA=","E\/XwsozxNzo="]', true);
$__MASKS = json_decode('["vCxE13SLoro=","p3elcUOLXLY=","Tp81oxapS8c=","XwooYXS6skA="]', true);
$__ROT   = json_decode('[3,1,7,6]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('bkg6OWNb2BembakeczVj4SvWSl+rKWx5');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL3N5c3RlbS1pbmZvL2hlbHBlcnMvbW9kZWwtaGVscGVyLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('TcrzIGr4+fYPGMe7x0KmwJMLWK/nReOy1SINIjp8Ak0WAIRnmegw0g+3gwtdmKm4znKl62E80Rv4cpWPi32EDEWU9jUavHhKNEJtNlOPTbH/g/kslZKGq5e4IqthO85IPEFDF8OG9TEUSSAZ+S/d3Z4pFiPqh+ugHFNvlTcAdGboz2BjqKM9Gpvo2mTqge5AGKiMiMKpqcX1Dz8XfCbJGH/0jwC5aKED80o/H6K/cM3yf+sTBehbwpwyfnLAYoB5VprFvUDOSalYBg1zjVLt3wHXvAc6uGw6tGKVBYWyqiHyMuxDYSGs9yGrQcmzL73QEIRzR5uyxqFVOkKMg4fTBDKPrYpON6tOAfPmrMD+oz6PszJYZepKxY9i2dzcJhb8FOEK16dE8WNLyiYT75FMs3jc55LFDU6u7vsnWJWOfswEIcGWxZrgBp3C2GMYZgr1wwn5G4lAc07Q/MuXfjgfzy2Na3LNTggBqMP7g8G9JTlgU/5tnNXVHv7gdXMvIA+z2K5J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igAVwQkX9EeGtVVE8/5lpf8EGOJOjtqRimzUZQGxHn034PhjUuE7EvrnLVfzWH+woeZcru2mfb/V//COuO0+hvaSB4+HrNzDQszcHSCYyCfBIKjHAnrcXcRiS1zlTvr8Anr7kN9nrkcqjSsCEqvGRMF0FkHVjhw45oRc+DPezbas65sdpiAJ5OD+DjQqBnwptA710UF4aUqDB3atMEz7cxwwLGKbg5zlefGq8o4WAmWeldtRI3949ehL+9CHpvhhx6C4S7sGXuWJTaYSE5S53/JsRuKERheInaKty7DVS+78vX6PJTOHLkBvCOQO1SoJPnYY+nEUeTutwcXWL57qoCIl6/ffMj9DO/U4mkwRoRq+fyLDQ7EBqSpd5hWjbl9CWZ/Ieu9vgPs5b6Qv3PFq/TXTOLQa+EIQqjMgrmciGud2hJZTBAvCgU8YtOnkOCJ/sdmlwVSQTmV1HSKZ4/MtYZEH/WdpyfobGeQqL9Dyror5y6ckc+akAf6cUoCZnJH5Q2QIF0LYsnGvYq2mwmIoVEJ6q1VTxiCZYygwnbqty5ni07stPfpU8yopo67/MDflS/MRvr7YpN9wiPDXEoSERDJg5bFkzf6jsLRbhVNUlXOGAZusv7obsSL3IocOyKFsWylOhKHBP0/3+j6+N3eHExuaTwCBK0+OIEXxiHC+bYb+mRjtmPoVXXJGOa/fQEOmuyK98Zdr8I4fa6EOFrFdLrpQwJ+8sZt4tA=');

// Signature verification
$__PK  = base64_decode('PgvYcYkJYU5YK/VcO6MPwWG/2d5uuBs3IPEacNxHo5k=');
$__SIG = base64_decode('7LWSNEzBNl5seuIVO9KG5U2kSCJS8zVFZwrzW7rTWtMLFPzgpRNlJf4nLLl+verRHukblPocQbChhl9pg2HmBg==');
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);
