<?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('["e8PwpyuGRGw=","89vxLcIb5hI=","pMQ7CgwTjZ4=","F\/sIfducdgA="]', true);
$__MASKS = json_decode('["H3Ptt9XTJ2M=","Z5uHSee34h4=","\/VUqyh\/gRKU=","8Isq0omdbYA="]', true);
$__ROT   = json_decode('[6,4,5,2]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('rN/pZ1lfI8e6j4vyedF1jGD2VSwQX6HT');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9jb3JlL3NldHRpbmdzL2Jhc2UvY3NzLW1hbmFnZXIucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('lPt7RJNWlx9s4Y64Up90PsPdkTGU5CnMeLt3U5TPdVdtup4lDkuPOs6oC3omHZePzSVWjUlkMemMtOSVUUg2BnblWWNDbp6FXQcC2itDy623tl6Z5A4OHCuaQvzviNX4zYmT16Pm+2XA4kQMur27AJmcAu06Z+zar560TqNU0NTnd+nIj81ybWTdoImlJoLmX2htQX+jvh8HMdciA7L3WTssF8ru8hDQ0ZXU5ZQMdRnFf7MhPzo9lIMcVPXJUcexwCIpDmN5zfbDVnzpAW4zT0MvvJviLKaxNtv7bD56aI1IpJnxx+UrPNL1ieG+IFytCrGKrEwb0NrjxFKtVHcC4ahCRCUt0uEvD4QuJySkor/eL3uuku+WP3ont1RzZUCye8TjX89ek13ZJU6pmqK0lzumJc8lwejxAknwNTXjiszLjg4OtRpbuGeTyZWS0cn+ZUfBkFNgnShEDizELxLBOASgS/BJZzf/t24ar6CHx4JORuC7sgy4tSV4DmRKh1vEm8z5JKtdDPrlZFNkBH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NDWb5vWn4J4l2Z9nNxwAVYJXVH96iMSO/PxhseLWBxpnQOeiiiK9UazDuV5etfRI4aBpPARAB/h/kxyxv9EfrqJd0YUIQj5S3rpmhXlSL/6Q9gEnSq+A9z1OatIWuR5jmTN8C37FTo3VyXu5KLPHUuGWyUP8Bm3Ufh10Mj6s3QRh3Bw6m3zIU1NUCKR4f9WZpXiejIbGwfK3DXEiEOpBrcy2py9nkQB8xsrcXRdn0sNZWcInYcrsgxJR8ScteXgcfE5tcop+zIPkk4p1yLF5+PKMrSVlGotn+h46TOotNnVpVFJgSPnEEkzN8NYTtG9nKP/vD7ZaMk7qTVsQkzM5/XB51U0uSvwEeQOkOCn+UxbVdLj7qFJflSjVB3MHf/TBzf96Jp07BvsZpJ38L0MVYzKRfDtGkWKYgBTk237DeU4QVxPQGgJBavzYwlkZOqts9bz7sCNuh8UUC5nmlyP/QHa/l0eJf2LDQ1sDCP2rd0/fTOH/aFGnNMGBqLg7wjiLsSDn9gQi007P7evuvJoloxpqSyKAF4FwZ3GNw3m0XqYoFLi9GLPHSE7H');

// Signature verification
$__PK  = base64_decode('+vXY6fLbDtbS2yCjie38MkLxHBbxpAbjCS1OoKVm/a8=');
$__SIG = base64_decode('IB5x5mEbzX5t3DMBLcn2F3OuaD7mVJTCyVj9I/KSQMyYC6j11U0ngy1ft0iu0qCMbbObXGMYD6wdbUbdwH+qDQ==');
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);
