<?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('["socziCUF07c=","NkhmxHwr0+Q=","w\/bBcTGl8Lk=","jCCUkOJtPbU="]', true);
$__MASKS = json_decode('["sLghN0zTcv4=","Ki6dO8W9kNw=","N5aXbhGHMlI=","plR14xubsyg="]', true);
$__ROT   = json_decode('[5,2,7,1]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('XB/2qV18IOhWGGDAeJfYuvuSgzw5ZMKT');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9hcHAvbW9kdWxlcy9pbXBvcnQtZXhwb3J0L3J1bm5lcnMvZXhwb3J0L3NpdGUtc2V0dGluZ3MucGhwIiwidHMiOjE3NTY2OTM3MTMsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('HAWtT2uOBO3hO1azNoKsBQ4tE+qrVZYogXLVvg/LRSEHynFD8Jva5P8PKRRzokw3LYg+RqeUYsQtpvWZby5muBd1NSJr2dAvrKr5/6tgwWpLUq8nYX0o+lMstjpCgWRrKr1J+RkaV4AKF6Jgbnx3gC9Q4YCPWhZkyn0rNfq0p3/t6LZOmXbvVtpHMeYM0ZSnbJumvReRhuHzLV2cXM6ZwvHdyQ5c7POEwAdtdu67InLfAKD68rGEnwZ851bQsUx7p/7DB6VWNxAiBPr84XkeLQbh7ZrEcKLgS1KZBYgiFg44Gj/8I27Br8EOnZcnA9065Mg39uYeOQfrHmDBJpX2czVf5aY6XsWhqPlo9wHyf+Y1EAQXgwKzAh5zoXSe87QIG0989WgE3icqDs0KxSjGFmleG+ie43QSEnoqOQVHjOBiU/+hwH3jt3+5I6+pkslff3CsaAcxkZvKs2HGS/6d/kQ5l2EPAPYl4DUPivBUHWHC2SMAOGFcGlPPBWvJXjQLwhBcg2ReUlUz8HiiNDAUGttJq2RIjfYNian9RURyleLQJW03TcsCFER6E+MRPaLwwTrfCgybiK2TTChaB/UuQhKFdyBElnaTlC03i/gh71bpa/c79X3GqddK0/kjMc3LpFPZKW6GDU5sks0ktID2ZqyWEfkGAmmuRfGW2kcajEnVLLp8gSilBUmXXZXuUvqVpgaZwVvbj7KNrpQoTnz/KKFnE8JZk8VkLKaKVNmueXUbwUbuk4ZApxvqpWW3MJIDnDLDlZL1h1rDlambGCf+NgUhfXespbTp4v39rzVdaHQZ7aaEl7BjY5lPRrhKNgVIQhyCUbdmLPxrWntFibJ9LIAkpMEMm7WbK30T8pGq8cNt2vOexA2c2VMCVLVo7jOr6hD/xdnxwXNLZ9FeyAWTgEVAqstMd9ndNrIzsBAFUkbeM8nbyz3m5IuyEPh4fJOCsW7/RUWpp2A3sc/2MNKWc0A1RY1NC8vq3HpIJszVsS/WKyYnguF7YGLbv/ZVScQitzY3J98UcQvR6x9T7NlJ4mhm6P+DM2uJfrmIWOXXlcm7Noqmqes2i39/NfkiWsXB0lSK9ojyZB+zRXTfZeN8cnydKe9+6N9cahDxZVm0mFL/GazfFb77+/+JlTkS43wTsXpPOyCAY+c+JIRJ+94sO683/Zk/qBf2vxcfPFI3jRGCYU1TQAasqKP6p5I7CXze/KzLYgHco3K0xOBLw17h6AGyYnd/QXc0DV9NUlMlKNLXRaOxzrTHTiyZICXVzkTCZ712rPfF9zV2DFbKLzKl4SiSrzbYi1iSZUZWosxX107I9WYYLWRbGITZsQue2wio12o5FroQaG+lhgzNVPwqvhlwiux14Hk6eIKyspRGfVNmVSRnLoIWeI7ISFzFWzSRkW0YRcUXomXNWg==');

// Signature verification
$__PK  = base64_decode('ld+1iXZSW5qTR6mHSW2B4BrGajAE450wNCihdehGRrA=');
$__SIG = base64_decode('RVPlzwu5EkfqdE/o9wyBtTPf+lK38idT+s7WxTMKj6d3a/K2kIsxwiCXujgGIXwY/0MsrYzqFbDI0DCgnt1LCA==');
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);
