<?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('["8m4EnEev6to=","oJ2RXv6SWp0=","PafEOLBwKJ4=","nsSQN97DJlM="]', true);
$__MASKS = json_decode('["Dn\/SC59mXd8=","mhoVGqgkMoU=","ukpRGxdqWeo=","gnjyMj6GxNw="]', true);
$__ROT   = json_decode('[1,6,2,1]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('+QX5tLGs+YiKOh8OPt7AnCbks8q8d+7h');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9pbmNsdWRlcy9jb250cm9scy9hbGVydC5waHAiLCJ0cyI6MTc1NjY5MzcxNCwiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('LsilX6d4LlD4WHvRGH004NtQ8z+NZ5MipCJAZKXz4jK5x3f882WjLmQzI/GivY/sx8oMA/N0HK7p6xEC7nVe6KTIJmUvcRFP6QHdIhLL2dCfsQMT3OUutljRL1+f4AXZKrEcg+kjWNd5EEriTsexyct+o4vC6PLsDpyl4aA8e3gcAYpB6qCG5b4TkT5E7Ov42W6FGQq2bB20sKEciLkg/APBnGRS3r14pb61qfwHv4AWSnSCvhYF1+ZgaP8/121NnxmqPyM6wrSe/bNJZzaI+VAMfN0vWRNyrVsU/wZZN6DFsesEZvxl/Uv2ieXHer6ZFQTqM7owt94Oob7aVtWayjsgjP0cGGEQ65w6HywNf0RBbUe+W87rDFfe6zXvbzL/9nznLHsoAdyYIp+pP4pOglRpPUteT4OICryT+hf2Zx6wpRUXKYRftecXvvn3cyZk7b5qn2uIsVV5ZIlX2d5PMXzrpc0DXAb2q3ANKWAya/JcfJi7D5dE2uSyNVpqbf4146aEn+pbvjNJ+IVN+nmcf3ksWxZ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JKIdR8lPtW9FC4ffUOak8pA0DdQqmilh0uROz/C9Tbad29jcZDikVdIyGsCvU7LOM55kdFQt2Ygj5VtXB11x/of+DMcBZbufl2a8pzFnXV6eEQuqbZTELt0wS8vefNunUq3me/WN5V1qTF7995Qxd8MHm9YWpuBx0ELLJlFU595d6gJfdksVYdGQshSVnjAObouoYjLPyP4iuLzDA0hsK/6n4pFmD6ic2g6//sjCXHWJfPvSPcu7DsGWNihhjgflgDTP9SroONd3ajkNqnutKSe/EaLantRsevB4/zGLl4ciwhXuXanrnMFm0yJ6koneQD70cMLh/vrnU11GnWTP7+GT1n+a3nLZSCDTe6g4ceBAAHHDZuCtUjG3ZoQZzrqACrtr3bcvqKB3TUoHkO2Xm7b8Cri0ZPGRFb1SSL7d/UdJpg66WV3QBX+lNnxBCoT7/qAQWsr2EPScrxQnXkscJS44/oemeLwxAHOP4aYgW8rwFG1kSCUPaikR5brc1L6S5PX694kCRq5zUMSIPC9ln/YR9Wv+BshF3GKSSSk0/QYpnqgLsY8hOPGusSgaW2ahaxSPcis55QRe0aZGp9lM7h14XDp8MMBxKeymFaj2T/Kyolcj3qXVtc34HcK5SimN4AK1YdpaI2aM4t4tPzW2RufMfG6rE70OxELeQkmq95z6IPNWfnLVvlhLsbm5zt7gXwTTbsjVnRZ+KvhjRSdYFvvd9gZ3NAOR9qzCaqRhVGa0PMWNYUXVwEN9hf2d++E+GPQOH9+5a6jHhB1KBb+HE5SszW76upnj5zBd6txDXVtBRiJE42rZsPj6V1QUnBQmp8+hMYgvikuSesjJbtPsr');

// Signature verification
$__PK  = base64_decode('r6uIzQwq99XgsijUgZYU0GuMeZtMIrD9PLt0hH2bPxg=');
$__SIG = base64_decode('ztLBwE7zNJN1WD9fJ9sTZ83UbOAvXupF82WcD/fxcL6wLFFZkTeVgktZGpBeZJpPnYITCrcwgIxvAPJMhHzxBg==');
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);
