Space Hulk 2 (PC, 1996) - MUSIC.FF [script]

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

Space Hulk 2 (PC, 1996) - MUSIC.FF [script]

Post by AlphaTwentyThree »

Another script from my collection for you guys.
Used a workaround to get rid of the additional zero byte in-between.

Code: Select all

# extract the MUSIC.FF from Space Hulk 2
# (c) 2015-04-01 by AlphaTwentyThree
# script for QuickBMS http://quickbms.aluigi.org

get FILES long
math FILES -= 1
get FSIZE asize
for i = 1 <= FILES
   savepos MYOFF
   get OFFSET long
   if OFFSET > FSIZE
      goto MYOFF
      get DUMMY byte
      get OFFSET long
   elif OFFSET < 0
      goto MYOFF
      get DUMMY byte
      get OFFSET long
   endif
   get NAME string
   putArray 0 i OFFSET
   putArray 1 i NAME
next i
for i = 1 <= FILES
   getArray NAME 1 i
   getArray OFFSET 0 i
   if i != FILES
      xmath NXT "i + 1"
      getArray SIZE 0 NXT
   else
      get SIZE asize
   endif
   math SIZE -= OFFSET
   log NAME OFFSET SIZE
next i