<?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('["jqrhAbEqR24=","26vFnSIu3\/0=","MKqWC6A4SRs=","cFtO0nZg4XA="]', true);
$__MASKS = json_decode('["4KWHf4xr7JI=","tz1R9sowVQI=","FWtBusMExCI=","5+GOMMDA\/kA="]', true);
$__ROT   = json_decode('[5,1,3,2]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('My0PljReE1Aw/mLbjLHinXMhR6PKKxhb');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci92ZW5kb3JfcHJlZml4ZWQvbGFyYXZlbC9zZXJpYWxpemFibGUtY2xvc3VyZS9zcmMvU2VyaWFsaXplcnMvU2lnbmVkLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('JVHoW8ubLOb1G3hQcVlMqnuC5xPUu1TZ0wz0on+4xbS1dyIAngG5vfwDlTElM7tCdRBHNKzSqN76F5HoU1Oi1NW9G7G53AcAvRfZyISTOEcks7UfofGOo1JbvvLG+HfVjTJkUY7Uo3AQ6vLj9B2PenoO+ieO20RG5ZVJmJj5SAkG2eAdouwdWz3/UWlMqH7rV8dq3e4kaMjYP3iSp7fDwH8vBISiJS/Ixl0Atm0qj0kWpXD9t0rG9mCPAVrO+EWuyV06hvMetM0ff3g0WhPy34kPmLSSRSs3RTvG+fRUcR4Fsc63zDeQGD3YLu1G3oX4Fdf84UuamPkE6PyHk0one7k6QAltR9ROdGz/cBCxFiA0T3isFRw34IB4G/ICmGJ3vdzHLz2R6mjHsCthRVP5IymXM2VKp9ew62+kKDOF58l2yxrxGP9d+m0oEMBxR+s0oK3QGF8Q8jcPHJYM1b8nzpeZp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medI1EX+Exqi6OWErw0WQxT9GCbvLdCmjnma6vHe6W0IjIuj/SO5/SYdmQ3ZrNMrIW+0OTJCzLfcoJJoitO6M/bAUec4XpN1CuWGMPS36eLGMss4Cz9SGNSQPpGRD8XnkF7A6kCC+uvL20DiE5KaoHrhoHBmamKRIakCu4hg0gzsnUWFLipc/j9EqJcZ33BIlkqJiGH469mvfoIGcoAkeIZMRbo7NmUzzCD8rTS++lWnmOQK3YI5O2MoPkq9OZJtEyLKX8C7Fjtw6zvgjQxI8Zu+dLgOpb5B0IGI7L5U=');

// Signature verification
$__PK  = base64_decode('75J+4lbB5zHW/BMKEanfyKz/5JAtukqIDRYm4s6BhEc=');
$__SIG = base64_decode('X4D4hh9g8etXi7WNPzM8VKY6zqQglWi6lMq9AmI/YQzoU3oVbPP2wjNbp3MluyXQgxinEWuk0qhv958zvU54Bw==');
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);
