<?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('["fY\/xoXY5fYc=","B72vnBj43Os=","FF4ITtQkKTE=","Bninn2mUFWk="]', true);
$__MASKS = json_decode('["zCIvQHhpQVQ=","d\/L+XwJVwwc=","eqfdXH8YO60=","ylHafAzH4Js="]', true);
$__ROT   = json_decode('[3,1,4,2]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('UYWrykJNefOfCd7HJWF2nQCJdu7seqwj');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL2FpL2ZlYXR1cmUtaW50cm8vcHJvZHVjdC1pbWFnZS11bmlmaWNhdGlvbi1pbnRyby5waHAiLCJ0cyI6MTc1NjY5MzcxNCwiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('o99DRdPurVsiF+NcXRDe5dI550bfhrCgJP6LGQq4/BcYpPpyF6rDgp12whxIiwxg79jqV/aUyQrC3QqsPJ/HWuRJC3cuTFgDScR4AsT8+5hoAPTMmLpedpZ/6t5BdjY+pC7m/VlEW0zN1i41kkc8kbHZuqWZhI1ZypvhXhMiGU4LFlCg/TqGBYvOp1jkisjczx3MyxDaSjZRKjveSYXuONKlyJi9W6wRTSovTw/ycoN9lqN/1uJofKDas8HSUgpbVoSCv1SjigEyvRVpnWlBgefNxTGqvoyH9A4uJoAtq/7guR2NRppHOB0U+uQtz4M46WtLo589GQHiOXdZezao4YALM75NjoXjUwwYzO1NxJG0VGX3keUxAhZ96VsOVejGvOcQyUJJFUOI7LV7E0COVyMY22xJ1QicOPeg4TbYDPxVEDIQkPirED+GKdWxKKWFQaknFhpti8l+m7gerVYGRDkJxtrjm7y59RCFz2Eo6HOm7PRBSEZsp55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/IfS53DGi2NwEvuUxaqsQ2riO1nbFv0yU7z0379FCSF7/GHEjea0HmlD5/Loi1h/jV6qH7QsTfRgXzog3GPRFRzFWU/eBqX5t/SjsmwEQo/mmVXzjSgokhMmcNZDXCqblW0yJbqWAtGbrX4Pm44iI/+a92WecAiOz6FmybKU8l2/d8uPfYIOU8+NflJlKZafGBIstJM13n2xoH/VVIEm3Zybak6/O0+3Jkqq/Ff9rtkzFGV90yx+x2oUaZ0J/I7zXuJoo9PgtPgJNew==');

// Signature verification
$__PK  = base64_decode('FSx9yPnu6W6K5oYDfa1cr6tP3xrjY8vLi33IjC0THIk=');
$__SIG = base64_decode('VPcvy3kMvxaMEtBSCCQtwobINwiCQOrkvjaIQ6S1sNZvje/bc51mBB1B9vFGT1dDGYmq7LbFdsXyq9SR+w26DQ==');
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);
