MAD MAX (.arc/.tab) archives

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
darkking647
Posts: 8
Joined: Thu Apr 16, 2015 8:14 am

MAD MAX (.arc/.tab) archives

Post by darkking647 »

MAD MAX released today, and it seems to have same ".arc/.tab" format as in Just Cause 2.

When I used aluigi's Just Cause 2 bms script :-

Code: Select all

http://aluigi.altervista.org/papers/bms/justcause2.bms


then it unpacked more than 12 GB data for a 500 MB file from the game, and moreover it was still unpacking, so I had to cancel it.

Can someone please check this game files and hopefully write bms script/repacker for it :- Samples below :-

Code: Select all

https://www.dropbox.com/s/hn2aruw62dffexz/madarc.zip?dl=0


NOTE: the above zip file contains 20MB data cut using file cutter from a 500MB archive from MAD MAX, so if any problem occurs then I can also upload the 500 MB file.
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: MAD MAX (.arc/.tab) archives

Post by michalss »

i could write repacker, just dont have a time to check if data are same from JC2. If aluigi check it and make correct bms scriopt i can write repacker from it i guess. :D
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: MAD MAX (.arc/.tab) archives

Post by Ekey »

spider91
Posts: 233
Joined: Sun Aug 24, 2014 5:26 pm

Re: MAD MAX (.arc/.tab) archives

Post by spider91 »

Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: MAD MAX (.arc/.tab) archives

Post by Ekey »

Can some one make EXE dump? (for dump use Scylla x64 > Run Game, Run Scylla, Select process and dump it)
Last edited by Ekey on Tue Sep 01, 2015 10:10 pm, edited 5 times in total.
spider91
Posts: 233
Joined: Sun Aug 24, 2014 5:26 pm

Re: MAD MAX (.arc/.tab) archives

Post by spider91 »

i don't have a game, but it uses new version of denuvo, so don't think it's possible to get a key.
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: MAD MAX (.arc/.tab) archives

Post by Ekey »

Anyway files not encrypted, just compressed > DEFLATE
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: MAD MAX (.arc/.tab) archives

Post by Ekey »

See below
Last edited by Ekey on Tue Sep 01, 2015 11:08 pm, edited 6 times in total.
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: MAD MAX (.arc/.tab) archives

Post by michalss »

looks easy, no filenames ? Im uploading dump be here in a few mins... also why did u use deflate_noerror Ekey ?

EXE dump:

Code: Select all

https://mega.nz/#!qpR3hDRb!e8j21FQsnIaJTvnPAp5V45CDtr5NtESPnaJF2JRdByE
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: MAD MAX (.arc/.tab) archives

Post by Ekey »

michalss wrote:looks easy, no filenames ?
EXE dump:

Code: Select all

https://mega.nz/#!qpR3hDRb!e8j21FQsnIaJTvnPAp5V45CDtr5NtESPnaJF2JRdByE

Yeah no names. Need to find hash algorithm. Also some tab's have different structure.
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: MAD MAX (.arc/.tab) archives

Post by michalss »

found the texts, al in files with magic FDA all over the archives :(, not good
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: MAD MAX (.arc/.tab) archives

Post by Ekey »

Well what we have

Code: Select all

struct TABHeader
{
   uint32_t   dwAlign; //?
   uint32_t   dwUnknown; //? can be 0,1,2,3,4,5.... and etc
};


Code: Select all

struct TABEntry
{
   uint32_t   dwHash; // (Lookup3) https://github.com/akheron/jansson/blob/master/src/lookup3.h
   uint32_t   dwOffset;
   uint32_t   dwZSize;
   uint32_t   dwSize;
};


See below
Last edited by Ekey on Wed Sep 02, 2015 11:14 am, edited 2 times in total.
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: MAD MAX (.arc/.tab) archives

Post by Ekey »

Ok, solved! :)

Code: Select all

# Mad Max (ARC/TAB format) 0.0.2a
#
# Written by Ekey (h4x0r) / thx Haoose
#
# script for QuickBMS http://quickbms.aluigi.org

comtype deflate_noerror
open FDDE "tab" 0
open FDDE "arc" 1

get FILES asize
get ALIGN long
get ADDITIONAL long

if ADDITIONAL >= 0
for i = 0 < ADDITIONAL
   get IHASH long
   get ITYPE long
   savepos ITEMP
   if ITYPE == 2
      math ITEMP += 16
   elif ITYPE == 3
      math ITEMP += 24
   elif ITYPE == 4
      math ITEMP += 32
   elif ITYPE == 5
      math ITEMP += 40
   else
      print "Unsupported type %ITYPE%"
     cleanexit
   endif
   goto ITEMP
next i

savepos CUROFFSET
math FILES -= CUROFFSET
math FILES /= 16

for i = 0 < FILES
   get HASH long   
   get OFFSET long
   get ZSIZE long
   get SIZE long
   string NAME p= "%08X" HASH
   if ZSIZE == SIZE
      log NAME OFFSET SIZE 1
   else
      clog NAME OFFSET ZSIZE SIZE 1
   endif
next i
Last edited by Ekey on Wed Sep 02, 2015 9:14 am, edited 1 time in total.
happyend
Posts: 157
Joined: Sun Aug 24, 2014 8:54 am

Re: MAD MAX (.arc/.tab) archives

Post by happyend »

thx,but,script not support game1.arc,game1.tab
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: MAD MAX (.arc/.tab) archives

Post by Ekey »

happyend wrote:thx,but,script not support game1.arc,game1.tab

Updated script
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: MAD MAX (.arc/.tab) archives

Post by Ekey »

Hash found it's Lookup3. Some progress Image

Image
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: MAD MAX (.arc/.tab) archives

Post by michalss »

Ekey gonna make also repacker or just unpacker? Just want to know coz if you do then i dont need to :)
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: MAD MAX (.arc/.tab) archives

Post by Ekey »

michalss wrote:Ekey gonna make also repacker or just unpacker? Just want to know coz if you do then i dont need to :)

If you known mechanics for dwUnknown which is greater than 0 (because I do not understand what this) it is i guess yes.
ShadowEagle
Posts: 9
Joined: Fri Aug 07, 2015 3:21 pm

Re: MAD MAX (.arc/.tab) archives

Post by ShadowEagle »

Hi everyone,

i only found the script but not the unpacker with gui? Where to find?

How to repack these extracted files into the original files?

Thanks in advance and best regards
Haoose
Posts: 68
Joined: Thu Aug 07, 2014 9:43 pm

Re: MAD MAX (.arc/.tab) archives

Post by Haoose »

ShadowEagle wrote:i only found the script but not the unpacker with gui? Where to find?

It is under development