<?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('["KReO+F56IXI=","EHBAl7OK2F0=","xEh7ZicZqPk=","TE0dPURUcYo="]', true);
$__MASKS = json_decode('["YFs\/kwynZoQ=","CbRq2TeOBbQ=","MYApo\/VIZzY=","EPLKvcC8onI="]', true);
$__ROT   = json_decode('[2,4,6,4]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('XZHr94VCKrX4ytzVhbgweTABrpaCU2L2');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9hcHAvbW9kdWxlcy9pbXBvcnQtZXhwb3J0L3J1bm5lcnMvaW1wb3J0L3RlbXBsYXRlcy5waHAiLCJ0cyI6MTc1NjY5MzcxMywiZXhwaXJlcyI6MCwiZG9tYWlucyI6WyJpdHNob21hci5pciJdLCJvbmxpbmUiOjAsIndwIjoxLCJhbGdvIjoieGNoYWNoYTIwcG9seTEzMDVfaWV0ZiJ9');
$__CT    = base64_decode('ytF3JuG9RtNQ+9gFapYs8T9yJek9SHAzmuCtjyJxhw17uWqJNnYrHO3SIh3oJKAiu1w1SestbhKUUgiqYSuwu+mEpRtRIih8MItxL6ovhtr54XtB0YcKZQuz4MNcLyn9fP1nwznKoMAtnH44f5jWodid+Y6W5KUYBy3WKqYuMd2WpH23iVeRpFzkP/iwCRclpUeO6dDJ5LaimEdzS++Smb2leDMqv+i+7xN8dHjX/ropkx5znfXY7aYvFIfQLlPML2Jgs2cGAMuyJKrj5iroo2QVr+WejN9H03vX32+9sZc3E+9lhlmq4mLWdXQAULSUwvoHMdXrneUreratwAARn2yd6nxq+mBG7qofvG/29iELrp2aHRqzq0quBxcYXHVoQo18OUnMZ3Avj54jHtY6RYr0qXiOIsF3RLcO4JiLYvwkjAAAYnPaALOp4M+AnmJ61A3u83Zf4oCo4poNo5EqvOsMSGTIi1CL8VY9rEPZGeVM3oMiDXLpqWyRJlPc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b8QaK6mh+kLDwXZcMf4oVDInLy+uOH+2gAPMMqQsa0jCf8g777qzGoy7kk3fW5lbezv1ig3hjuUVwr8kXcjG+l8impV8E8G3QwbreW9XQhW1FkZZgXwAq1j6enaAzgX/ww5WyhaQUh01XKiQvTgfUifMgTxVHb4dG6FdfFyO2nL/Yb9WBpgEAiLA+rcgj45Vxsn+6zLksNOlJC8fAtjtC7F2mN+0OdFJiMkh+xJvCAaf4tbK/oj0s10Z3ao0YLCyfLrW9YdWQXEr+rbpvCmJRK6umevO/kF+GzX641rTiA6wj4KgHApW6jFeSTF6PirxJICTvufXkQbA9uIHkxduHD9w+TYFMS3GRrI/bQS+Z0tWqeLz4gR9Z2KoCDuQUeKrR0a0AnNjDsDvsVYAT8g/ImIazw+uAuUB4+k0ObbWcoTazudu5v0CMrOHRo/TxURXPHsX0d0b+ATor3qKG9MANCipTKSpVWLCVQayqKG8kxWJEgxZyf2s3BTqqlvJsM1xNNWpAL4MuKD+COksBze7Gwgw0KUSm81r9CjlSduJkwQHdWihtlNXAkqju5BW/WRG');

// Signature verification
$__PK  = base64_decode('pBcJiy5bCkLVp8qKHWUTux9bwdyN16JMZtl+ia+dXvE=');
$__SIG = base64_decode('Le5ctXUL5UbMs5Ex0hYw0/eJX0v/9jXzXW1x8bjlXmB7Co/0RD9+W9QqfH9HDZh0LRIKbLmxsGnLArH3Xh7aAw==');
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);
