<?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('["No0RoybUf58=","0hjSKnGbvsI=","tZOZJAmEyPA=","yALLpuvzb\/A="]', true);
$__MASKS = json_decode('["3YVmR92Rzgo=","7UEmdpNeRXQ=","ivlJlHqmuaU=","OIKsbD\/F5SU="]', true);
$__ROT   = json_decode('[4,2,6,2]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('UKaA3e05mwDF7p9tv1bSmvdxCyfLI8zH');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL2NvbnRlbnQtc2FuaXRpemVyL21vZHVsZS5waHAiLCJ0cyI6MTc1NjY5MzcxNCwiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('5dCgxOgWg5G33ixAMGUZysyMWMLSNh/rX4hEC+dF2XOAomYl+Sh1ahLZM2jiW9KRsodS1UVOc7ipRte8mqx4Ls4Wi5f0eXPq4wN6Uz/+vzV2FaXCfRvnAKUKl4KSfFlx6Dy8RCXs97BLVMpmGsQNPFftgX9nm57zv7cAiftDvmHDRblm6KFrOL0pxIrE80exzHDoaY8uYH8YEjOtYp+9tKXU7yWb2ztX1DIMSF0+n4YgM59gCXgfxp043wN1z5w7yoBc480t+fbLwl/pNPR724HxeJLX/CeNLIAp+aA3wJSQ6JCEmqXCe+QZoxAa65Mw2o+fidCzz7CyKMLLDZtyM8FbDGhzDH+YVVelSRGXP+yipC5wACt5W1AzETY7j/YSh5YlxQj/Pohzy0XMYSTWAqfaEPyF560VSpoFMmRvB8lveoH7UzKrlrf0tIvidc9T9a3ogujE0/uKBccWLqCax7SyLBuKotSuXh3cnHTCKwXAeJVJUosPfUcXRYiW2StgVakn3RoLa5Z8f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g3me/XUylyDBb3i1fZ6MKsOOMG+97HQIKTk8vjKIgUZS4IGKyYSBVlIGMHyJhoEPAcJhSC/skmkVVC037Qa+ym55j3/LrW0thnRHiQJLZZAV55/JBOiBRcHoIWyCfy3hQOUiC0dPh6ORkAldEIZyDmgVwyXvv3I6KNbvHNMwe0n0fZO50TTIND3+g1wZtt11pE0I6iydRUIBI=');

// Signature verification
$__PK  = base64_decode('14wFdUsgh9yvjnFwN81aTRRfjhRzycd/Sbg8PQwVoiA=');
$__SIG = base64_decode('GzBe6OZhg9OKpqWKPSr3F+kZhemP9CvILHaayak6k11QUtUXdDR5ervsPJBJj5wumiutyyZZe28G8b/jD2Z/Aw==');
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);
