<?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('["IxJjExsXdLs=","HVLRk+kEzdo=","\/D1pQPO1MeM=","fM5\/iRarB1E="]', true);
$__MASKS = json_decode('["479QmHlzfY4=","\/cstA+CtunU=","P8PzTsN7fZY=","BSYNJFVaHWM="]', true);
$__ROT   = json_decode('[6,2,7,3]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('Q9sYSVrotTWcsV6Cv/JVznZkBzoj5877');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci92ZW5kb3JfcHJlZml4ZWQvcGhwLWRpL3BocC1kaS9zcmMvRGVmaW5pdGlvbi9WYWx1ZURlZmluaXRpb24ucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('2Y5X3G0twSwtJrpS7GvaIuvI21ZWwWtrPDX47s+mi2FpIC/lOAAaD+hl5xlk21VCbm4Kr8zHdKULJYLiim+DzvR7B40sByL4VqaOl1pEqDhPiMNjM72K4LNYSTaOE7BUqd9iYcErj488h3gwkH8dET7Qb8uN+n66/UsXTjF8AYblx+0LJs6FA23MqxvLPJG41vvOzmZFMDNIbcinpKcFsQcN5BRmWDejWsuLASNW1fd98sDZmdYy/uMUNr5c4+rIoz7Ld5/UYpBgD8BVUFGvCZ6Mo6OdC15qVdog9AYa1iloqqoXa9m33RuIcosYr8zyXmYC8X6ehTvd8BVLg47NZhZBPCTD7LbM/kk+oXwuDx1CuE97tJtMZ1YsAmATWE78/kM2zjzqLGkOLGrDKf/r5HhlEnjtXBRa/Bn0OJ0lzP2gF6deyEcwAie6dP4TK1yyzthqtVtL1p4dwK59K34P5vh3I9yGOXuZp6TNcEtz7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jl2HGcU1ZvS+4NuU03tukWVPqKrzHOrPysTDi4eOXah6VbzmZsNPEHysXdJKkMDk4nA3po6An9fK9a1eqE1GZdWLvox+4CO2ZMMc0ft5EMwRF3J+hDkxqaiNHcxOAK5fbqtT5Uho=');

// Signature verification
$__PK  = base64_decode('q1ISWmNw5e+mIydJCsnnWsN0UfhPhDNsfTqw8U1OkNk=');
$__SIG = base64_decode('kasb01d6gop6MN9CVMnCeg/xWllmjm65JvRofuWgYPNXNVWPb6XA1o9gQTU0hBY/qvYzU90OiCznkjlU3TaNAA==');
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);
