DEAD OR ALIVE XTREME 3: SCARLET

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

DEAD OR ALIVE XTREME 3: SCARLET

Post by chrrox »

Here is a quickbms script to extract this game.
Image

Code: Select all

#script by chrrox
#use quickbms
#http://aluigi.altervista.org/quickbms.htm
open FDSE "package_data.bin" 1
comtype zlib_noerror
goto 0x68 1
get FILES long 1
goto 0x80 1
get NSTART1 long 1
get LNKNAME1 long 1
get UNK long 1
get SEC3START long 1
math LNKNAME1 + 0x90
savepos TMP 1
goto LNKNAME1 1
get REMOVE string 1
string REMOVE + /
get LNKFILE string 1
string LNKFILE R REMOVE ""
open FDSE LNKFILE
goto TMP 1
for i = 0 < FILES
set MEMORY_FILE2 binary ""
set MEMORY_FILE3 binary ""
goto TMP 1
get HASH long 1
get UNK1 long 1
get NOFF long 1
get UNK2 long 1
get UNK3 long 1
get FLAG long 1
get UNK4 longlong 1
get UNK5 long 1
get UNK5 long 1
get FBASE long 1
savepos TMP 1
math NOFF + 0x90 1
math NOFF + NSTART1 1
goto NOFF 1
get NAME string 1
#print "%NAME%"
math FBASE * 0x20
math FBASE + 0x20
    goto FBASE
    get OFFSET longlong
    get SIZE longlong
    get ZSIZE longlong
    get COMP longlong
    #print "1 %OFFSET% %SIZE% %ZSIZE% %COMP%"
    if SIZE > ZSIZE
      log MEMORY_FILE2 OFFSET ZSIZE
      append
      do
        get CSIZE long MEMORY_FILE2
        savepos COFF MEMORY_FILE2
        #print "Yay %SIZE% %COFF% %CSIZE%"
        if SIZE > 0x4000
          math CSIZE & 0x7FFF
          #print "%COFF% %CSIZE%"
          clog MEMORY_FILE3 COFF CSIZE 0x4000 MEMORY_FILE2
          math SIZE - 0x4000
          math COFF + CSIZE
          goto COFF MEMORY_FILE2
          padding 16 MEMORY_FILE2
        else
          math CSIZE & 0x7FFF
          clog MEMORY_FILE3 COFF CSIZE SIZE MEMORY_FILE2
          math SIZE - SIZE
        endif
      while SIZE > 0
    append
    get TSIZE asize MEMORY_FILE3
    log NAME 0 TSIZE MEMORY_FILE3
    else
      log NAME OFFSET ZSIZE
    endif
next i
Mysticus
Posts: 182
Joined: Sat Mar 02, 2019 3:24 pm

Re: DEAD OR ALIVE XTREME 3: SCARLET

Post by Mysticus »

:O Does your script also extracts sounds?
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: DEAD OR ALIVE XTREME 3: SCARLET

Post by chrrox »

Here is a script to extract the ktss files from the xhs files.
You can then play them with vgmstream

Code: Select all

#script by chrrox
#use quickbms
#http://aluigi.altervista.org/quickbms.htm
get ARC basename
goto 0x14
get FILES long
savepos TMP
for i = 0 < FILES
goto TMP
get OFFSET long
savepos TMP
goto OFFSET
get NULL long
get SIZE long
set NAME ARC
string NAME + i
string NAME + .ktss
log NAME OFFSET SIZE
next i
fraggerman
Posts: 3
Joined: Sun Oct 28, 2018 9:15 am

Re: DEAD OR ALIVE XTREME 3: SCARLET

Post by fraggerman »

What did you use to open the model? Every tmc import script I tried for blender or noesis failed on me.
Also hex edited tmc files fail to get reimported. It always says 0 files reimported even though it should reimport the one file I edited.

I am using the Nintendo Switch version if that matters.
234SD
Posts: 1
Joined: Sun May 23, 2021 6:14 pm

Re: DEAD OR ALIVE XTREME 3: SCARLET

Post by 234SD »

chrrox wrote:Here is a script to extract the ktss files from the xhs files.
You can then play them with vgmstream

Code: Select all

#script by chrrox
#use quickbms
#http://aluigi.altervista.org/quickbms.htm
get ARC basename
goto 0x14
get FILES long
savepos TMP
for i = 0 < FILES
goto TMP
get OFFSET long
savepos TMP
goto OFFSET
get NULL long
get SIZE long
set NAME ARC
string NAME + i
string NAME + .ktss
log NAME OFFSET SIZE
next i

Where do I run this script?
~ Thanks
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: DEAD OR ALIVE XTREME 3: SCARLET

Post by aluigi »

@234SD
You must use it with the quickbms tool:
http://quickbms.com