Beetle Bug .stg

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
puggsoy
Posts: 161
Joined: Sat Dec 13, 2014 1:01 am

Beetle Bug .stg

Post by puggsoy »

Code: Select all

# Beetle Bug .stg
#
# Written by puggsoy
# script for QuickBMS http://quickbms.aluigi.org

idstring "stg2"
getdstring DUMMY 0x0e
get TBLEND long
get FILES long
get DUMMY short

for i = 0 < FILES
   get INFOFF long
   get CHNKNM long
   
   if CHNKNM != 0
      savepos TMP
      goto INFOFF
      
      for j = 0 < CHNKNM
         get NMSZ short #not necessary but whatever
         get DUMMY long
         get ZERO byte
         get SIZE long
         get OFFSET long
         getdstring NAME NMSZ
         
         log NAME OFFSET SIZE
         
         for TEST = 0 == 0
            get TEST byte
         next
         
         savepos POS
         math POS -= 1
         goto POS
         math i += 1
      next j
      
      goto TMP
   endif
next
puggsoy
Posts: 161
Joined: Sat Dec 13, 2014 1:01 am

Re: Beetle Bug .stg

Post by puggsoy »

Updated script to work with Beetle Bug 2 (and hopefully the other games as well). It's probably better for reimporting now as well.