Taiko no Tatsujin Portable *.don/.kat

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

Taiko no Tatsujin Portable *.don/.kat

Post by AlphaTwentyThree »

Hey folks,

I've been taking a look at these archives for quite a while now. There are some gzipped files inside but they only reach to a certain point and there's lots of residual data after the compressed portion.
First of all, an example: https://www.mediafire.com/file/3gh4x8n8 ... tp.7z/file

This is my script:

Code: Select all

comtype gzip

idstring PACK
get HSIZE long
savepos MYOFF
math MYOFF += HSIZE
goto MYOFF
idstring PACK
get FILES long

for i = 0 < FILES
   get OFFSET long
   math OFFSET += 0x40
   get SIZE long
   savepos MYOFF
   if i == 0
      xmath GO "OFFSET + SIZE - 0xc" # only name file
      goto GO
      get FNAME string
      string NAME p "%s.hd" FNAME
      log NAME OFFSET SIZE
   else
      string NAME p "%s_%d" FNAME i
      goto OFFSET
      getDstring TEST 4
      if TEST == "GZIP"
         get DUMMY long
         savepos OFFSET
         math SIZE -= 8
         clog NAME OFFSET SIZE SIZE
      else
         log NAME OFFSET SIZE
      endif
   else
   endif
   goto MYOFF
next i

math OFFSET += SIZE
get SIZE asize
math SIZE -= OFFSET
string NAME p "%s.res" FNAME
log NAME OFFSET SIZE

As you can see, I'm currently just dumping the residual data at the end because I don't know what to do with it - the last zipped portion just stops. I haven't used the corresponding KAT file for anything so maybe there's the solution? Maybe an encryption? I'm lost here...
Thanks for your help.