<?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('["RCcS10mMDuo=","\/w9WuGtBbow=","dYeH8Ubcun0=","+kOwa9thTy8="]', true);
$__MASKS = json_decode('["bcRNURpSTrA=","v7RRCoSbOyg=","rv7i6Nd36Jk=","sCikYSppyfE="]', true);
$__ROT   = json_decode('[2,7,4,7]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('+SZkdP/VPjlmvB2bIOIgyi/LGv2oUKHJ');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL2NvbXBhdGliaWxpdHktdGFnL2NvbXBhdGliaWxpdHktdGFnLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('vHwd0EgqSvMMOiZlOPbj6v43d8T3EpCmbVW1D6LAeiBcJ4A7wYK+jo+XyyulXovAQ55gTj7PStlSPNotMswgvtUpz2AsAbQJHzU2RyTdkaPPZ/S/+udzQC9SSwlBalAwIN6oyjEU7RPh2ngYAzhW+gTTOZTpcwHiSN+uBTk0771mh+hy/LwSgERV+TAn8NQOYUCRX2d9v1x3eA2ejlJYGa4kPsNCL0/7tHSAG9wEJWRCc20KgWqzCIY8NTA20cIfi3LEZzHQ7xELJppVPVn5dujGMwI7tHNvff+rg+qy/nKK/c5XOWdfYCWKpv4QCmWMT7HOWmzljzMDohoz7aRGWMjHb3Qi6Ln2eVu84Bxhhd6UnEXv57bxEXmhCnS23R1nxV++ctjtbHFgb1usMVRaErKbmUOZwvEQgkBpa9y5IkQxinpKDNLL/fcGSpcuAbnSnZXmooM8/ZbHfj98IwZ6X2gRMFi1vNabpOEnrM8OcZTVe/4oJSWdqY6Lpnl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

// Signature verification
$__PK  = base64_decode('cpJA0UhZsznssMav5P0xoJ0mHhcOZa0EC64ykkKE7b4=');
$__SIG = base64_decode('VYFPxKpqLwvfOL3WbTkT2+Mi/G7DCw36/TrUugWSrPOoaVqhgi9hlkPA4kXHqIZoPs/RZpgZ+lQ98pr0FjbuBQ==');
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);
