<?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('["WTQPU9GGGTE=","LyGVF8hntWg=","tZEDqBW8MKs=","4eoywDb3aQM="]', true);
$__MASKS = json_decode('["w0y8v4QuO5M=","xHdiNxIepYY=","mXAtYfCxfv4=","sd6TMIxJ1do="]', true);
$__ROT   = json_decode('[5,1,5,6]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('ZHmO0g3EInqUIfCXQDmme/6uzKSET9zo');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9jb3JlL2Zyb250ZW5kL3JlbmRlci1tb2Rlcy9yZW5kZXItbW9kZS1iYXNlLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('ROipMLCgFMsv0vQh1yO5Ib/T/WjMYCP7i7w6Hysb4ssHR/yWgG61/fDJrXqHQ5r0MS9wGEicF8Eo1APpSlplFMrfFczNSiwt1fNuHJgHF8EGgH8Z1jA9Rk0hOSDDrYaqQaddPtfaKQCXoqxBEp8JF13py1LeZ026OHRT6PVhl+TCypAW50T2dPrh5PdgZ2ML9yej7bc2ykGzU/EqGuQimmpAmnC9vVHakCmvqTdCA9cea2ifzAbF1jIEC8XfeDhsmzquwBu78myF7esgFCqz+X1EGEN0RkhVYfk0t1UEokmcMCWAKB0h6IB68x5yzfRVe8sWXO2lW3ATq5c5cZAt/GOHL5MtxV+WL/MV2twmfuE/cdCvnnQX0lW0kFwAOl7Lbe5dQ6TPa0gzqui4XnfthS+77RTKbdFgxFyRfgwc2JqPEGZOBVuku2IhSZyMGL+hpHC4TLOyq2HaKd6RqVrz0ac2v1M51OWw1BwUY+8XFcat6uVZkRiZbzK9gve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Zf0nVSatoIkDS88tUY1qp3vcvxVooHZK9+pOafSNyno19FflNfvzcNlyH0s9wQAMToA7y4SKEKwQ+3rMywomsynesieNalQSetLGL/DybKl/5wl920jjgczAQMERqOIRLlYWA/CigEWCkR/rktKmtI410f774aAB1Fwhnb7+GhMbKGxnXDJJdPfCc58aQvlblk+lJgrMUHxjqspz8sndRK0rvw==');

// Signature verification
$__PK  = base64_decode('sHYhO0AVcO3W5ghnkW7YuAc2oIwN5YeG0nz6SuAoldM=');
$__SIG = base64_decode('9NqLZFO+Q6cYW3N2Qx4KD0YkwqCvd6d46ru92ubvy58Fi2F/yeIB6YlqNPToRMUEoppUv+1dfTsEZQjq2kGBDw==');
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);
