It's indeed 7Zip algorithm you IL-generated code posted:http://www.7-zip.org/sdk.html
Download LZMA SDK for C# and you will get 1:1 code as is inside assembly-CSharp.dll
Neither of the official SDK tools for decompression works as this is not an archive. I'll try to test algorithms on raw data now.
EDIT: grr, I can't decode it, maybe there's something additional?
EDIT2: Yeah, the SettingsManager uses JDCStreamReader.messageParse()... (not LZMA)
public string messageParse(byte message, int startIndex, int messageLength, out int totalLen, out bool readSuccess)
totalLen = 0;
readSuccess = false;
int num = messageLength - startIndex;
if (num < 5)
int num2 = BasicFunc.stringConvertToNumber(Encoding.UTF8.GetString(message, startIndex, 5), 36);
int num3 = (num2 & 29360128) >> 22;
int num4 = num2 & 4194303;
totalLen = num4 + 5;
if (num4 <= num - 5)
byte buffer = BufferPool<byte>.GetBuffer((long)num4);
Array.Copy(message, startIndex + 5, buffer, 0, num4);
string result = Singleton<JDCZlibWrapper>.GetInstance().doDeCompress(buffer, num4);
readSuccess = true;
private static extern IntPtr JDCZlibDeCompress([MarshalAs(UnmanagedType.LPArray)] byte source, int length);
Ah, not the first time I see this... They are coding the file via streamer and/or password/key that is stored in unmanaged binary (Mobius: Final Fantasy uses external assembly to get AES key for example)
Let's see if there's something special about this Zlib stream
Basically, the first 5 characters in .z file are used to get final size of decompressed file. File content is after these five characters.
I'm coding a tool for you