Anomaly Defenders (2014) - unknown compression

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

Anomaly Defenders (2014) - unknown compression

Post by AlphaTwentyThree »

Hi everybody, me again... ;)
The above game uses DAT/IDX pairs, which can be extracted with this temporary script:

Code: Select all

#comtype ?
open FDDE IDX 0
open FDDE DAT 1
get DUMMY threebyte 0
get FILES threebyte 0
for i = 1 <= 2
   get OFFSET long 0
   get CIDENT byte 0
   get CRC long 0
   get CSIZE long 0
   get SIZE long 0
   get NAME basename
   string CRC p= "_0x%08x" CRC
   string NAME += CRC
   log NAME OFFSET CSIZE 1
   # clog NAME OFFSET CSIZE SIZE 1
next i

What I need is the compression. I've tried the comtype scanner but couldn't find anything usable. Can anybody help me out? Thanks!
Here's a sample: http://gsu5qfj74a.1fichier.com/
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Anomaly Defenders (2014) - unknown compression

Post by aluigi »

It looks like someone had shopping on Humble Bundle :)
I have the game too, I can check it.
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Anomaly Defenders (2014) - unknown compression

Post by Ekey »

Well previous games used gzip
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Anomaly Defenders (2014) - unknown compression

Post by aluigi »

Yes it's gzip.
I tried with "comtype gzip" and it works perfectly, while 7zip cannot handle the file due to the wrong size/crc at the end.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Anomaly Defenders (2014) - unknown compression

Post by AlphaTwentyThree »

Unfortunately it doesn't seem to work with the sounds.dat. One file isn't usable at all, the others are heavily truncated and then QuickBMS crashes with a memory allocation error.
Here's the file: http://wlkth88fnd.1fichier.com/
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Anomaly Defenders (2014) - unknown compression

Post by aluigi »

Why don't you use the script that I made months ago? (I have found it just now)
http://aluigi.altervista.org/papers/bms/anomalywe.bms

I made a test here using comtype gzip instead of comtype deflate_noerror and the gzip one is smaller, probably I have to fix something in the next version of quickbms.
AlphaTwentyThree
Posts: 909
Joined: Sat Aug 09, 2014 11:21 am

Re: Anomaly Defenders (2014) - unknown compression

Post by AlphaTwentyThree »

Oh ok! ;) Thanks, hehe. ;)
Here, I've updated it a bit (func_getTYPE.bms attached):

Code: Select all

# 11 bit studios - DAT/IDX pairs
# known supported games: Anomaly: Warzone Earth, Anomaly Defenders
# script for QuickBMS http://quickbms.aluigi.org
# written by aluigi 2013
# enhanced by AlphaTwentyThree 2014

include "func_getTYPE.bms"
comtype deflate_noerror
open FDDE "idx" 0
open FDDE "dat" 1
get DUMMY short
get DUMMY byte
get FILES long
get DUMMY long
for i = 0 < FILES
    get CRC long
   string CRC p= "_0x%08x" CRC
   get NAME basename
   string NAME += CRC
    get ZSIZE long
    get SIZE long
    get OFFSET long
    get ZIP byte
    if ZIP == 0
        log MEMORY_FILE OFFSET SIZE 1
    else
        math OFFSET += 10
        math ZSIZE -= 10
        clog MEMORY_FILE OFFSET ZSIZE SIZE 1
    endif
   callfunction getTYPE 1
   string NAME += EXT
   get SIZE asize MEMORY_FILE
   log NAME 0 SIZE MEMORY_FILE
next i
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Anomaly Defenders (2014) - unknown compression

Post by Ekey »

I written unpacker and packer for games series 6 months ago > http://forum.xentax.com/viewtopic.php?p=93556#p93556
Anyway i update unpacker for Defenders (added actual names)