Code:
# Mega Man X: Command Mission
# script for QuickBMS http://quickbms.aluigi.org
endian big
get ASIZE asize
for OFFSET = 0 < ASIZE
goto OFFSET
math NAMELEN = 8
math DONE = 0
do
get TEST byte
if TEST != 0
goto -1 0 SEEK_CUR
DONE = 1
else
math NAMELEN -= 1
endif
while DONE != 1
getdstring NAME NAMELEN
get FLAG1 short
get FLAG2 short
get SIZE long
goto 16 0 SEEK_CUR
savepos OFFSET
string NAME += "."
string NAME += FLAG1
string NAME += "_"
string NAME += FLAG2
log NAME OFFSET SIZE
math OFFSET += SIZE
next