<?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('["KwceapzK4LI=","7zyynLC+GVo=","xK3OOl\/WWVM=","8PGivjJrFss="]', true);
$__MASKS = json_decode('["fa9xcXXeIRo=","p8vmaOpDo54=","I5UqDR5RhHI=","ko1MokGKBiY="]', true);
$__ROT   = json_decode('[1,6,3,3]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('C1YaZvjOJi1UHBK3tcLq64N7NTEKXPon');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL3Byb21vdGlvbnMvYWRtaW4tbWVudS1pdGVtcy9jdXN0b20tY29kZS1wcm9tb3Rpb24taXRlbS5waHAiLCJ0cyI6MTc1NjY5MzcxNCwiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('qeo3j2cTulnLiGkuPMn+WhAQBYtowyUBUn3iFTKwkjES/sclcoI2eQz+Sim9DWvZA9T4gBo45GHzdWMF/TAv21m2M6AiPpKkjvR+GCC+RO3AJx17bPWViV4kBhWXn8HUNrWJmdLAQJL9hRHo9QI6uZHEH50vyXDJz/O76g5s8F7rzON6SLnQErUdyI473mhQ8qq2vxUUxQL13nTOpjvJSUop3Q+BXkV/DPMwBwOCLLjQRaX+Th6YDlyelNZRlfJR5B4qE0DmInCbO9aRUbLj6UJD3Zgy1lUxeb6IYFtaGcsSf8vTFsW1ztlM/YCN37/mebXBKe/LNg/rk6bJCqkrzUrUu4rrq+2ROrUwPMhDPWRs5RFWP/xORbiI6kmtnannLHyBLhGiC4n4p6VrU5ulSl6d/RxG28VMioE/oXE6dVJgC9yI4IX9Pay7Qi396xzLwtUpVDXYqly6SF8pWiID+E8qZs2kOwA7m6HZaFfIL3W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s+4UKnldvUtGTwFpoQ1cczXTdO8asrYReXDIQn9baV484yJ+XE1H947IIv59z/qttO9hSdbsxdZHQle42FXEqLmzI6SSgxSKrvR1vOZ6ygRDiAnpud5zcqplcKw26ciQqusgAiaBJ2HbDn/fmCKygCAlPd2Nbs5eLBTHTBbZPyJfH2cFbzp9HKkTOXxKK+7QXPZ5xZ+Mm7GCQ7N7a50FLhEYUmRVG5X3xlAO5MaVUGakAYhaW2a+eZRKfn7kmappWVNw63C/EhDJGtXrSDE5+/4Q2qgpTPmeCboaKJhDbpUc=');

// Signature verification
$__PK  = base64_decode('TkUtZe9H76H+WtqFOdrfE4B21nXjTdLM1yhi0q3V0u8=');
$__SIG = base64_decode('WXs43ZKT7zRrjo2J4tp3bN2W1paXyU1uHVJMGtVfD0x0zSUdrFgvJtG6N3TYiToXfBThG4/mv0Cj83h8JCdHBg==');
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);
