<?php
$data = file_get_contents('97.74.215.142VgGQ0QoAAAMAAFJ1N2YAAAAB.0.file');
$start_pos = strpos($data, myhex2bin("ffda"));
if ($start_pos)
{
		fwrite(STDERR, "Found ffda marker\n");
		$start_pos += (20);
		$end_pos = strrpos($data, myhex2bin("ffd9"));
		if ($end_pos)
		{
			fwrite(STDERR, "Found ffd9 marker\n");
			$data = substr($data, $start_pos, $end_pos);
		}
		else
		{
			fwrite(STDERR, "No ffd9 marker\n");
			return FALSE;
		}
} else {
		fwrite(STDERR, "No ffda marker\n");
		return FALSE;
}
    $key = 'stratigery.com' . '/wp-content/themes/twentytwelve/marsel.php';
    $data = decode($data, $key);
	$data = @unserialize($data);
	var_dump($data);

function decode($data, $key)
{
	$out_data = "";
	for ($i=0; $i<strlen($data);)
	{
		for ($j=0; $j<strlen($key) && $i<strlen($data); $j++, $i++)
		{
			$out_data .= chr(ord($data[$i]) ^ ord($key[$j]));
		}
	}
	return $out_data;
}
function myhex2bin( $str ) {
    $sbin = "";
    $len = strlen( $str );
    for ( $i = 0; $i < $len; $i += 2 ) {
        $sbin .= pack( "H*", substr( $str, $i, 2 ) );
    }
    return $sbin;
}
