Kamen Rider Battride War FPK comression [PSvita]

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
happydance
Posts: 81
Joined: Sun Jul 10, 2016 11:07 am

Kamen Rider Battride War FPK comression [PSvita]

Post by happydance »

I'm trying to figure out the compression of the .fpk files in attempt to make a fan translation of the game.

I've tried the comtype_scan2 but always freeze on 232.dmp, there's some kind of result with dump 219 (LZFU_RAW) but some parts are still jumbled and unsure if it's right since scan didn't finish. Or maybe it's encrypted? not sure since I'm still learning.

hope someone could help, and thanks!

the header is just 0x20
with
0x0 IDstring FPK2
0x8 I think the extracted size
0x10 file size

here's a sample

https://drive.google.com/open?id=0Byva3 ... jdQMmVqcE0
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Kamen Rider Battride War FPK comression [PSvita]

Post by aluigi »

I guess the TOC is encrypted.
Use offzip -a
happydance
Posts: 81
Joined: Sun Jul 10, 2016 11:07 am

Re: Kamen Rider Battride War FPK comression [PSvita]

Post by happydance »

ah, some of them are zlib, thanks!

btw I should use encryption_scan.bat to figure out the encryption 0x0 to 0x40?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Kamen Rider Battride War FPK comression [PSvita]

Post by aluigi »

no, don't touch the *_scan.bat/bms stuff of quickbms
happydance
Posts: 81
Joined: Sun Jul 10, 2016 11:07 am

Re: Kamen Rider Battride War FPK comression [PSvita]

Post by happydance »

sorry to bother you again, is there anyway to find out the encryption of the TOC to decrypt? some of the files are not properly extracted (only part is extracted)

How do offzip compute the extracted size of an zlib with just knowing the compress size? I was thinking of using quickbms to make a custom table if I could not figure out the TOC.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Kamen Rider Battride War FPK comression [PSvita]

Post by aluigi »

Very shortly, deflate has a tag that tells what's the end of the compressed stream and zlib is a container for the deflate data having a small header and a final crc.
So it's enough to uncompress data till you reach the end of the compressed data or an error.
The zlib library does all the job so you don't even need to know the compressed size.