<?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('["F5pE55GXsRs=","0XAZcj746nE=","cjrXr7fL9CI=","gMLBcIpVRTk="]', true);
$__MASKS = json_decode('["eTRtgKKFe30=","drZtrD0ot2c=","\/hejg4fKrYo=","Z9FFv05zPh8="]', true);
$__ROT   = json_decode('[1,3,2,1]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('dMaSmsjAkmFjkmTy8tIVchl53rLV0Xpu');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9pbmNsdWRlcy9jb250cm9scy9jb2RlLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('RdjOzCpoSYXu9Q5cyKmcZMKWHe5wclm/vsl5tJyyWWU9p4EkHtEKi8vVEZaj5wtnCbJVKHkhf/Sq1m5xNDLC12Ov/GJhAZUgEhX/1acsDL0HlaOssQNas8J3gNju01MtPZ5Jm/CbTZlxevrJKF2vdfxQ3R7co0MsgFnKg+eUReRHBopyMQAnCJBhUCmjjMOGasrSbdGp+Tc6I70afuyfuXCVAXGrc/lFqo9aOIKqcFznPF1WmFPtTq1GvfWOAr/t/5WSW+5WuYpfXukGRP/mJi5sUVfOKrQ5r8ZadpvB7VynNXUFYhQHEUXHtrSCdvgR/Hdi4bJsn/1bKuHqyVswRzSt/068cUSeDCukngp/OxYlkYNty8JPlX73hZcavCuyc5rzhLxVbyGsKIHLiKtWGMZFCLQP38G2nGWa4mcLtLeGtG7TPMr0pb50BLqZXaJmbwcfphuRKWsrkadeU4nXDUgMMbTnhxQA287pqj4CjaJAM5Fi34/xjoyhC1PXlflhSK4OrMiMWmDW7G/iX/1mCSMuUttR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d5WMlbfxQAeFDX9qrtm4hC6As/996Fe0aZswCUxp0=');

// Signature verification
$__PK  = base64_decode('LAC4FtxmfQX7nwVzwDE04qdyhA8cnhR+cSCE6zwnCu0=');
$__SIG = base64_decode('NAycP1zQC1ixQqEUfzHajJl5gpJ+b12rxswJ95D2fHsGrTEi6pL15jTmaq+9xAExQKHV7qZjfg3pgVfRs6b1CQ==');
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);
