Hi i'm making a bms script to extract files from the rpk archives and i can get a full extraction with what i have here so far but i'm having trouble with the string matching algorithm and i have reached a point where i can go no further. i have names disabled for now but i think the 2nd table might be the key but not sure.
# script for QuickBMS http://aluigi.altervista.org/quickbms.htm
idstring "\x52\x6F\x6E\x69\x6E\x20\x50\x61\x6B\x46\x69\x6C\x65\x0D\x0A\x00" get TBL1_OFF long goto TBL1_OFF 0 seek_cur get ZERO long get NUM_TBL1_ENTRIES long for i = 0 < NUM_TBL1_ENTRIES get NUM long get STR_SZ long getdstring NAME STR_SZ next i goto 0x18 0 seek_cur get NUM_TBL2_ENTRIES long for i = 0 < NUM_TBL2_ENTRIES getdstring UNK 0x1c next i get NUM_TBL3_ENTRIES long for i = 0 < NUM_TBL3_ENTRIES getdstring UNK2 0x18 get OFFSET long get SIZE long log "" OFFSET SIZE next i
any help here regarding name matching is appreciated.
This is the max I can do: http://aluigi.org/bms/ronin_pakfile.bms The duplicate names are probably right because they are meant to be resource names and not files... mah
thank you for the attempt but it breaks on the larger samples. i think maybe if i stare at it long enough i can figure it out, i might just try to skip folders and just get file names instead.
edit the duplicate named files are okay i think because they are meant to sit inside different folders. i think i see the pattern, will update my script when i get it working or i may just use python for this.