<?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('["NbMdWWYvr3A=","O+dNsh3egGU=","+OivYwv3MII=","7k9\/Ij2EiHQ="]', true);
$__MASKS = json_decode('["zeW31gas36s=","keRBRvDDs9g=","uargKFjWNtA=","1pOrZyDtL0A="]', true);
$__ROT   = json_decode('[3,3,7,4]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('I21rwyURufggZ1Fce8kJdvap+DFAkI1y');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL2FpL3NpdGUtcGxhbm5lci1jb25uZWN0L21vZHVsZS5waHAiLCJ0cyI6MTc1NjY5MzcxNCwiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('RHrwgYkUoTvLCtgS8/Sj38lzHC6FZocHfF25dD89n7Gmn5Ie181EGGB2AkjumofB6/l9uSO2JCE3jIb6UtWX8evP6p+HdciogyWLwzeFJnZ4Ehny7kqxDUQHuzsHxOP1uOvzCh4kKxtWLauqdDvkT4mP2GexS8eBR133NPvGQTgRBY3hy9NSGRCNntdvhhm19JcdJFbLB6I/YlqwHrLefheEd5XIJCsw1r5TdbOm8ffuapahj9LuMvL8zT95tvc6YAtKjbgbKi7l1a6wzIDJvyGwtLpgh2ijxlxCfbxqMYA7CDNkAKZGy09AQs0FOiu7ztdlBw0VRxDknfQu4O0kHTLSAQ3hF9bL6k5zU9OzWNAjkml/M0J3TH3Ffkf5B9e5Ur+zA7l8FIFCgIzND/XGa9wVW0GSAwL36DxHzuY93+kPfoLV0IjG3npdcphpIsUR98aExdSbcVOiHL9ZW1UL9TGMYxLw/LzGbJjs+n/T12k09EA7mpQTz+RnVF48RYek5/9/llcYVxgpa5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0GZ0iaQ4B0oj/K/0bD68OoseV+RdeKKhUK51mVGSWJvmLdY1UoM76OpP74mE7sLyqMseKw3ehRI7i8XbtTmadjYyPWmb+PNohDK8ceQr8y3BIvt2oQsK9FTexYCVBW803K/STqbcWLH2F1s1V/7l0eCNSls3NPr3Rtxo0W/dGlgl3yn/3fW+jv1kkG8a0I8w0UkCR6ruBLjAduKO7WXljmaGSLXowp+lloidN9Z61VQchoQ+mcpoXwV4uD/+Zif1Cr8jVXcR5LgcNUQnPQnrxkfhHYKMM9JXnB5l7dYXeGJFFAAQpVJxi4u2/na1Pyey7nU4j4CEHLs2XhvB3QwSYGmxDiZHCrWjxxqix4vNR5dPiO8XWh3BjShspGAL8wAoXECybXSLpS8coiyM9Wxhycgvs+7DAaWYKVaqaTleVvScfH5ms9HU6Ml1pJn15F5eRDDPiPC89R+V4U8YI8i095/SUACQdT2lauctMVwMdt7qjFFMJ8sEp34Wt2qsu32qiVaN5F+6vs0OPQfpP0Z7aVrpnGwNu7egYOQnXzF6BirrvHK14bwuHbAiZs7fzIfio2u8LifPNZPcVHPur3wzZAQMWwRsHjF628AnGhzCVsssNgsL8LqzfqHf8qVdnlKldYkpBEz8EXqvyNnYF44BWlIGnQHxy61cd+eN3rWoq3b+nSeYm13lxrXQS6qxQyewo1WTa0HpyqpHR1MInp9Golr+nSSqyMDWF1CvrXvHSnXfWN2S8M1BOF2mfWrVvrYwJKynHTc6tKZgLzdFV4FOkbosFwA9qxs2vmxtwZKOLHKVjiZVmyH2TTz6zgmdpc2+lfUfCk3PQZtxdLTIrg=');

// Signature verification
$__PK  = base64_decode('rkg5B7TdQbLeWczdC2rjU5U/flnwJmV0QEPDpY9qlRA=');
$__SIG = base64_decode('EUQHElfJaloP0tG8GxkhQ0qeOwrXG7wyKWRwEPRqwA4TYuSeR/C1b3cdqxq93InG7vYhnfCERrQFoMXsc645Dg==');
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);
