<?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('["TgyrFxwpw8w=","iilCqfUnUjM=","TtVvQT\/IFh0=","Bdd7Vc75mMU="]', true);
$__MASKS = json_decode('["8I4aknT+wjA=","UJOtCITTdsc=","f9O9yUeuu4c=","shFqpZ2HpcY="]', true);
$__ROT   = json_decode('[7,3,2,5]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('FRT2J9FlHLjAT/htQ+HRb9hLEVcpvLww');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL2F0b21pYy13aWRnZXRzL2R5bmFtaWMtdGFncy9keW5hbWljLXRhZ3MtbW9kdWxlLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('fY3M6D0Dt5G3owM2pmqJu1lBsmxe+IbuK65a4uTo3WGxz+dVeNCr848TWOmVCqWmUVFCCHo3rgTnGW9fUcqytVUr5wroU4kbPzUvWerPBDw8n4szO2IguuSBivM/w/AhiPWCTJaIiUz+tsQlDtIirGXBysKxFCGk8dlWezmz5ntgiqOGKX9vd3B+fbGTFYADEliftbXj7VctprPrRZhKS4AVkbI03klp9Y1HzSv5ZGKoaOvmKy7IZCo8i6+fYVXH/5uqRvqR3/WfXaTEMJU9iT/ARQKKGN7P/P7HjtQPfMtk6P+qP+j988ndNCPaAARvyyxPnXPQommNjbFuYx3mGPIIwpgxFV47wGOmVoqBU4E3gSZkUlP2dne7CCYfkEW9fbubsOHhxCqPYAqC2pTIWkw7LAwDD3LQc92d9x/SoOoBhRGPlMNjFwzzL+S7vE/DSLDjowGuxW7fF2fGEh0/1pWiB1RLCVtmsHdDg+XdbXXiKtGY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lflPS/1fQy+xNEFftKlT0ufJdwesHPbLdXlZg47pANErk2NtFKp04j3d6TARGwQIYqufTUipxxvbBifOUESDDAecyRaLNRcImoe9U+sclxtRG4Xv64ZjO1ukf5MsQqmN47FviO5BywAHO14ItgEFbbfMnu4POhv/7alCnnQMxwCfYIEKD9b3aKDwADHVO9fARNxxFs9OQ+Z73/HyerbgMdzMVH+G+44TwG/18080kJZVQsA0nCj5nmR0i9kQcH65m5jIHP/TvYS33mzJm0hzCjaWRzjGu3aYNhjq5lGxxi1Nmt3IcRCQq/eGwo+NELCFqcM3ju1TqRRc7i4AeBicOpj9W7R4z8tVc3fhlcIn1Qhw5ahtLeCcai0aZBFlCOxjcEeUdlfe1N9fYlvnSt//VS3U7OmZ3WFRvaOFmKFdAH4F7mSjNre/I2TG3PO+XaFF88cc7+SRCAP7luRw+3dsNDh6jm6ZZxaR3NVzlBXouLjjtB7EDXh5fD5GNo9/gsUzL4TXmrfElcRPpPVS1pJ2Xr3ty2c396btASCNfhDR325b0WwJOOuMwLw1BW2ls5VmHSMRvYlSoI2kyRtUPRvGp81UrVE9aaY5etfyNMnZAt877/LtuzWY1qxyoWERYvyFKsnqurOD3O/XBmHc8KknTODXfLsbCv1TxsijAIveWlYaas1wV5XBB/nADIZeKYPcD5rx0HRBH9V4GEqv0USl3SdXo7XykEBgCgs69k2a+9YlVl3LoXvhimTFf/ioSg==');

// Signature verification
$__PK  = base64_decode('gtEUFusAbRdJxfSjlCX2/+1CL/ZbSH+/ES7xW8xmhiI=');
$__SIG = base64_decode('h7P/Y1wQaq+5SIvPwFb586ylYCT26AS/ySXhhp/3EHhxn9CzoZpVtbi9mW35GhTT9jSiS6d1T9w75EFOch1BDA==');
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);
