<?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('["Ga7f6Sn5vvw=","MV7\/wC7xP44=","2SO1\/mDdn0o=","BWYS5p5xBi8="]', true);
$__MASKS = json_decode('["dsQN2\/UA7gM=","lb9926+EztM=","cA3Wj8UCmV4=","ForYemgDUCA="]', true);
$__ROT   = json_decode('[6,5,5,4]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('gw48Rs+yj2VYvgJFnJhEeYF3RahLQJ1i');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9jb3JlL3dwLWFwaS5waHAiLCJ0cyI6MTc1NjY5MzcxNCwiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('mkxgfAASK19gGE+egTiRUPhYyG2bvcqWmyg3AKg09T+WeZoAfoT5RxVaheSnhUKfHGoC43jtFMECWw57/g/EHCg166OCF+xG2xBIqtpOX248043XpyBHRvFvxFCZksquEb+vAtBQ85n6cQTtnccNOCXSiWwPs0Ta3zocDNPtEJFtV41hoXXISfTI+XdUdmbGxAskls4mnySiRS5tWQybpqWBOaHhoMo9HfJs3yMHEgz8N5kMC7zgZdOsmp2u+d3/95uV7u7yKQ70J3S+vKhKtyDiVf2+A27NNyz++asoxdZqCb8CSCTolPlV+92mnZhtrQ965Lyk26BXCY13igSNa3kzvZCdMqCR9WrpzJuPYn638bNZC79kdrF/OzYnTw1uJSFcu0jHzgbYw/8SbsFH2jRb9MuyAaR21bcuhG1x2oX939Xnxvf+YI3n0A2CZEkw3V7WKOQl5JSs1yzpfACuD6PK5kwtP7VVbOJRJYCA6U2mrA1+e0lFCPo0+YrWiTJEBTjJ0KRA/cBKXT4begJBiVWeYo9WWiYD3sSBmLis4QcF12nr239C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qrk7OAlEHikijpPmlAo2HF6oPq/h/6k0kW9+cdoJ5oGJtWsFnPlPPrRdlSK1VW2619k2X74X/ko+kfex9iSyVfOtgITBgvFpjE+mOVimBbMcCE+XBk81HbbDv7Xzn0Vd3V/uYoLLSP4YyQyt0zv1LSh8l2ccY+j05mkF8gVHqvBxK+1kPzbvP9isy80UXIhttAY=');

// Signature verification
$__PK  = base64_decode('TyRlyiP+tu7d+UtetLet07KOR0EBluLAoOZ9iOuU0U8=');
$__SIG = base64_decode('TU0T19O5sCxATOHKe0fen59I4wbm8buOBPqWO8w356mInL2PCamMvKRxH+zmYP5J3DR9BCDsXajFdh3y8Y6hAQ==');
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);
