[PHP] Nostale Unpacker

10/03/2013 15:04 Sm•ke#1
Hi community ! :pimp:

today i open this thread for release unpacker cryptography written in php..

Code:
function decryptnosfile($cData, $f_buffer, &$cOut, &$nOut)
{
	$table = array(0, 0, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 13);
	$len = $f_buffer;
	$cBuffer = $cData;
	$offset = 0;
	$nOut = 0;
		
	while($offset < $len)
	{
		if(ord($cBuffer[$offset]) == 255)
		{
			$offset++;
			$cOut .= chr(13);
			$nOut++;
			continue;
		}
			
		$size = ord($cBuffer[$offset++]);
				
		$i = 0;
		if(($size & 128) == 0)
		{
			while(($i++ < $size) && ($offset < $len))
			{
				$cOut .= chr(ord($cBuffer[$offset++]) ^ 51);
				$nOut++;
			}
		}
		else
		{
			$size &= 127;
			while(($i < $size) && ($offset < $len))
			{
				$c = ord($cBuffer[$offset++]);
					
				$cOut .= chr(($table[($c & 240) >> 4]));
				$nOut++;
					
				if($table[$c & 15] != 0)
				{
					$cOut .= chr($table[$c & 15]);
					$nOut++;
				}
					
				$i += 2;
			}
		}
	}
		
	return $offset;
}
with this u can open .nos files that contain text ( translations, etc.. )

i release my project files like example: [Only registered and activated users can see links. Click Here To Register...]

for problems i'm here ! :handsdown:

Preview
[Only registered and activated users can see links. Click Here To Register...]