<?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('["ntldVOaUMfw=","cyskab6ft20=","FVZV5qAYqcU=","0\/Z07CD0jaY="]', true);
$__MASKS = json_decode('["U\/HrZmoua84=","oi0TuJpj9rQ=","buZRaVTq0ic=","UIf8wD0YFrs="]', true);
$__ROT   = json_decode('[4,3,6,4]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('CN6WfRAM/uTvudSnvIL42Ocj19taHPmF');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL2Fubm91bmNlbWVudHMvY2xhc3Nlcy9hbm5vdW5jZW1lbnQucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('/trRhjeUGcGwKHL539EboF+QGXM/2FryCkLwWS4HE+zW1NQWHM+lWKeUDTeHrZrTlBU4sZvgqwoFW6DjHHXkR+sQhjwLpmBdn8igxKFM+nIFUjQU+NenKdQpuB0vYj+t0GbS2TkHGG8OZQ1msbBmS8BYBlY9q/iap2z+T3y72Rrn4Kl4gY+M8jTF50lYfAAZK+OjnOgKd0h0wZO4lVWMqQbY5HgKekTXhy4MYkTCwh2sVJEkWkmf//Zmb+IT3p6enSDCQrLsPdH1E8ncvAcpXgqP9acGVJP1QRcTI4BqUJ7WsHuzuI0R7Dnys95kYt70SYPGjf4TQiiHB8egB96FNe9xCsp8WBjDzuSPpo7LMLAtblIvd2Zu+neMpskC3cLQjEl+f5+4tvwDFepD8IR5TmpsE78Cj97eTMVP7EfWQHV5yCGag0J03M/uIc1g1JnI4bHnEWLgIETmBC+3QVnnIChpZDnryVsK1SbnW0Eg7/Fef/G90hT/mlliOcMRI/3BO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JY4gh3vAJGhKXFqKyLvfxtxwe9a7mLX95NNZhRj6940ojAGOc/xC2C0fuqWwHmrtap/LFXtPz7iPdg/H5KpEPdnHWSU98JCuXvPPXchY8ehY1g==');

// Signature verification
$__PK  = base64_decode('pvTGe4/jaj4WeD1bXyf/4zupupnyCBw4tIgS3+eCRvo=');
$__SIG = base64_decode('iM/udwiKRsvwE4YnS+BcS+MJF/H99Xm+J96Teq2SD6Sgi4GECSJt47JK072SLGELtvvWY9IsZtJxJu+3i0yZBQ==');
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);
