Created
June 15, 2016 17:15
-
-
Save ccawley2011/e3469eb11462ac45429bb67bedd97f8e to your computer and use it in GitHub Desktop.
QuickBMS script to unpack archives in 4Mation games
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 4Mation archive unpacker | |
# By Cameron Cawley | |
IDString "BIIK-DJC" | |
get ARCHIVE_SIZE asize | |
goto 20 | |
get FILEINDEX long | |
goto FILEINDEX | |
get TEMP long | |
get INDEXSIZE long | |
get HEADERSIZE long | |
getct INDEXNAME string 0 | |
padding 4 | |
math FILEINDEX += HEADERSIZE | |
do | |
get ENTRYSIZE long | |
get OFFSET long | |
getct NAME string 0 | |
padding 4 | |
math FILEINDEX += ENTRYSIZE | |
goto OFFSET | |
get TYPE long | |
get SIZE long | |
get HEADSIZE long | |
math SIZE -= HEADSIZE | |
math OFFSET += HEADSIZE | |
getct NAME string 0 | |
padding 4 | |
if TYPE == 11 | |
string NAME += ",aff" | |
elif TYPE == 2 | |
string NAME += ",cb6" | |
else | |
string NAME += ",ffd") | |
endif | |
log NAME OFFSET SIZE | |
goto FILEINDEX | |
while FILEINDEX < ARCHIVE_SIZE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment