Star Wars: Episode III: Revenge of the Sith *.hsh/*.pk2
Posted: Fri Oct 01, 2010 8:09 pm
Hi everybody!
I just wrote a script that extracts the files from the two big PK2 containers using the HSH information file. Use the script on the HSH.
Hope I could help someone with this.
I just wrote a script that extracts the files from the two big PK2 containers using the HSH information file. Use the script on the HSH.
Hope I could help someone with this.
Code: Select all
open FDSE "PS2PAK_0.PK2" 1
open FDSE "PS2PAK_1.PK2" 2
get FSIZE asize
DO
getCT NAME string 0x20
getDstring FILE 1
get DUMMY byte
getCT SIZE string 0x20
set NUM SIZE
callfunction STR2NUM 1
set SIZE NUM
getCT OFFSET string 0x0D
set NUM OFFSET
callfunction STR2NUM 1
set OFFSET NUM
get DUMMY byte
savepos MYOFF
if FILE == "0"
log NAME OFFSET SIZE 1
elseif FILE == "1"
log NAME OFFSET SIZE 2
endif
WHILE MYOFF != FSIZE
startfunction STR2NUM
set TONUM 0
strlen l NUM
for i = 0 < l
set EXP l
math EXP -= i
math EXP -= 1
set B 0xA
math B p EXP
getVarChr T NUM i
math T -= 0x30
math T *= B
math TONUM += T
next i
set NUM TONUM
endfunction