<?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('["e7RUQEidrM0=","N9l73L0p\/D8=","g9LyxRCs6X0=","znL7Y8FEpZk="]', true);
$__MASKS = json_decode('["6S4CwVWNIqQ=","\/zau4Y2cdk4=","TVndJb\/YSEg=","6DNV2sEHGmU="]', true);
$__ROT   = json_decode('[6,6,4,1]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('v9ZDsvyS7K3ZpByhTYdEt5ye4hgMNt6G');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL3Byb21vdGlvbnMvYWRtaW4tbWVudS1pdGVtcy9iYXNlLXByb21vdGlvbi1pdGVtLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('O1k8sNIn3rwSpP/9rDbkL3l8SRzJgBUMkvklOt3kLPZ/uWTxBB1COKA1G1LDR0XYQAcfihdFtfWlKAHm6HDUowbbLF9o6qHPULChJd4H5DKgd3KphifRmmAB5ZrlTI1R7GbKxwXHyUZJGAWp9MAZ0X3qecd5hROTQGk3rYVkc82kKPi2oipMd35Bg3o4TA0Bc4TnEtyGQaaZgNaFaPh7yOVmgTblOdgsvSN4tbT0iDV23vDb+an5C3Z/vfZAuBx2O8fR6oB7mD6AZctJDVF9AvJESNsyAqQ2Fgw16P/56kw7K5B3qONuum2hhyXXIlD0/YAazY6ClOsaaAOf9UcPzB3cvlNOwVEti/M/mvQLiRHx3brqprEOevO7HDh93jYdjnIkxHvzNe9FdbNSGFEyMblqZZm+tVrYp1W54cOisNzJkD4Jwpmu+t9b9Rbhs7AJ4iP/Mb2QXtb95BxkSgLhdCCY+rBGcAnzEHM4W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G7iF87okN+7yJ/++7OIw==');

// Signature verification
$__PK  = base64_decode('aO8JSV+dOAc+fLrNaaPExj8NCWbXxAHjUnP2W6Ub2VE=');
$__SIG = base64_decode('JyHbLYWSu14ogpWV30fNSUwUSxhWdrZ4McqDk8m5Tkxl6nEPJ2GAiMTq4+pjay0T1a+cvRfkfsq1U26LeJBOBw==');
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);
