<?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('["qvmNWzWmMOE=","9M+9CH3U+Gw=","Md7wS5Rlb0k=","zyE8AeI\/QTk="]', true);
$__MASKS = json_decode('["3kivth4Z5nc=","wAJ08ZDc630=","OwDxjhRgGSU=","GKZXfqrQoM4="]', true);
$__ROT   = json_decode('[2,3,6,2]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('Hv6iBZ/+RDmJ8BGM2aFlXKh3iWCimQm8');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9jb3JlL2NvbW1vbi9tb2R1bGVzL2ZpbmRlci9iYXNlLWNhdGVnb3J5LnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('hh7F3d+AainKR8T8+NQ1gv4fDyyDQPfvJ5YGyZLGJhBKO+tDHCdAsqn/g324bfDFttFPp+SNJ0mM0L1CdAdxjf5nGnpUCbzOPG3BL7zs4aAGY+rwTJUovjhSNIZ6b00EL4zUopc7IVph+XYtd+dZMqT1b+J1s31XV6lqlf/WF1JCQXn131IV6YqTrty1WmH1Afr4CKhuxSctNy5pLGvAraeaWxmtvm8rNuAp1X9igyX42TItnSXUspumm2Kb5s1LUysrB9DYMqrrZt5sYOkbypDbjNo/ODL0dLsGMtPQRF+JTgjLreYElbBIPxn+w4yjzRgCEXLmhstNoCRkCTfpZBvxYPojLmHpqZkQ993aTJOhOxarKXY+1JRzHbNJphvJFRVkTqXQUx9FwnaZpE+yELk462l3MKMQuftAHHAsgiLo32fngkt88R/sXYiFdtaw02I8BRpiUgooCDADeM0TVvkR3vBYUIKVtMPb6jfhLqRAznIv0qCEBlffXwZDezJc1Z4i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QDJfj0qXhFgW5W+PT/Qa7n5M/S2e6Ee8YVbJsDTnHRPAa6GLe/dVXrN9hmEzxP3+2Z247pvPH3R4jRomtQV/EcltpBYFKUry18o/SEwyZMVvk3ZU0W9Du5c38BtLIobdSP1k0ucoFJag6Tmvy3uLlKGIpJLgc45TcxjMNPj80cypeQGUwGZPBwoN+XYHD30WiFaIeP/4tf8Gsb7j/+BRdI2mchpxsGzQyTS48yg725/rvCk88Zf0O3Z/ijJDY7UlF0SP9Mzc+Zc5opmjXjyFKsdg/VEPJ6JM5BWSEIfeg4CUTIHHJ+2ex6bcQk1WVpUX6ZpNwZ0EZ3f15XfXaJwagz3q1925as6ZEObKBycLhOabCXS1ah4CLpMdnCXj4stO4gqnlUA3OgjbD86wlk+s58/8/7dWSuLt+fXSPNfHdesDavov0E3qLCgkhx0jxMQxzKuX5MqOOkBm2Jud5tY9dQ8utzLQ/gMboknEonYJCqaOPn1GTy9sA+wkiDK+FW+B+fgh+GQ8KYkI3yQKyGOpnFhuIcpJwbTyW7OQkuxGSn0zyN2i/v14tlg4We2QW+5QbIBAc6KYz3KzmuZfWWfP7h');

// Signature verification
$__PK  = base64_decode('i/4Cwvngi3vVypuycgxNZbd9aBubzjOSi12AAu/ypfk=');
$__SIG = base64_decode('EdB/4C94KM5iRnVec0ZtNn1CEYuMKxOkxqIgksr8S8fuloswyQHrqAWCpfuI/fthkkdTyFk9XjE79wUYlcEdBQ==');
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);
