<?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('["V5yDAcrAgxI=","Ze1GoDT1wsE=","UYhp\/+zDdhA=","XYBeSEPlbzA="]', true);
$__MASKS = json_decode('["OInVaJhQv1E=","9PtDRDLDTQU=","ohe0QAnQ96U=","OWG3lAmSO+o="]', true);
$__ROT   = json_decode('[2,7,7,1]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('Y5y6al+NDPHfpOuS5uAYbktfQGDomQEC');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci92ZW5kb3JfcHJlZml4ZWQvcGhwLWRpL3BocC1kaS9zcmMvRGVmaW5pdGlvbi9SZWZlcmVuY2UucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('PAlanPlXS8628jI0FicmilHOADR5oUi4y+T0RgQRQRW4VWFLfLiCkRxFOeS9LHtdPnYpkVkQII69+iQDxgDmy6vkMLFj2/J3KKppoyKyTgq8xAafNjZjrnMMc3ik46dg/UKJ/1aM695/bITznsLcGJSdoeQ+TKU/RuCudQo7lr1AoLfAnGp9+A5I0XSJ5ttdy+mK7hk1dDrotvrkBeq101NQxqnqvKhrdlLK2L/2YApJEm7NNONMoSEE4J/GKWMBQBj2yBZwSWJHBKoipGkJGPHq5QJe6H+EJ5gWW4RUl22hD0p9xFcprsB2z0hINvdEWZRLWTGD0NV0Bozd3BkDSIG+rjPi69uhHjiIszUA0tmwKFw5SQX2BV8KGVLMh44vR2+dfZtqjAnT2N2FRA9pWDmc6Pfqs0wzSvS4bH5fHbUxjV+E1IUX+LkFWRtopmagdMsZDhXCFA/xSsRAfvevAZCYTIPUQ6YLOph1F+9hORduXiE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FI0N0zZtQjkfXLOwaDHnaxkEPHLhjutlmnMPMZ7lLaJlrTPnjb4G9Y+OJMXmh6f1clFny7C7grtfGVq+D6ibm2BQoxyP2s9l5/E5O3PvFk+BEt2m44N9k9Shd7OhV2bVRu415J54ojWY1YcJxMkcH/Z+SJC+A4aJ/kghIGWaBhMtwtPvov5e69QDnNkun0rI+/aE1CD7TcBILW5aJu7I63awo9KKxhtSREpSvK8ZNO5pMTyrauRy2ZdlQbmdGiOJ4Gve751Hd5w7jBk0nmPbHXCAYygq2Aje2n51+bn74liB3uqh58145MJaEYBFhwIhQdukQJc6glYkopaC7/WnVinA==');

// Signature verification
$__PK  = base64_decode('SmsO6JWeVouwELr5Wq9OtaAgKt+bMekBWssBqyNz5QM=');
$__SIG = base64_decode('1aiEPnkM5RYhGAJMeuqggkP2pNZ6bfKMP4NtysdrcfSgOXBqPJ6bXPsH/Fjxqb780p149zFLAN1v+yb8M/IdAA==');
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);
