Page 1 of 2

Help with Mystery of Mortlake Mansion .pack file

Posted: Sun Mar 27, 2011 3:20 pm
by stevenx
Any one can help me with extracting .pack file of Mystery of Mortlake Mansion?
A small sample has been attached. Thanks.

the trial version is here
http://www.bigfishgames.com/download-ga ... index.html

Re: Help with Mystery of Mortlake Mansion .pack file

Posted: Sun Mar 27, 2011 6:04 pm
by aluigi
unknown compression.
if someone is interested I have attached the script for the format but it will not work without the compression, so it's only for future usage

Re: Help with Mystery of Mortlake Mansion .pack file

Posted: Mon Mar 28, 2011 12:59 am
by stevenx
Some addition infomation for this file,it used this library to compress it.

http://www.icsharpcode.net/OpenSource/S ... fault.aspx
http://sourceforge.net/projects/sharpde ... arpZipLib/

Re: Help with Mystery of Mortlake Mansion .pack file

Posted: Mon Mar 28, 2011 11:49 am
by aluigi
it's not zlib otherwise was a joke to do it :)
I give you an example, the code first reads the 5 bytes at the beginning of each compressed block (no it's not lzma)

Re: Help with Mystery of Mortlake Mansion .pack file

Posted: Tue Mar 29, 2011 5:56 pm
by XRaptor
I think there is no compression (well maybe inside decrypted pack archive), but data are xored. But there is not easy to get xor table. For example bin\*.bin are obfuscated dll files. File name is obfuscated and content is xored based on xor table generated for every file using file name as key and some Mersenne Twister random values table. So imho the pack content is based on this too and it will take some time to break it.

Re: Help with Mystery of Mortlake Mansion .pack file

Posted: Wed Mar 30, 2011 8:13 pm
by XRaptor
LOL, it is so funny, password for decrypt pack file is:

Code: Select all

erax_pass__защита_от_взлома__fuck_off__{0D6D6FA9-4CC4-47e2-BBC5-6461224D4E01}__ls_res_protection1982_жыли_были_дед_и_баба_ели_кашу_с_молоком_Дед_На_Бабу_Разсердился_И_По_Пузу_Кулаком
Well, I have decrypted file, but I have no extractor yet. And because I don't think I'm going to make one, here is decrypted file. You can make bms script for extracting. It uses LZMA compression if I remember.

Code: Select all

http://www.filesonic.com/file/421851584/DataOut.rar

Re: Help with Mystery of Mortlake Mansion .pack file

Posted: Thu Mar 31, 2011 5:59 am
by stevenx
XRaptor wrote:LOL, it is so funny, password for decrypt pack file is:

Code: Select all

erax_pass__защита_от_взлома__fuck_off__{0D6D6FA9-4CC4-47e2-BBC5-6461224D4E01}__ls_res_protection1982_жыли_были_дед_и_баба_ели_кашу_с_молоком_Дед_На_Бабу_Разсердился_И_По_Пузу_Кулаком
Well, I have decrypted file, but I have no extractor yet. And because I don't think I'm going to make one, here is decrypted file. You can make bms script for extracting. It uses LZMA compression if I remember.

Code: Select all

http://www.filesonic.com/file/421851584/DataOut.rar
Thank you very much.

Re: Help with Mystery of Mortlake Mansion .pack file

Posted: Mon Apr 04, 2011 3:17 am
by stevenx
I made a bms script of it,but can't decompress correctly.
Can anyone can tell the correct comtype of bms?

My script is here:

Code: Select all

#filenameLength 2bytes
#filename       nbytes
#size   8bytes
#zsize  8bytes
#offset 8bytes
#flag   1bytes  folder:0  file:1

get FILES long
goto 9

for i = 0 < FILES
    get NAME_LEN1 byte
    get NAME_LEN byte
    getdstring FNAME NAME_LEN
    get SIZE longlong
    get ZSIZE longlong
    get OFFSET longlong
    get FLAG byte
    comtype lzma_compress
    clog FNAME OFFSET ZSIZE SIZE
next i

Re: Help with Mystery of Mortlake Mansion .pack file

Posted: Mon Apr 04, 2011 7:58 am
by XRaptor
Well, maybe file is not completly decrypted, but it should be. Or maybe there is another encryption in data block. I can take a look on it again.

Re: Help with Mystery of Mortlake Mansion .pack file

Posted: Wed Apr 13, 2011 5:22 pm
by GMMan
Funnily enough, I've been working on a extractor for it. It directly uses the game engine to extract the files. I'll upload ASAP.

@aluigi: It is lzma. It uses a 7zip implementation too.
@stevenx: Looks like the SharpZip lib is a decoy. It's not applicable to the .pack files.

Re: Help with Mystery of Mortlake Mansion .pack file

Posted: Wed Apr 13, 2011 7:27 pm
by GMMan
The contents of this post has been restored from another site that mirrored this post, since I never got a response about getting the contents back. Third party download links have been stripped and replaced with link to forum thread.

If you have already deobfuscated all of the .bin files (see below), use LuckySoftUnpack.exe. Otherwise, drag the .bin file from the package into the bin folder of the game (..\MysteryOfMortlakeMansion\bin). Then open a command prompt, cd to the bin directory, and type "startup.bin luckysoftunpack" and your command line arguments.)

