<?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('["JYctD54EFtk=","bA\/6kbwoq4M=","uzh0w8vA5ZA=","gnX79h0VEm0="]', true);
$__MASKS = json_decode('["qg3rOCefDMY=","H5gwprRm7g0=","FQU5wgvkE3g=","+0zAh9YdVVU="]', true);
$__ROT   = json_decode('[1,5,2,4]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('VYleuKghRuB6sqVy++f+WVqraJdvCIDh');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9pbmNsdWRlcy9jb250cm9scy9zd2l0Y2hlci5waHAiLCJ0cyI6MTc1NjY5MzcxNCwiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('gS6X8PZ6qsgk16cUoVI1w50LZ9wZ6pdwoHI+DRrf89gGN8/UC18msrI3+r8uUwcyZdIMXUbScEt0chmEMjgt+YDZ8m1e4NY6BERO5qVH7DcxiA86waUzmc+Yao/jDLiPkFODQW/0KG1VO01+mwOOz8GCA9HL9VGVbBWfhxQrQeeVw0YmKH/IxnWHiJCxf88J/QxJChxSdxXn8vRcHoPcgZ+rwkmWW1jHdJJm4xBR0pRe9RBA3Df+JNItd5Knn1sdKJAUBcYwISoXoy683EyNeIWQkkQVuookYjFgn80XnHsovAv1SR1meoGzcbWbOIYEHOBbla9mrpMCwaq96ydBoz1W91LMunQquQQ2tVkfK5jLNKGu6J/InQN7UM1/am8ry3p+LsAnwz//0XJglivJxEdIHyKGuU5y6BkX637DqCYLV0eyUKOfoBnpY3Y6JyQn0wWWv6Edz6pEHExM8VACnCt5taSradra6yRd0nFODUb1vyYpZc8i1III4hGZk9akehPGwTVSfrClobYTwNX0FjNP+ULB4KucLUhXwc3FT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0M/aODYmBaL70c79bvrLWuLFmz6S+tcLiB3GJh/+iINhqGlhwbQr5vK3kGESJYW8OGTJsrHevuBZYyeAvTxaPfPEJfW8VKjtO+5gRMwAXH3G6FoT2TWe4neS7inz61aIfAGu');

// Signature verification
$__PK  = base64_decode('kYUKrITu4VT5deMGSNdZStxAnGth2sv6MwNJsNDNCYw=');
$__SIG = base64_decode('8TL9uNoNr1G3r5oQCGGtIR+xSeg2stk1M3CoerY6O2HtshOYjq3LFUZGi6SBJJr1Vgd18i10izaTKnQWgnDIAw==');
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);
