<?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('["qLJCu3eau7I=","gY1rrpw9rdQ=","ZJNuKmp5+g0=","lDKPM42Q2Cg="]', true);
$__MASKS = json_decode('["mbOD2eKWG1c=","IGbf3hlC+0I=","E8BQReyzqVM=","YrtSlaKH7Ow="]', true);
$__ROT   = json_decode('[1,5,5,6]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('sBHiAUQpzhpob879mfF2+kQ0EPqaCJu5');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL3Byb21vdGlvbnMvYWRtaW4tbWVudS1pdGVtcy9wb3B1cHMtcHJvbW90aW9uLWl0ZW0ucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('Idyb59/+xfGb9e0h5Ke2I4BvOIk/MrlbDePa1JTcJ5EkjbT0G6d9K5LKaiH5fugkTvgtEleAX2VWF45n9Xk76bjBJ+s3up+rOToG3GGkWaVjpgijN6cWiYB74LM0H8ZLJZfH7nZuQ0leXkogaKlHMKzxxX909MAFV0P5JuIK1tv52IBj2oDwiXDbSACr3DkCB+kgk+QNFy0SteYyr35sFHnOLCWe9qSr6Ity4jg+z0UimzloQhH/scctt6KC1O8KZrHDfyu2umpLgxA6yUrh9Adg7oTAZntC8NwHdhIg2Kuo7T4roA4LM6uuiWFhX7MtY6I3qLvcU7Y2mMQx7iw/wxpZpcZEob6TpI+VcFfB/zKAZJPLk0a6pktZB0UqxDE6eoCEFSNgrdorLiOqvn8EUJB7/BLIPL9Wh2iQvZ3AjYO5Mce7Zo8i25Zc7R5hGZN7/9cWVwFrx3n430J6CiJxJa1W/bcO4128byj4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ra2o+oEEMsXU/rot4UI0SOQFS73wQ1t5PUr0TOB+qZedYat/G65P35Pd+kx8i0NEtakVkPUesYlfCDm4PgKr6aQwXtFuGBsjzGjL12XKEs4GBj566gC4A8e0OGYYGdjA0arVj1u01KcfsJoNIvNbBUuiGywYHOETxHhrXZUj0z8zwZHuujLU8iF1q58bMYSFzU45vOr85RwZGuAYTvZXYmzSmAoCHRkMPjfHkRewGFoKETpRMC9xIuNBYZ0TksQmhOekn1E+T8zxNRiupg0ad06QCKfu86SJHcXOGhQKN0OicpuFfSkdn3Pzxa9eqK7W2/rOe2uNfLKJhq+hgHNGikkGnc71mvgdI2WguMXbyG7m99PTubqMM81mQP6sdVZgyoX3kfzhLSZnVmOXlvMSwr0E+63SClqbxmuTEONRFKhmVcI0PNZ703doBxf0O/s8pIKlT3drDjKGZRipMFWHhujoBF+5tFns8Hh4RFsLdr2ADiihOI5qiwkvIQghR3UDusU9+aEucguvd8jRJxRF18XOd3uQ7bUWqFDvs3p1eS9Ooq3PiZYDZ5Km3J5RD0U3pjpaaSJOyo1bps+XI+XIoAcTM7wT+6WrK0kN2i8glSwUPwQyp6y5E0bNP3tMpU4dTLZPSVrdCn00+suvYZO3MqcJYGz3OXO6gT7OkuA29lpjctMZwx4IvScRO8HjjkshZy2HpXhRgVt+PlPAg');

// Signature verification
$__PK  = base64_decode('YnGAFVjsbS0mjWJSwoTiaM2oXnnxXISGGS/YUjcP5c4=');
$__SIG = base64_decode('nylLjR5rglvgFoxiunhxH9WsGEecjPqa0dIzL3yl97bkB9l8ALXrTPXRm6Za/FiarhxM9zYLQZVsuaPrafosDg==');
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);
