Code: Select all
findloc OFFSET string "MDL4"
do
goto OFFSET
get DUMMY long
findloc NEXT_OFFSET string "MDL4" 0 ""
if NEXT_OFFSET == ""
get SIZE asize
else
math SIZE = NEXT_OFFSET
endif
math SIZE -= OFFSET
log "" OFFSET SIZE
math OFFSET = NEXT_OFFSET
while NEXT_OFFSET != ""
With this script, the file is divided by the desired type, but it looks for only one type of file and the other types are concatenated together with the extracted files.
Is it possible to extract all types of files separately or to ensure that the script does not include the other types in the extracted files?
Each file type is separated by empty bytes. I will attach an example of a file extracted by the script, where it is possible to find the other file types (MDL4, MTX, MOT).
I thank you for your help!