DaZombieKiller / FatePackageManager

Extract and repack FPD packages from Fate/stay night REMASTERED
MIT License
9 stars 2 forks source link

Maybe this will help for epk unpack research #1

Closed kurikomoe closed 1 month ago

kurikomoe commented 2 months ago

https://github.com/kurikomoe/FSNr_tools

I dumped the code from ida. It could decrypt most epks.

during my reverse engineering, some code runs into dec function with "17:32:24" as key, I think them are related to database or something, as the vtable shows.

DaZombieKiller commented 2 months ago

I looked into EPK files briefly, but didn't get very far. This is what I know currently:

struct epk_file
{
    char data[]; // variable length
    char unknown[0x20];
    char md5[0x10];
};

The MD5 hash is computed from data with the ASCII string 8FE9D249BD2689BB4B70F5AE88A9E645 appended. Blowfish encryption seems to be used for data, and the key is the name of the EPK file without its extension.

That's about as far as I got.