Important information: this site is currently scheduled to go offline indefinitely by December 1st 2023.
If you wish to donate to attempt the preservation of tools and software somewhere else before it goes down, check the GoFundMe
If you wish to donate to attempt the preservation of tools and software somewhere else before it goes down, check the GoFundMe
Scarlet Legacy
-
finale00
- M-M-M-Monster veteran

- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 861 times
-
WRS
- ultra-veteran

- Posts: 603
- Joined: Fri Nov 06, 2009 12:13 am
- Has thanked: 74 times
- Been thanked: 301 times
Re: Scarlet Legacy
you know what's annoying? i can parse the entire file - but trying to label one last 2 bytes value which has no obvious purpose ..... 
Useful tool links:
-
finale00
- M-M-M-Monster veteran

- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 861 times
-
WRS
- ultra-veteran

- Posts: 603
- Joined: Fri Nov 06, 2009 12:13 am
- Has thanked: 74 times
- Been thanked: 301 times
Re: Scarlet Legacy
nice simple example of recursion
i only downloaded 2 samples - and the login sample contains more compressed data
i only downloaded 2 samples - and the login sample contains more compressed data
Code: Select all
# Scarlet Legacy PAK files
# script for QuickBMS
# WRS, xentax.com
idstring "PAK\0"
get ver byte
getdstring DUMMY 16
get headSize long
get cdOffset long
get cdSize long
get cdZSize long
get dataStart long
get dataSize long
get fileSize long
clog MEMORY_FILE cdOffset cdZSize cdSize
set base string ""
callfunction recursiveDir
cleanexit
startfunction recursiveDir
get subFils long MEMORY_FILE
get subDirs long MEMORY_FILE
get dirName string MEMORY_FILE
# quick fix for the initial dir
if dirName != "/"
string base += /
string base += dirName
endif
for subd = 0 < subDirs
callfunction recursiveDir
next subd
for subf = 0 < subFils
callfunction extractFile
next subf
endfunction
startfunction extractFile
get fileOffs long MEMORY_FILE
get fileSize long MEMORY_FILE
get fileName string MEMORY_FILE
math fileOffs += dataStart
set filePath string base
string filePath += /
string filePath += fileName
log filePath fileOffs fileSize
endfunction
Useful tool links:
