Trying to figure out FPK

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
ThatTrueStruggle
Posts: 20
Joined: Tue Nov 17, 2015 12:11 am

Trying to figure out FPK

Post by ThatTrueStruggle »

https://www.dropbox.com/s/mllle878kpqykew/ui.fpk?dl=0
Is there a repacker/unpacker for the FPK files that actually works? Spent all of yesterday looking for one and found one but it didn't repack properly.

(hell id write one if i knew what the first 4 bytes were/compression type, looks like LZSS)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Trying to figure out FPK

Post by aluigi »

It's not an archive and I'm not sure if it's really compressed (yeah I see a sort of ZSIZE and SIZE), anyway I don't know what's the compression algorithm.
My suggestion: post name of the game and platform.
ThatTrueStruggle
Posts: 20
Joined: Tue Nov 17, 2015 12:11 am

Re: Trying to figure out FPK

Post by ThatTrueStruggle »

The game is Naruto Shippuden: Gekitou Ninja Taisen Special, for the Wii.

Code: Select all

0x00 - 0x04 = unknown
0x04 - 0x08 = file count
0x08 - 0x0C = entry start
0x0C - 0x10 = file size

for file count
   filename, null terminated = 0x24
   offset, = 0x04
   compressed size = 0x04
   uncompressed size = 0x04
   
   compressed data = compressed size


you can see the header for U8 data which is uncompressed, however the data for it is compressed with something
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Trying to figure out FPK

Post by aluigi »

Code: Select all

endian big
comtype PRS_8ING
get DUMMY long
get DUMMY long  # 1
get DUMMY long
get FPK_SIZE long
getdstring NAME 0x24
get OFFSET long
get ZSIZE long
get SIZE long
clog NAME OFFSET ZSIZE SIZE
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Trying to figure out FPK

Post by aluigi »

Ah, then you can use http://aluigi.org/bms/kirby_epic_yarn.bms on the decompressed arc file.
ThatTrueStruggle
Posts: 20
Joined: Tue Nov 17, 2015 12:11 am

Re: Trying to figure out FPK

Post by ThatTrueStruggle »

How would I go about reimporting the edited files?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Trying to figure out FPK

Post by aluigi »

The arc format parsed by kirby_epic_yarn.bms is complex with files extracted even from the memory_file, so no reimporting.
The fpk file instead can be probably removed and using directly the extracted arc with its full path, I have no recompression function for the prs_8ing algorithm.