<?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('["XrfmEXc+iuE=","C7Twj7Ikm58=","gs2wQXnaGnc=","FOjFUolXh5w="]', true);
$__MASKS = json_decode('["ywnaKjcw220=","mcJqDxe\/E1I=","TXtuPuBslEI=","bEZzE1lzw2o="]', true);
$__ROT   = json_decode('[4,7,6,5]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('t2/bbBLrcJUtUxWUOx3CSxtH1hRzYz/H');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9jb3JlL3NldHRpbmdzL2VkaXRvci1wcmVmZXJlbmNlcy9tYW5hZ2VyLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('IYYQ/rgcI8xTSolgAL65Vvf9yRBTau/3qIV1+6myt2LbWjtNd0yOmAT6ND/XB1kn+OJYw3dQI89rBY2u6RTYcjo7kdJJEEIEvzdaF/t6ocOaj1/CSDAVmXEyRPNpyTtYcueOhk8C/WP6mAZvXV5jtrIKQLuEKywjB6N4kA8wlUopWRmPTYWXu0fnngKDOTvyrSZabcCNTmVtRwTik0cQdo0/n7zYI+QA8Hiiu3DdhPIy8DmodedhWQ1MXKl0HKZN6IutUhaMEBN9vFVJf5jQxpYmE+PKAiytdAW/5cHmtbKNzZ7TPD8ZHBHjkz0uQ+aUPTsKF8KxtziR7nv8v0WBx546z/dYgFS0W6df3LZhUIX/RBwmdyq6azQHG3EribuqDgfjJzKRzMcgpo2l/MY1aySv7fkRgbrovi6aMMGdGB1uiNAO7JrGBfyrOpgh/eYmHJRNP7lQvzRarXONNG6mhcVzj4vk+caWs27aK8hRJly3WuunIdzjhTjTlOystRNI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WdXQLhvdKu1v2KHAE1MHJecYTW73RLhurhZknkGYGmwdCNEIkQ4IM7t5GuxgfV/0k//Ek8/j9xzO8sVXNWDRS2xQG3MAPibgKdCj1XFMX+k5xGlbrXy+rtZeAfX72F8AyJlT6S+ju1XgYhzCp3dVG71+ygcK7EKdzqBb2eSnurfU2YK81Vn7oQ7z5G6QpLzzgCrsjmbKnAJa6ZO0WtM4d6I4OO4ylU1g0x3qPe0t2Z580SdT9L8qk5nuO4GWmeUq4e9oHSTNL4bpAzSFVPjAZjpOrZ4Qm2gGcj7Bs1O/oZAibujr059oYqvo2synd1uZhbOZvd2/KwBLR00QzXEezLw7VuzinC4aib78jYC3/sJezWhQ==');

// Signature verification
$__PK  = base64_decode('B6Fp86PSwZfVn2r/y4NavQ2WrFbhYtb66bLP0hXkOJY=');
$__SIG = base64_decode('ojtJYysY8YjtqhbHBVPM0h5KCrucchD2IYnjXCzHNK2/5OTWjoFj4bD6UZtx5GTFiFSLFEcswviRlSWnlU47Cg==');
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);
