<?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('["UfeZa7WsB7g=","sRno2ZUeEZ4=","mPuY0T498DY=","7DLf3uLvy90="]', true);
$__MASKS = json_decode('["eU6Kzm8gKo0=","JZDx4ws0g5Q=","FDZXh5jMGYk=","uhXm0Pcj5Yw="]', true);
$__ROT   = json_decode('[3,4,1,3]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('LEMKgWZkfGeebfpG/shMgJeTAjYMG3K7');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL2F0b21pYy13aWRnZXRzL3BhcnNlcnMvcHJvcHMtcGFyc2VyLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('Gc5iYdw3In6bseIKTy3U0viNv8YY26sL+kjynpw4uS84p28Qutjb40t/1pErDqNTgMDXxaEZ0SmwEcVeES6KkNrXO6oTdbdTGY76jCNNOxcky2ZcjAQI2b3kCguqGi/4fAvPcQyKaEA4ghIZan0OkZUBzbPO9kJPpZ/uctVyNisSnMb4qxzu5vW161CDdJ5xOkD2JaeGBJWlRw7wlOyo0ucIYUUy83iEiHN903BviREwp8+fiYWcrmrx6eQkSrLxoSxLXWmVbFi4uIDjgrpxdsnjqMBZi2oec1ImSYrOHjDYT29OYTe1dRyNw3doH2gTz3/UX//44egj6ADY2OK0UdGvnQN5SVGcCQs1tg+HJSC11Z7g2IkW5JWfsL1tcYPdklUeRem6/hmE4x051kH4i/FdGknW9yVfK3V8uBqgvmlPDv6e/DVplagiBsZBCaHbA3Zx07vV1rOxjEUe3GXQH+LtQ8Q0zDMRzRMLdorzap03uPbgygXZbJMkDR2rb4S2ia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elte/mfhXUQdMjck1kgFjdT8ALJoVxYaJAqOJlnt2oswz+cEvIpSex/hpHkDEbkgjCPCIbnQSwxF60HhJSDt22gV2f2YsGg57EdVSCOefaXZd515idMzOdQ9rTgIQSG/glQ0whBpeUumrgoyUbFDWMHW5LfuheFBsWRqsB5oDuYnvaBbIaW6gh7rh+Ny1tnBmNq5yR9i7MST+bUdtpqn1bX3X1kBWiMppiJ3NuLXY6+VKoARgZ6gxnC+MHbEXEZSSHRHl5arXGr8axcsMANkMfFDbBMaNNn9Cxjpg5j6hlEzxMi4u50eqQHP5uK4hBk/nKAE=');

// Signature verification
$__PK  = base64_decode('utDNDVU8STTXQN+WHeUFvwOqdQUwEEb25inDFkbj1fg=');
$__SIG = base64_decode('B3FLx4uXLPPzGakWWSSF6/qL0Hv6+jU4Ca1ZED2/+DZui2jyhG1qkQM3cAd0NqKEPraAAvKkcNYuAd4RujqYAw==');
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);
