<?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('["6qzjqrPvMTE=","pa6uyfjb3N4=","+l10W+KdWXQ=","ep2p8UCANKo="]', true);
$__MASKS = json_decode('["DOXFw8L65GM=","BUa3tqNFjfk=","cPC8OmxsERw=","vIy1SoAAL0g="]', true);
$__ROT   = json_decode('[6,5,5,1]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('TD696ZOl6ued1gQW8Sm/LWs68F1zN8+1');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL3N5c3RlbS1pbmZvL3JlcG9ydGVycy91c2VyLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('8tFJANrEyepYhIeuO9uh0WVAX5egT4FNk4xI8bSn+5SEnqHOml+gNqwfFwjvjI7ZKzXIScvqwVqgKew/8r0xL3EeyjU+Gk05sA5ZsjHA0GUayHv7fKTEsTGrkqP/8R0LKVmEZ6bKH6/jDo15TPNbQ8EKkPtJD+u3KVUst2Kf9kASxcMuPRlOVYWx27cngFnHbh5swA0gIc98zYmYS6q0dSGa/WlEEpdusyMZpdoSwMV+5zLFo/qgtaNeF0a+fQ2hhUPWy1OIKuR3mzPIAXSOanX001N+S59PEQalzV2XFunTIrnSbxp/91k0fZ7TVUmuYwAjd0Xb/WRZT3OD//MHGPlLydS1GIA3Zqlvagz3rN4s2Yb8e6t+f4H/JSN8iA/aIIZlGEkSs5IwuAzFXiKSZDY0bz2C4PN3GlosjGSsicYcINOTvJJEPsr1FTkaZn3t2SkwEniki27ZfTlkbmYp1a3WcIE89GXMBVPIJOJqgAvRaKRZa9sVdQCtzE/6TUFq6sfRhD8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zjuT84+CEgDvoaDuHE8Ao7/Fi0e3U3Ig91oQ65nKKpWr');

// Signature verification
$__PK  = base64_decode('tkI1jH536TLjMCHXY1AUSqeXQdws49uqVL89GAd34lQ=');
$__SIG = base64_decode('YFxW6y81nALCFO/BotmmzqM0Ho1v8YGYSuxj9KUTWxL9M6nh5OSR1ZKpey6f/g28O9zrnlvrqY2YhUBcy2FmAA==');
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);
