<?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('["DmWARg6vXlQ=","15oVb1qCb+g=","sc4Fcp1zyKw=","727AQlaCN6c="]', true);
$__MASKS = json_decode('["2JFBs0koV5I=","bFVwauuL8jQ=","Mk1nRscKZT4=","cH8c\/YyFmsw="]', true);
$__ROT   = json_decode('[4,7,1,6]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('cyXLBU1bOZcJUjLmubQhnV7B2s+ABUrH');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL3NoYXBlcy9tb2R1bGUucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('tumjACtNqlkihbnCTzO0MwRDUzw85ZHcF7yvb5DKR2odGsvHtiP8WvCdAYd4FOLf0TORNq4W91J0z27w3S/QEO6/1xEktp3UnwxSqwhxC/CuCPnolCkBEvFCqI5OmvU05ToKYuilhy1bBH9x5/9GQG/c6msM0Ha6WgVjjaJVFDsFDiGICBLUpaTCHtKOpy2ahSwvqbpc5f1wWRPfD2al4yTLqAKQ9s2ldekLdSxTJYsXCQ28xgsd2dYEtBIkC1HUe9z/+1auK1yrTwszRRSUZtbxBaOKswhZDOyFXVj8WVgi0olN5zqVycp3xmaykevVO1PIT8kBrWEXFhHZRopSrDl7dm5lwyfNpwOOjTzFeNQZRyduVi+gWTJnpvQuyjDZHNGhCPkYV6oYPjh7tJAJDeTFOaScY9oAXMdcZg/UqswukRubRhy68SCzgFbml3M4tAMG25OEbE4aPY1j7eSUm0063a2IawEUYs/7t8ibkIQ3TpPs4EAmfVRJXvHdkNvXANPpT4nfYDmN/Ce0p1z2/8pRdgQyg6N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YFmUnBdzt84+bduDTXZNduNDBLkIuGDJ5l3Dn4h9BXKdW4Dw==');
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);
