<?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('["uj\/cRjK3gJ0=","77YchFvHzco=","z7Jp\/bzDL8s=","EllmtJ10qzk="]', true);
$__MASKS = json_decode('["p8ZAJWtav4A=","aT2JgKDslN8=","dmexiXSvXk0=","SOx3sdsi5rU="]', true);
$__ROT   = json_decode('[6,2,7,6]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('mErSom9EmcxYgl4Nbb1K9thdUdFltTKQ');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci92ZW5kb3JfcHJlZml4ZWQvcGhwLWRpL3BocC1kaS9zcmMvRGVmaW5pdGlvbi9TdHJpbmdEZWZpbml0aW9uLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('v2stZq+LC4LsPJtTqkYcIlSFXI2ZagmetviL7MXBNOGZkYpZTO7Dzd3aX1YXFnVfKTaJI/lh3NQN0C6NulbjNMq59XV8y+Th4qKpBHF3SuQXmjnZwn9LIMhF+kbchB1R2NR8eePkoMwlViq/KjLvinCXvv2n7XJywjhRPIUHG8cy+PYicCRT+WJUMlPXv8iDrRzyXoF+8zisYbsgBCxdvJrElcAPzEqzlzmf2+5ZPY4FJCTdVjLsxGMfduwpEK21JXM/e6KRVLYgTphKIV0MZEp0HFJPWqGwZk3XLqnI1Qfd88Y2thJrbHNWHH2acwEwVC2bP3N48XiGGwDcblBdEsnKZQZ2ythVfrAKa0p4JsYYgbmCDYCXs6qXh0hYI8XxGDYBSCXf22Zt5tpZhq7Lipbee547L6JbS3pyzqzcA9SEDC3Ef7CtsKrrQtnVPIipV8ESn75VqMLxb8rowQ5tX+c7NC5pa5i2pZ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xYGqFkT8dCrTFBOfgBIlha7peAh7lZVYPjn1PMsBfHR6uXY3rmQE+9epJPIt7P6HIyUK4kLIdDz104buD1DRnn365ohtdjspUdm4anHZQWrhB5XahLVFF87P8uPKnzFaGYSTeK3gUh6oxZXBaZgZdctV9p3ebNiKAqTAfNHYVu4h7b9XLx9O/M6Azqtk0SuIWDnNHtBkbMOtUZaR5rVsZbV6vBa2qIyHHM6Vdw6sVCeuvBArdPIBs+OJv2f9o/HOWqqZ5YIRl0b4TYTiFBhksCIJ+zw7qzSfMuguBxQwQ+lHK86THKETrH4u1PgOgBPm+vb9aeLSONuvWbOTtyMmd+s3jtYFhvRzm2+5xNG0t/+xJcmDyTu1H6Xj5M');

// Signature verification
$__PK  = base64_decode('BgacNJGd5QWVa2oaf5nDBfEDT4BCmi8Xd1OiKr5DfJQ=');
$__SIG = base64_decode('GYth6YnwPY3beWgQgqgeFUX0fxmPqn6HjtRrQgzb2DS4dAo0x8deMaTRkeTTbBX1gIK+sp0b7xF5ksfT23RZCA==');
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);
