So I think that the solution is edit script every time before extraction new file - it's not a problem. How do you know where the table has starting? Could you give please a tip?DKDave wrote: ↑Tue May 04, 2021 11:26 pm Having looked at the other samples, some of them don't fit the logic of my script. Some of them have the file table starting in a slightly different place. There's no obvious offset to the start of this table because the logic used doesn't always work, so I'm stumped on how to calculate it accurately for every file.
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Spider Man 3 XBOX 360
-
- beginner
- Posts: 26
- Joined: Tue Dec 22, 2020 10:23 pm
- Has thanked: 10 times
Re: Spider Man 3 XBOX 360
- DKDave
- ultra-veteran
- Posts: 357
- Joined: Mon May 06, 2019 6:07 pm
- Location: On board the USS Callister
- Has thanked: 9 times
- Been thanked: 167 times
Re: Spider Man 3 XBOX 360
The way it was calculated was to look for the hex sequence 0xa1a1a1a1 and subtract the size of the file table to get the start, but this didn't always work. The file table usually starts at 0x394 in GAME.XEPACK, 0x368 in GAME.PCPACK, somewhere after the string of 0x01 bytes. In LOCATION_BLACK_CAT_1.XEPACK, the file table starts at 0x3c0.
I see a vision rising, dreary, Fading in as children play twilight games, In the town called Ordinary, An eye of light reveals a gateway to doomsday
-
- beginner
- Posts: 26
- Joined: Tue Dec 22, 2020 10:23 pm
- Has thanked: 10 times
Re: Spider Man 3 XBOX 360
Hmm, okay, I understand how to calculate where table is starting, thanks. But how to decide where ENTRIES must start?DKDave wrote: ↑Thu May 06, 2021 7:41 pm The way it was calculated was to look for the hex sequence 0xa1a1a1a1 and subtract the size of the file table to get the start, but this didn't always work. The file table usually starts at 0x394 in GAME.XEPACK, 0x368 in GAME.PCPACK, somewhere after the string of 0x01 bytes. In LOCATION_BLACK_CAT_1.XEPACK, the file table starts at 0x3c0.
Code: Select all
Goto 0x54
Get ENTRIES Long
Get TEMPNAME basename
- DKDave
- ultra-veteran
- Posts: 357
- Joined: Mon May 06, 2019 6:07 pm
- Location: On board the USS Callister
- Has thanked: 9 times
- Been thanked: 167 times
Re: Spider Man 3 XBOX 360
The location of entries is always at 0x54, or at least it is in all of your samples.
I see a vision rising, dreary, Fading in as children play twilight games, In the town called Ordinary, An eye of light reveals a gateway to doomsday
-
- beginner
- Posts: 26
- Joined: Tue Dec 22, 2020 10:23 pm
- Has thanked: 10 times
Re: Spider Man 3 XBOX 360
So what string in script I need to change for taking account the starting of the table? (0x349 for one file and 0x3c0 for other)
- DKDave
- ultra-veteran
- Posts: 357
- Joined: Mon May 06, 2019 6:07 pm
- Location: On board the USS Callister
- Has thanked: 9 times
- Been thanked: 167 times
Re: Spider Man 3 XBOX 360
If you delete the following line:
XMath ENTRY "OFFSET - (ENTRIES * 0x10)"
And replace it with:
Math ENTRY = 0x3c0 (or whatever it is)
XMath ENTRY "OFFSET - (ENTRIES * 0x10)"
And replace it with:
Math ENTRY = 0x3c0 (or whatever it is)
I see a vision rising, dreary, Fading in as children play twilight games, In the town called Ordinary, An eye of light reveals a gateway to doomsday
-
- beginner
- Posts: 26
- Joined: Tue Dec 22, 2020 10:23 pm
- Has thanked: 10 times
Re: Spider Man 3 XBOX 360
OMG, YES!! It really works! This string is working for most of all other files!
Code: Select all
Math ENTRY = 0x3c0
Now I got the last problem, It looks like you solved at the first time. There is script that decrypts NCH PCPACK to clean PCPACK:
Code: Select all
comtype lzo1x
get PCPACK_SIZE asize
log MEMORY_FILE 0 0
append 1
for i = 0
savepos TMP_OFF
if TMP_OFF == PCPACK_SIZE
break
endif
idstring "NCH\0"
get ZSIZE long
get DUMMY_CRC long
get SIZE long
get XOFFSET long
get DUMMY_CRC long
get XSIZE long
get ZIP long
savepos OFFSET
goto XOFFSET MEMORY_FILE
if ZIP == 0
log MEMORY_FILE OFFSET ZSIZE
else
clog MEMORY_FILE OFFSET ZSIZE SIZE
endif
math TMP_OFF + XSIZE
goto TMP_OFF
padding 0x1000
next i
append
get NAME basename
get SIZE asize MEMORY_FILE
log NAME 0 SIZE MEMORY_FILE
Sample of PCPACK with NCH encryption: https://mega.nz/file/IN8lUKza#cRwyOzfK5 ... AOvTA_D3RU
Sample of XEPACK with NCH encryption: https://mega.nz/file/IclnEAgB#0bmDGxpBB ... JfP8QNaXiQ
Could you pleace check it? I will be soooo appreciative of it
- DKDave
- ultra-veteran
- Posts: 357
- Joined: Mon May 06, 2019 6:07 pm
- Location: On board the USS Callister
- Has thanked: 9 times
- Been thanked: 167 times
Re: Spider Man 3 XBOX 360
Yes, if you add the following line at the very start of the script, it will decompress the NCH.XEPACK files:
Endian Big
It looks like that's the only change needed, at least for the XEPACK sample, so it should work fine with the others.
Endian Big
It looks like that's the only change needed, at least for the XEPACK sample, so it should work fine with the others.
I see a vision rising, dreary, Fading in as children play twilight games, In the town called Ordinary, An eye of light reveals a gateway to doomsday
-
- beginner
- Posts: 26
- Joined: Tue Dec 22, 2020 10:23 pm
- Has thanked: 10 times
-
- beginner
- Posts: 26
- Joined: Tue Dec 22, 2020 10:23 pm
- Has thanked: 10 times
Re: Spider Man 3 XBOX 360
And also it has appeared new problem. I asked Aluigi if he could upgrade his script (also for working with *36 files). He made it, and script extract all files, but they were empty. Right names, but without extension and empty. After my question he thought and said that it's impossible and better try to use hex2obj.
Maybe you ever encountered with this?
There is original script to extract textures for PC:
Code: Select all
# script for QuickBMS http://aluigi.org/papers.htm#quickbms
//idstring "APKF"
findloc PHYS string "PHYS"
goto PHYS
savepos TMP
goto 0x14 0 SEEK_CUR
get infoOffset long
xmath OFFSET "infoOffset + TMP + 0x14"
goto 0x1c
findloc TEX binary "\x54\x45\x58\x00"
goto TEX
goto 0xc 0 SEEK_CUR
savepos TMP1
get tableLoc long
get FILES long
math tableLoc + TMP1
goto tableLoc
for i = 0 < FILES
savepos TMP2
get nameOffset long
math nameOffset + TMP2
get hash long
get type long
get SIZE long
savepos TMP3
goto nameOffset
get NAME string
findloc hashID long hash
goto hashID
goto 0xc 0 SEEK_CUR
get WIDTH long
get HEIGHT long
goto 8 0 SEEK_CUR
get FORMAT long //14, 15, 32, 33 ,DXT1, DXT3, DXT5
if FORMAT == 0x31545844 //DXT1
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\xAA\xAA\xAA\xAA\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x04\x00\x00\x00\xDD\xDD\xDD\xDD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
putVarChr MEMORY_FILE 0x54 FORMAT long
string NAME + ".dds"
log NAME 0 0x80 MEMORY_FILE
elif FORMAT == 0x33545844 //DXT3
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\xAA\xAA\xAA\xAA\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x04\x00\x00\x00\xDD\xDD\xDD\xDD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
putVarChr MEMORY_FILE 0x54 FORMAT long
string NAME + ".dds"
log NAME 0 0x80 MEMORY_FILE
elif FORMAT == 0x35545844 //DXT5
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\xAA\xAA\xAA\xAA\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x04\x00\x00\x00\xDD\xDD\xDD\xDD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
putVarChr MEMORY_FILE 0x54 FORMAT long
string NAME + ".dds"
log NAME 0 0x80 MEMORY_FILE
elif FORMAT == 0x14 //RGB
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\xAA\xAA\xAA\xAA\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
string NAME + ".dds"
log NAME 0 0x80 MEMORY_FILE
elif FORMAT == 0x15 //ARGB
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\xAA\xAA\xAA\xAA\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\xFF\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
string NAME + ".dds"
log NAME 0 0x80 MEMORY_FILE
elif FORMAT == 0x32 //L8 (R8)
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\xAA\xAA\xAA\xAA\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x08\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
string NAME + ".dds"
log NAME 0 0x80 MEMORY_FILE
elif FORMAT == 0x33 //A8L8 (A8 R8)
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\xAA\xAA\xAA\xAA\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x01\x00\x02\x00\x00\x00\x00\x00\x10\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
string NAME + ".dds"
log NAME 0 0x80 MEMORY_FILE
else
print "Wrong offset, so we try again!"
findloc hashID long hash
goto hashID
print "%hashID|h% :hashid"
goto 0xc 0 SEEK_CUR
get WIDTH long
print "%width|hex% :width"
get HEIGHT long
print "%height|hex% :height"
goto 8 0 SEEK_CUR
get FORMAT long //15, 32, 33 ,DXT1, DXT3, DXT5
print "%FORMAT|hex% :format"
if FORMAT == 0x31545844
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\xAA\xAA\xAA\xAA\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x04\x00\x00\x00\xDD\xDD\xDD\xDD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
putVarChr MEMORY_FILE 0x54 FORMAT long
string NAME + ".dds"
log NAME 0 0x80 MEMORY_FILE
elif FORMAT == 0x33545844
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\xAA\xAA\xAA\xAA\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x04\x00\x00\x00\xDD\xDD\xDD\xDD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
putVarChr MEMORY_FILE 0x54 FORMAT long
string NAME + ".dds"
log NAME 0 0x80 MEMORY_FILE
elif FORMAT == 0x35545844
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\xAA\xAA\xAA\xAA\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x04\x00\x00\x00\xDD\xDD\xDD\xDD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
putVarChr MEMORY_FILE 0x54 FORMAT long
string NAME + ".dds"
log NAME 0 0x80 MEMORY_FILE
elif FORMAT == 0x14 //RGB8 (24)
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\xAA\xAA\xAA\xAA\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
string NAME + ".dds"
log NAME 0 0x80 MEMORY_FILE
elif FORMAT == 0x15 //ARGB8 (32)
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\xAA\xAA\xAA\xAA\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\xFF\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
string NAME + ".dds"
log NAME 0 0x80 MEMORY_FILE
elif FORMAT == 0x32 //L8 (R8)
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\xAA\xAA\xAA\xAA\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x08\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
string NAME + ".dds"
log NAME 0 0x80 MEMORY_FILE
elif FORMAT == 0x33 //A8L8 (A8 R8)
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\xAA\xAA\xAA\xAA\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x01\x00\x02\x00\x00\x00\x00\x00\x10\x00\x00\x00\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
string NAME + ".dds"
log NAME 0 0x80 MEMORY_FILE
endif
endif
append
log NAME OFFSET SIZE
append
math OFFSET + SIZE
goto TMP3
next i
Code: Select all
# APKF (script 0.1a)
idstring "APKF"
get DUMMY long
get ZERO long # 0 or 4 (xbox?)
get DUMMY long # -1
get DUMMY long # 2
endian guess DUMMY
savepos TMP
get OFFSET long
math OFFSET + TMP
get ZERO long
math MAX_TYPES = 4
for TYPE = 0 < MAX_TYPES
getdstring PATH 4
get DUMMY long
get STRUCT_TYPE long
savepos TMP
get INFO_OFF long
math INFO_OFF + TMP
get FILES long
get DUMMY5 long
get FLAGS long
savepos BACKUP_OFF
goto INFO_OFF
for i = 0 < FILES
savepos TMP
get NAME_OFF long
math NAME_OFF + TMP
get CRC long
get SIZE long
if STRUCT_TYPE == 1
elif STRUCT_TYPE == 2
get DUMMY long
else
print "Error: unknown structure %STRUCT_TYPE%, contact me"
cleanexit
endif
savepos TMP
goto NAME_OFF
get NAME string
goto TMP
string NAME p "%s/%s" PATH NAME
log NAME OFFSET SIZE
math OFFSET + SIZE
next i
goto BACKUP_OFF
next TYPE
- DKDave
- ultra-veteran
- Posts: 357
- Joined: Mon May 06, 2019 6:07 pm
- Location: On board the USS Callister
- Has thanked: 9 times
- Been thanked: 167 times
Re: Spider Man 3 XBOX 360
I've had a look, but I'm not sure either. It's a bit of a weird format, but as Luigi says, sometimes if the format can't be worked out properly then you might need to extract the files manually with a hex editor.
I see a vision rising, dreary, Fading in as children play twilight games, In the town called Ordinary, An eye of light reveals a gateway to doomsday
-
- beginner
- Posts: 26
- Joined: Tue Dec 22, 2020 10:23 pm
- Has thanked: 10 times
Re: Spider Man 3 XBOX 360
Yeah, I tried to find the way to extract textures from hex. The only way I found is TextureFinder, but it doesn't work right with this files. I know about hex2obj, but it's extracting only meshes, isn't it?
If you could give an advise how to understand where texture starts, ends and how to calculate size so I can try to find needed strings and separate them to textures.
Or maybe you know another way to extract it using hex?