Battle vs Chess OSX - TPAK archives

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Battle vs Chess OSX - TPAK archives

Post by AlphaTwentyThree »

Hello there! I can't figure out the TPAK format from this game... Can anybody give me a hint or even write a little script? Would be wonderful! :)
Here's a sample: http://rcepyzc6yx.1fichier.com/
Thanks for all your work! :)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Battle vs Chess OSX - TPAK archives

Post by aluigi »

The format is "similar" to the one used by some games developed by the same people.
Armageddon Riders Clutch, Insane 2 and possibly other Targem games:
http://aluigi.org/papers/bms/clutch.bms

But it's not fully compatible.
In the other games the compressed data was zlib with the first 2 bytes modified.
Here I have tried to add, replace and "mix" the 2 missing bytes without luck using offzip.
I even tried to use the compression scanner over it, nothing.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Battle vs Chess OSX - TPAK archives

Post by AlphaTwentyThree »

Thanks for trying Luigi! :)
Does anybody else here have experience in compression methods and could help me out?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Battle vs Chess OSX - TPAK archives

Post by aluigi »

The problem is related to obfuscation, not to compression.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Battle vs Chess OSX - TPAK archives

Post by AlphaTwentyThree »

Ah ok. Just to be sure: It means that it's some standard compression like zlib but the deliberately changed bits to make the files harder to access - right?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Battle vs Chess OSX - TPAK archives

Post by aluigi »

Yes.
The other games do something like this:
zlib_data[0] = random_number;
zlib_data[1] = random_number;
That's why in my script I set them to 0x78 and 0x9c.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Battle vs Chess OSX - TPAK archives

Post by AlphaTwentyThree »

Here's an example from Battle vs. Chess: Dark Desert: http://www37.zippyshare.com/v/J0dt3lC8/file.html
Here, the clutch.bms doesn't work either. Is this a similar problem or can this be solved with a simple update?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Battle vs Chess OSX - TPAK archives

Post by aluigi »

I think that both the names and the toc are encrypted or obfuscated.
In the meantime I have updated the script to version 0.3.1 simply for handling the endianess (big endian here) and for a particular 32bit that is used only here, but it can't work without the toc.