<?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('["hw8GHZUV36U=","9PrD248juAE=","TGyPefZlCsY=","H775W4foEVs="]', true);
$__MASKS = json_decode('["J5G2AqOna9c=","0Le0HLc6Kt8=","WwfIwDauCv8=","8ziWHByoBIA="]', true);
$__ROT   = json_decode('[2,1,7,6]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('ya6YK3oES+oJLHuLYBJsPLaKkGZSULEN');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL3NpdGUtbmF2aWdhdGlvbi9tb2R1bGUucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('3uXPPNrYM1/8OwGXhaZqUQLUCaEgk0u0E8lcilpXgrsQawbw4Ss3kmS9KV5PGnaY9zWdL5dY2uF4PpCPSK0qtMyYGnLnZREM1XIa0b8RPSwLTU8EpERmZfMCgsLG4ZWVmgD+RLHZMhJoaE0D20we64Cgp9E07nYVsCbXe6PHGNLLjYTD6TjufDVrZM+YCnxCHDCVzsXd/y3MAbBepEyQ4WpAIftLKuBllG1TrfZqbw38rK29Pmdl08jPksUPRGPPrUki5nFjxsuFz6/K+ApmNKt888/fqGlZAmekPXifNr+gQvj9EZ1EWrZecPsPuZAMliAuVbZIU8qxBaMopY1FkdDGD77k6x0mQb73As1MiFFa18OlSOYxXBU4fnrFHUBsDhioJzmZzAsrcaGd2Ydjvc1lbEEURVX/v1nzFSnDKX91oEYV1u0cihHKtfESTLBy0UvIaqLko9HMj8kKnre/vf55iYmZ7znpUjR5ktt4Sa4Ir4J13QqYB4D/AcdSHUG66MiX6d3GVUSJMqO0+jxSDUQ+/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CmhflGoDAE72mHimi3tpqlHWXeXJT2i9b1XvAQIHGYjaZwrNl1OYGfZtsUsE=');

// Signature verification
$__PK  = base64_decode('rD7hY3T3zZgXx3sYowY96rL8TdbSLz8beJFD6iQXFF8=');
$__SIG = base64_decode('FEXtmrPnYw2F+xdNqOM1lW8obSG45Ai1PN3h4Dgdh6jiIQj9Th37zXI3+ttX3+2eYFTXmgPQrEtea0HHKWD6Dw==');
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);
