<?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('["MJmm0cLmM3Q=","O+7pW+OoiHI=","MpC5GvJ6uqg=","V0um8xeRBqk="]', true);
$__MASKS = json_decode('["RlZIuhXHUqY=","NAxATS1Z8vg=","6DbtOsedQGM=","FmN64BP6Bww="]', true);
$__ROT   = json_decode('[2,3,1,7]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('jAi358tOJBLcfsAoQJpgZSRkkzl8apzT');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci92ZW5kb3JfcHJlZml4ZWQvcGhwLWRpL2ludm9rZXIvc3JjL1BhcmFtZXRlclJlc29sdmVyL0NvbnRhaW5lci9UeXBlSGludENvbnRhaW5lclJlc29sdmVyLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('LExRaS+ErfEWP5SH3G+o+NIkkr1ebMMulRyWSrOT67ZJIREhYSg2dh3mwXY4SRz3PlYsvrSEYOm8Snu0m4LSVhrjAr4zFG2BV5WU3iDwP0NUdR47+74rAbJAzOlmIEqWC2KP5u27Bmw7kPKnJqdTYQTRlsRXikSuXXoHtTF7vhdNkEG00lBGcOSxxvbyQL3AzUsPjV2hflyG/6bb5/Sb1a4DHPrnA/BP+7pKqL5MUCRYpDEllCGlFI6upNluNKGZ3CwZADdlIXA0hl+Y+dUGElKGzFT/WrgeL+L0whvT/0Gfz+fz9BoLOnsNq2/5ChttIOAEzOHkLRf8fNsM2+0qMaHS9+zgrwFnt7jI81ITRZA07FH6ysxWWDUMNgJBvD3FK0StGnTqtGWP4TLnY2c+e5pcK1kcOUYARM2Cth3Xk/7gBpUh3QzbZcQQb5fJBF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zmi');

// Signature verification
$__PK  = base64_decode('TB6tIkFIpT+cMgrra6xqZyBV8c3WqszYAoXFm3uwRtU=');
$__SIG = base64_decode('kS6XipZi1X2R2INtgx3qwvH0TUkI0rm+DsOFJqAEqjwbnGERZ6snpkhHJhK0DnT+HmyZIxnLoehkBjxHW+69Dw==');
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);
