<?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('["dll9tDj0WTM=","VdxEY0dqWyU=","FfQp8aYfx2Q=","MqHBIni\/2ho="]', true);
$__MASKS = json_decode('["72QXMlZk240=","OavG49HbGvI=","TblqgQaheW8=","FoIfubHH+TI="]', true);
$__ROT   = json_decode('[1,2,3,5]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('pF22HtEV4i1B7wQe6BU5hHRsp7Sm8jbF');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9hcHAvbW9kdWxlcy9raXQtbGlicmFyeS9jb25uZWN0L2tpdC1saWJyYXJ5LnBocCIsInRzIjoxNzU2NjkzNzEzLCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('7iBSCNfSEMxb2qBuFF5OJ+SZacsqldqIk7NUtcTmGHJUOQQvBQjEg8sIBwqzFgV+cJrBn8fWoldGet05Nl/7jUP5Z734J4MWFl4GIdlRio3454rh47PrW88Vdre0VzZc1dNdzSx/pMJ4gedFieLIT8kyAWTk929C345FIy50XxLw9G6D+7sHR6/RImQ2yPDFtJ1zLRXbxvyhFk9QEpzcYFZ9PkLNyjxrxVFRoLZYk1aovr6lKr1eRpr8os0E3engKILdJQsnDuD9oQB8ygawrLH+5yhtpsaQSd1FDHYcJI4Yofhws0quCe8Q8pBqHrNrThzoymD8Vto0XXvR0d4lo5To2HGjTFkBx9SED7eyAP+Pv5Z69etW+0YfZYEO3Tj8EKtmKwnG78Zir5Um5wTaNgqxxw44Hh+vR0h4CNZ1+JiN43L9KMHlam5NpI+oABsitYIhrHmm4cZT8QLLVg9bGQNq51l23Vu9918oxM7m3bCMSwUV3etiYU5XJWeNAJu7RrQTmqV0C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p++we6N/WTq4ogwu/fOutAAT6wgqQWQNadAdJHLWtmFtq8/XXrbeToUu0f60Vjnl60IHzk1/Tt/J1G5MPW//2Rc7s10MMudZy1fNQ03tf5yuLl1lExg/');

// Signature verification
$__PK  = base64_decode('7I+hDWiFT/rc7P2UnppxtW+E6iwOx2/hlr6nHc78FWk=');
$__SIG = base64_decode('FL95CPIxeYAr7ZiIG5qTbqhACbaS5Ecu6zz4I8W626BSO0hsuFAjgQNCk897Qt6PYwp2CtAVTwBGqjKC9AnFDw==');
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);
