Microsoft Direct x Xof extractor
Posted: Sun Jun 10, 2012 5:28 pm
this will create a cab file you can extract from any compressed . x file.
then just add the proper 0x10 byte header for a uncompressed .x file and it will load no problem.
then just add the proper 0x10 byte header for a uncompressed .x file and it will load no problem.
Code: Select all
the header depends on the file format
most likely
xof 0303txt 0032
or
xof 0303bin 0032
or in hex
78 6F 66 20 30 33 30 33 74 78 74 20 30 30 33 32
or
78 6F 66 20 30 33 30 33 62 69 6E 20 30 30 33 32
http://paulbourke.net/dataformats/directx/
Code: Select all
#quickbms script
set MEMORY_FILE binary "\x4D\x53\x43\x46\x00\x00\x00\x00\x41\x48\x00\x00\x00\x00\x00\x00\x2C\x00\x00\x00\x00\x00\x00\x00\x03\x01\x01\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x3D\x6C\x4B\x20\x00"
get NAME FILENAME
goto 0x3C MEMORY_FILE
append
put NAME string MEMORY_FILE
append
get SIZE asize MEMORY_FILE
string NAME + .cab
putVarChr MEMORY_FILE 0x24 SIZE long
set CHECKSUM 0
set CHUNKCOUNT 0
set USIZE 0
goto 0x14
get tmp2 asize
append
for
goto SIZE MEMORY_FILE
get CSIZE short
get ZSIZE short
putVarChr MEMORY_FILE SIZE CHECKSUM long
math SIZE + 4
putVarChr MEMORY_FILE SIZE ZSIZE short
math SIZE + 2
putVarChr MEMORY_FILE SIZE CSIZE short
math SIZE + 2
savepos OFFSET
goto SIZE MEMORY_FILE
log MEMORY_FILE OFFSET ZSIZE
math OFFSET + ZSIZE
goto OFFSET
math SIZE + ZSIZE
math CHUNKCOUNT + 1
math USIZE + CSIZE
savepos tmp
if tmp == tmp2
append
putVarChr MEMORY_FILE 0x28 CHUNKCOUNT byte
get SIZE asize MEMORY_FILE
putVarChr MEMORY_FILE 0x8 SIZE long
putVarChr MEMORY_FILE 0x2C USIZE long
log NAME 0 SIZE MEMORY_FILE
cleanexit
endif
next