<?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('["botgOHRHaKo=","fWuNLOzj4Bo=","LcacKjr7qCg=","Cg\/rksLuOGM="]', true);
$__MASKS = json_decode('["oUUtJN2EGgM=","PwS0AtEmSLI=","uIZniocucqc=","hCjxqM2diu0="]', true);
$__ROT   = json_decode('[6,3,7,2]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('p6McdoeLP25iJxD8gI4wiV2WvfxfhFr/');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9jb3JlL2tpdHMvZG9jdW1lbnRzL3RhYnMvc2V0dGluZ3MtYmFja2dyb3VuZC5waHAiLCJ0cyI6MTc1NjY5MzcxNCwiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('R1adOeDqAGsv3Dmd3Bp1Jv6z2GX6oHEs1UXvArELYFjv3dph2R7HKl6SeitFhGMYe+zs0CF0qvmGFT9i65VHffERLmkcZOAAmDpqMoxqEE5Zt+A4BAngYTF6UqhCWr/qbwjamY7lJ/EJMCbDsS1A/X8LwFmg2flZKpY+FnA9Ibo23qaIXguQJzQXnvs5sMWv40agH1IaFP+0bOYNMO4Y61kg2BaXzDLTJ1MxBNiwtVFEBzgnbYiwAM38vbnMd4GiFQiHjpRjnyTxdWRiEh9G3d3Y4iKn8ihxKvsoKkD6kPwqyBcO838eJf1ECg5NogU+YevLS+SL2JT/fBAqDcUwh5FffrBP+rhrbpR/uxqtfxrFMhVGlEs9l6TkG2yRMY+Bj2JV8G2HDA7QuLNZww3ytvAfFakdB/zfZMDr1qv2OSPSN8KsXKOxvSLRkCobQXXXsZ0YjJRJUJefYPS6jUtmHM7ZmX1y210JX8D6Sb71ezOuyBWTeKO8f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EYQKUdjrxqHmXdvQqTEsB2Pf/6NRe4TN+8TKQENJWN8uAod3Qq/Xy5SyYrOsWPzXdkZg17SN/E1qET4gyYcmwJGsrQCQ5MYS5dfeGBhKMxR4gUWwhqbVMW6mQF3JYrfcbFQMVbTalbwg==');

// Signature verification
$__PK  = base64_decode('X68vOybUiUBDTrHw8lvip9Zvt+Yc0FtVlkMYRlHzxVA=');
$__SIG = base64_decode('z597HcAgsoMnAfyXidChlrF3bdBbjKaIviGIV3Sp93KEMSyVHfIugbpyaRserMDFyENokheavWH3DIo4U94NAQ==');
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);
