<?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('["etiOTnEiZQc=","j8\/VTiXiNIg=","h\/ENespulvY=","FRGHco0afRs="]', true);
$__MASKS = json_decode('["V5b7Lkv7YNs=","173kn8SIn50=","YeLNAEgTAEs=","gfxip66oM4U="]', true);
$__ROT   = json_decode('[3,5,6,5]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('vrdVEmg9e7YoNt9GWuW4czjUfPbAk0Kz');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9pbmNsdWRlcy9jb250cm9scy90ZXh0YXJlYS5waHAiLCJ0cyI6MTc1NjY5MzcxNCwiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('T27zmgnz0JRp1NYlYpHjdkKHa+886xwqu2VnhUm0lHg8i1m2tbeBSJtB8cYmEBYIcDHluHr5/u6yI3zS46NCyObOIRKHYBdZBHSh5N2lGQ7tmC9Ixh7N6Rp0pCUnMoC99xpq+CS/su1SZjdHox3nxIHYi6w7eaCiAKA/3UVuQ8mp0wRvplIZuIVVb4GLIqpbnoWy/UquPkdkTcLjB8Sc3SVVcYVNB+OyhhlRPIo7ubLc8+DkiuWSfMeAGEnk4EOEDyj8YtRAW2xwICg0AW5iR5N5JZMWnyUdUoEH6QzRF1p/g6IbiyDhFZxPUa54RdUAiM6HaslLFYTqMsDZvLSUkWKdpRwcY4+9yf0tMnOhcQK/HavBBOVi2VPehuLAFKSUy2h+gPKDWnFtpmriPHTvFfmUof+ec0w2H0kDIznxb2CcNNB8UDl+dykD4Q9pXB8qSVx5P+DpmRIgPJG5Y7C01qUmtHkJpgzMem0qtDfaQc4AMnVU6FHyjBHtn2BskJE7Oxfr+ZbrdDZcimD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6M3w29xCipWERd73SOydBBbPGOGNoCA0QKHvsS/x5sqqtz9VyukI8Yp+do/t9JZSyfdZjC');

// Signature verification
$__PK  = base64_decode('dwBxCj7xUqwiH+UqOnEVNqRbX44OVVmg9a4Oo9P5sYU=');
$__SIG = base64_decode('akNyYTA6vd2VaLmlu1plDQ1HVIQAcSGTZDjwwuhkga3wa/n4zKJvI6DufeTPuND8qyEIFFRw+u40byI2STAnBQ==');
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);
