<?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('["7iqiOmo8olY=","T0LiQlLhzuc=","5Qq04bvs0o0=","q\/3f3iVual8="]', true);
$__MASKS = json_decode('["UFDCySq0Cc4=","CAMnatECV+M=","oDtAInRiaBc=","aekSc+hAUfk="]', true);
$__ROT   = json_decode('[1,5,4,2]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('UiLNUYmrqh6VA3BJBbEEUzhDMAMeFQML');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci92ZW5kb3JfcHJlZml4ZWQvcGhwLWRpL3BocC1kaS9zcmMvRGVmaW5pdGlvbi9SZXNvbHZlci9FbnZpcm9ubWVudFZhcmlhYmxlUmVzb2x2ZXIucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('1tX4p3bC18ZmYBmF/gac6XAYtk6ZFR6CT6whP2XHcYbHRFGyXRJFJMojhnfe+IQnubFLHkn3C3CjHdsMHn6aNwNZKGoSTYkAEpryN0pKD2ZN3jHOPwmvBuYvoDwZDEGlQJoihFRCELR9P2tDI5cvMxU/IQFJ5LdaYT7X3O6abkTW3mmL2wM+QQRNse8JNlo0tjNU97Qn9a4I9AiXdVa6WJ9JqVzX12J9HLtJTyP9P5F1q1eZA1kxjIuePtEKdJ+b40mGKa7twsvpr1qaz/lGDtDZR0i/EVqW9jxILUAdzE2vj9KMh1otM3zZCun26v4GDBzNACaFLqdQLUe/VZf5qp7ExyX96a+cPK4f51dNkQ7OBrEbiIE7vfUCvCOo0puSJMHJCkpip7PiExw806MGQW8e8bHJNOAYIXm3Xjz7X7TRlgYsJNckY6zswNeIc0Mpaq6vuRCUob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TulOG+A46dU3+a4qt3OV/1kfC+QWjl6ZCi5hXAkT/p276ubhGg1BuXB36FkQNMPPvrXYAQnrvOt4U2tDABhLICzQN32kWPW6bxFby4SXOECpICaAIW4XxTHpMwOzwc+iAS4oiyQrqnZqq');

// Signature verification
$__PK  = base64_decode('n4Hvx7aUd3zA917pVC1l04MV44BAf4cx55RyahxZRkA=');
$__SIG = base64_decode('ENZcs8y6qqd0TkIYo9ZBchk/gwNgTgsp+l7hmuApJ9M9IAdCuVH/xNCuALrCAZ4dpP9ME/zfuxp4JJkpdExPAQ==');
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);
