Hello, well as far remember aluigi do this unpacker for IDX files, so my question is if possible update it? the new files no work with this old bms script, maybe can take a look into this files to update this old bms script? well I hope yes many thanks to all community for all support and in special to aluigi for this fully support.
#quickbms sript #幻想神域 Online #http://ff.x-legend.com.tw/# open FDSE pkg.idx get files asize math files - 0x124 math files / 0x250 goto 0x124 for i = 0 < files get FILENUM long get OFFSET long get unk02 long get ZSIZE long get unk04 long get unk05 long get unk06 long get unk07 long get unk08 long get unk09 long get unk10 long get unk11 long get unk12 long get unk13 long get SIZE long getdstring file 0x104 getdstring NAME 0x108 string NAME + file get packfile long get unk15 long if packfile < 10 set pname 0x3030 string pname = pname string pname + packfile set var string "pkg" string var + pname string var + ".pkg" open FDSE var 1 elif packfile < 100 set pname 0x30 string pname = pname string pname + packfile set var string "pkg" string var + pname string var + ".pkg" open FDSE var 1 elif packfile < 1000 set pname "" string pname + packfile set var string "pkg" string var + pname string var + ".pkg" open FDSE var 1 endif if ZSIZE != SIZE clog NAME OFFSET ZSIZE SIZE 1 else log NAME OFFSET ZSIZE 1 endif next i
That IDX doesn't contain information about the PKG data files you provided. For example the first packfile is 9 inside the IDX. Anyway I see no problems in that script, the OFFSET, ZSIZE and SIZE fields seem correct.
In my opinion the KFM files are encrypted/obfuscated. I have checked it and from offset 0x38FB6D of package 323 there is no zlib data, so more than half archive is probbaly encrypted.
I leave here a script that does the same things of the one you posted but is lot shorter, just in case someone wants to edit it:
math OFFSET = 0x124 open FDSE pkg.idx get files asize math files - OFFSET math files / 0x250 goto OFFSET math MYPACKFILE = -1 for i = 0 < files get FILENUM long get OFFSET long get unk02 long get ZSIZE long getdstring DUMMY 40 get SIZE long getdstring file 0x104 getdstring NAME 0x108 string NAME + file get packfile long get unk15 long
if PACKFILE != MYPACKFILE string PCK p= "pkg%03d.pkg" PACKFILE open FDSE PCK 1 math MYPACKFILE = PACKFILE endif if ZSIZE != SIZE clog NAME OFFSET ZSIZE SIZE 1 else log NAME OFFSET ZSIZE 1 endif next i