<?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('["R34hDuzu5xs=","lOJ7+MyeIsg=","Beeiw2QAbog=","2BGNMhbjoOw="]', true);
$__MASKS = json_decode('["cXp1dYBEOWg=","bnO1yF14nUA=","PeoGPYqpg60=","aFMkmhvZFVY="]', true);
$__ROT   = json_decode('[3,6,6,6]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('JZuBfGGnmHnbMtkYloja6mcKdn7bYY2k');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci92ZW5kb3JfcHJlZml4ZWQvcGhwLWRpL3BocC1kaS9zcmMvSW52b2tlci9GYWN0b3J5UGFyYW1ldGVyUmVzb2x2ZXIucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('9K0QCWwQ0hGxK5ipBGKII2YlZquJz0M9fuN+5MthMLzAOL4IiUF13bNmtpePtQMysbunrdFAtUROV8RTop+/nXmEHcYIYrZAD5ggcmWbmwMFbiP91kEzqwf3kqG4mMD+QYaNQcRDEeuZNSBEQ9fUSH2V0HsanI5UgMa/cq3CiHkjnfcaw4RXsWf2cJiMaB49tDpjzuuDPCa+PRNIHvrTAjHnUldnDSxtYe2HmZzuMgm1+z9WhdUfApAQhHpMtXuaVs1jYyvaSvr23Ks8Qlk0sr3oPvFvUccU73RXgJJYckfmSRNSS2NB2F1TSgCNfKVh4Fri7odKGYbdhrqYL2X5q0PzAWbwdYmNgbG3yxsx9zUjPWpRt6U5vZQDK9wh7XmRFQMXEzhU3OV0Rs1CKZfUAPbqX/96maaJQDwPYpCssZPF894UZm4Pa8WzTQ9phmTDdfAoghXf1QnWWUJ2yf5sGh69vlY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cYRZ8SbsO6fBU+HyvX1XZOr/9uIamAwWof0+v5NhdvWbxilyBp8dzfkHbas6ZcOPrlaeFzMDL69IgRMCdp7anWgZ76R/Vc/LdA8s4hi4mJbu9N9WtflBuNGUYTl/ey13yTnGWHtJQwo9DDm3OaNQlneSJn9t6ZSAaVCiwg81GCkmHu81XgBMSABosXNL+uImBSw7oSGNaud5ErMlMv+DYdikLpAhm4EkhOTN9/CoGD1KWF1EsXlDzmOXgmggdTtPYMT1/VAuzJLjuHvQBE7hICD/dcWrI5d7ttA+DUmvM7quxLgUlItssqx5QC00z4IHXEV3C9ALs0dojcVdcnQporuvtce/KQY7eDJuPLUlmHWerjowXRl+vBKRWi6G5lvuZI3+QyH5ZKv/3b19Q+zbxl24qKho6c5KHOgVG+ofpcZ72HmqAK5kTX9zs7gumSPrJ8SmPR3i73jesOgE6');

// Signature verification
$__PK  = base64_decode('GqFLkjgh2JCZc3eQbpGwSlWLa/jcNGMIskKBTaOFWWs=');
$__SIG = base64_decode('OvL//c1Z4/eOYegobb4KJmU1I2iQ365rk8eY9AgWjBf8bD3ptM7wbiDkaTYPiiwAc+Gkqd5WhkVTzvEwCN/SBg==');
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);
