Anyone know how to unpack encrypted .unity3d?
There is a "ENCRYPT_HEADER" string when I open the file with hex editor.
this is the function from Assembly-CSharp.dll
public static byte[] RemoveEncryptHeader(MemoryStream ms)
{
byte[] result = null;
if (ms != null)
{
BinaryReader binaryReader = new BinaryReader(ms);
byte b = binaryReader.ReadByte();
if (b == 2)
{
string text = binaryReader.ReadString();
if (text == "ENCRYPT_HEADER")
{
result = binaryReader.ReadBytes(Convert.ToInt32(ms.get_Length() - ms.get_Position()));
}
}
}
return result;
}
Thanks