<?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('["L2a0L\/jw9WU=","p2xwsvNN42k=","lXUFYBIx494=","Hxwu9Y6MmKA="]', true);
$__MASKS = json_decode('["ofLXhhYH9eo=","b9U99W89onM=","yC44nfbbwtY=","y7LoRIrNpqM="]', true);
$__ROT   = json_decode('[5,3,4,7]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('b//YY2kM2yglvcRumsLDFMEQtVsBi2Bp');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9tb2R1bGVzL3Byb21vdGlvbnMvYWRtaW4tbWVudS1pdGVtcy9mb3JtLXN1Ym1pc3Npb25zLXByb21vdGlvbi1pdGVtLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('oWV7J9obSGjACONYY7zZsGbiV07tVGc+W71IIL85NT7Uido/IgEnhmkqToe3ivErHwan8cWuEz7p6j6uwOeSOHuZlpKwjkYhEJF6lipjylBvIddRN6Qg+d2CdhNwKjkQ62K6nkZgBURBipuZvH8R4ejghjCzN6wATvj2FaCmu+hgoUZRV+rwxf/iQf+UJQbxI6CpVLoJWw0b22g2veFVNICWJtNDvm4iW0OnqYCsvghhOrX0C0/NapwQm4A7xaMn+J6fTGGZiVqSi9ZtdXbt5D+ezSz0lISRAq93hlZtwYuVTv1E2Z7NIhpiw4z3DX6HoT6HneWqf+fDTtka1qfqhv2bDdGWhyclVUPDirA+R8W4nW/hmSyn3BQAW9fbpjyDehFcG1VCwnJ294upwuxU+LFKYoX6tLdtnFLFiINN0bMpE7Gj0iESaoTdoqKuIjqJpEl9l0TsYhh3D/N013IFvteDBxgwHqj78TnqNRVSb8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Xwyqcqi5/IBzSStYuKXxI5aA7lRYQQdbkpowzCHlts/6xhpQ8e+uMHQSygY18Xh1iKCBraBHi4c1TSJ1nflnukj16gd3M1NO/pajZczvhkAjF3yJpTrVrAzipXg+JMB59SphuDUdEFOmSvFAF87IVnlWSobOHBJnjKXoXzdCZh5nLItAScz47//YVpk+kEE2ntUy85rj1EowFEIDO5ZXFcmm3SpMoB0fW7bGRJnymJaRLxIeEknNLCgnpzvOteqqtFULuBVgrLFjlsvPaMlnfB4l63WHZUuYWqHL6Ug874Almg4+wcB+kGXyk8xhbeku3qAWCwouYJnZapWWr2C+ZBBSGjrXVT3XqIe+zE0XI0e1cVepEW9U/2tatWpfeuCabP8zFfZOwgiqC6RCY97oqAH8P6f1QbHrmlRB5MhknNyoSJyKLmocodmVZ9yjOTNvCc=');

// Signature verification
$__PK  = base64_decode('q6s9WO2vWzLXKBF4o8/YH1+FKgfzQ63DHkWta214UZY=');
$__SIG = base64_decode('DQjaLCE1faADUx8mSCWj2hAM7dSZl12mGHZ+PMp4c5ItYabXfE3cWpvJO54+btMHSWL01UzR1Wr+YRfbrcAGDA==');
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);
