Metal assault mas.CVF

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
johnis
Posts: 3
Joined: Mon Jun 13, 2016 8:42 am

Metal assault mas.CVF

Post by johnis »

Due to internet limitation i cannot upload the file. The website is : idcgames.com . If anyone can check this game out would be a massive help for me. I am new to this all quickbms stuff but i do understand some things. Thanks for your time :D
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Metal assault mas.CVF

Post by aluigi »

You can use this script for creating 2 small files of 2 megabytes from the big archive file:
http://aluigi.org/bms/filecutter.bms

Zip them and upload them on the forum or on mega/sendspace/mediafire or any other file hosting.
johnis
Posts: 3
Joined: Mon Jun 13, 2016 8:42 am

Re: Metal assault mas.CVF

Post by johnis »

Sorry for the delay .. it took me some days to figure out how quickbms works :P here are the 2 files from mas.cvf: 1)http://www.mediafire.com/download/8u2607ggb271qro/mas.cvf_0_277627567
2)http://www.mediafire.com/download/x91zmrzvnab436m/mas.cvf_275530415_277627567
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Metal assault mas.CVF

Post by aluigi »

The format is the same of another game for which I wrote a script many time ago.
I have rewritten the script from scratch but both the directory tree and the compression are unsupported:
http://aluigi.org/bms/sfilesystem.bms

Consider that all the files in the first 2Mb of the archive you provided were compressed, so the script is going to be quite useless.
johnis
Posts: 3
Joined: Mon Jun 13, 2016 8:42 am

Re: Metal assault mas.CVF

Post by johnis »

I extracted the files with that script. indeed they are compressed. any way they can decompress?
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Metal assault mas.CVF

Post by Ekey »

johnis wrote:I extracted the files with that script. indeed they are compressed. any way they can decompress?

Did you read it? # 2) compression algorithm (unknown)
zhade
Posts: 1
Joined: Wed Mar 01, 2017 6:33 pm

Re: Metal assault mas.CVF

Post by zhade »

I only recently found out that this game had been re-released. Heard it became a cash-grab...

To add up to my post on xentax (which I corrected) and aluigis bmsscript: the end offset of a directory is 0, exactly when that directory is the last resource of its parent directory and means that it ends at the same offset the parent directory ends at.

Now for the encryption used by idcgames.com:
I don't know if its some kind of typical algorithm, maybe someone can recognize it.

Pseudocode

Code: Select all

dword block decryption: only the multiple of 4 bytes are encrypted. Remaining bytes are unecrypted

dword KEY1 = 0x04C478BD
dword KEY2 = 0x0015DCB2
dword KEY3 = 0x00241AE7

until you can no longer read 4 bytes do

   uint8 byte[4] = read 4 bytes
   
   X = (KEY1 >> 8) ^ byte[0]
   Y = (KEY1 + byte[0]) * KEY3 + KEY2
   byte[0] = X & 0x000000FF         // Decrypted first byte
   Z = (Y >> 8) ^ byte[1]
   X = (Y + byte[1]) * KEY3 + KEY2
   byte[1] = Z & 0x000000FF         // Decrypted second byte
   Z = (X >> 8) ^ byte[2]
   Y = (X + byte[2]) * KEY3 + KEY2
   byte[2] = Z & 0x000000FF         // Decrypted third byte
   X = (Y >> 8) ^ byte[3]
   byte[3] = X & 0x000000FF         // Decrypted fourth byte
Jaxas
Posts: 6
Joined: Wed Feb 28, 2018 9:30 pm

Re: Metal assault mas.CVF

Post by Jaxas »

Did you manage to decompress those files?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Metal assault mas.CVF

Post by aluigi »

Excellent job zhade, script 0.2:
http://aluigi.org/bms/sfilesystem.bms
Jaxas
Posts: 6
Joined: Wed Feb 28, 2018 9:30 pm

Re: Metal assault mas.CVF

Post by Jaxas »

aluigi wrote:Excellent job zhade, script 0.2:
http://aluigi.org/bms/sfilesystem.bms

Works like a charm! :shock: Many thanks aluigi! :D