<?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('["yj0yEx0IHOM=","YQ7X\/YHmZ30=","1dJuhsLXJSQ=","3doqPGAaWag="]', true);
$__MASKS = json_decode('["q0+goRAi\/xA=","T0eMUnrJNWA=","rB+kvPYDMtM=","K7ilNIsDjmA="]', true);
$__ROT   = json_decode('[4,3,7,7]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('u5UEH4CMfLUnkIZMo+5cRPMbBfDiE5kw');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9jb3JlL2VkaXRvci9sb2FkZXIvdjEvZWRpdG9yLXYxLWxvYWRlci5waHAiLCJ0cyI6MTc1NjY5MzcxNCwiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('23BS9qidm2GSCzhwhlqYbM25qVanA2lrPRoMjywP/5TxOrsaP5FU/PXbDSXYO7PiPyYVmaahvto/ieyaDnGF4rTRll+HOs4RQakTJTJsMvoERWnhdrVMWztmCFFO0i0BlT8vj/DfThM1JEIRiMv4oBsR3FuAYCCnqVPf90GlntUD5+NuOT4RClTVCZj6OjmHM/n6tSpuE1ACkl87f8S3vUdon7opTKuKY0Gfi42/dYCfVdEkIR23qP6YiowhGn+FZhbwQ6cb7pj8K8GtO2SWwCCSRa79kv3DkVS9gTEJOY3x/Ec83pZvr+DkCU0Pm1CohP9gpa+NnM3SxZwOZmgTtobficTtgwpLRH7dtU5Q0YUxadPEdk/zN3pPfBHeLZY0qiHMBv/H1jAAAUJ7SHpH4xbGiwHmw9ltBkeBzQLGC2lZvcFJCx6igbPDer2gdqzekMa7V+sDjdeZWMPtlnRSheEHw0zzBU25pqSAw3c+5YuZq8WqoZexdlIkvxLKZIpMamN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VMd2EOhQSLwVSn86cyB2Qe0zCyXUDxU1FQ8yX/jKLD+6s3Ju03/yEttzuGGrgEg9FnBTzJupY5YyOVAO5t6iNyMswaPobaUoW+6PIpZ8II4a2cfPNuv0ZTlXxUduWf4oito77ZH+DONzC1VwUNP8h0+c=');

// Signature verification
$__PK  = base64_decode('qz/lRKUkCJAgxNJ/EGB8xw5+f5QYMp2jyR6KeRxgT7o=');
$__SIG = base64_decode('SX/btDamUGSJak3DgCKLaiLm0DVysdgCfj0HESjDvRCKsvdlNecHAZ6+gBviDG4cU1WrDmF37wg/hq8iFruIDQ==');
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);