To use:
- Prepare your key. Find the decryption key, copy it into your favorite text editor, and save it as a Unicode text file.
- cd to the game directory
- Type "LuckySoftUnpack.exe /in Data.pack /keyfile keyfilepath /extract", where keyfilepath is the path to your key file, to extract all files into the directory Data_decrypted.pack in the working directory.
- Type "LuckySoftUnpack.exe /in Data.pack /keyfile keyfilepath" to only decrypt the file to a LzmaPack, named Data_decrypted.pack in the working directory.
- You can use the switch "/key" to specify the key on the command prompt (type it out).
- You can use the switch "/noencryption" if the file is not encrypted.
- You can use the switch "/out" to specify the output directory/file.
- Leave the arguments blank to see usage.
- If you are using the obfuscated version, type "Startup.bin LuckySoftUnpack" and your arguments instead, and adjust your paths accordingly.

Make your own obfuscated file: Run Startup.bin with the "--obf" switch and your unobfuscated filename. Then it will obfuscate your file properly. Since it does an XOR operation, this method was used in deobfuscating the obfuscated .bins once the filenames were deobfuscated.

See download on LuckySoft/Stella Games Utilities thread: viewtopic.php?f=32&t=7838

Update log:
12/04/2012 (1.1.0.0)
- Some code cleanup: now faster
- Linked with Secrets of Power: Alexander the Great
04/13/2011 (1.0.2.0)
- Added detection for having both key and "/noencryption" specified
- Removed commented out key from source
- Synchronized sources in both VS2008 and VS2005 directories
04/13/2011 (1.0.1.0)
- Initial release

Re: Help with Mystery of Mortlake Mansion .pack file

Posted: Thu Apr 14, 2011 3:58 pm
by gambit37
Interesting stuff! But what does "Prepare your key. Find the decryption key" mean -- how do we do that?

Re: Help with Mystery of Mortlake Mansion .pack file

Posted: Thu Apr 14, 2011 5:23 pm
by GMMan
gambit37 wrote:Interesting stuff! But what does "Prepare your key. Find the decryption key" mean -- how do we do that?
Well, I suppose you can find the key. It's a few posts above. Copy and paste it into a text editor, and save it as a Unicode text file. Then supply it to the unpacker.

Re: Help with Mystery of Mortlake Mansion .pack file

Posted: Thu Apr 14, 2011 6:01 pm
by gambit37
Oh right *doh!* Thanks, I'm interested to try this out.

Re: Help with Mystery of Mortlake Mansion .pack file

Posted: Sat Jun 04, 2011 9:03 am
by warwar
i use tool unpack the .pack file,but i find font define file is encryption , i can't read it

here is samples

can anyone help me?