Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Okami HD - PC File Encrypted

Read or post about compression. And decompression. Or ask questions how to decompress your files.
Post Reply
User avatar
Scorpion2k7
n00b
Posts: 10
Joined: Thu Jan 17, 2013 5:39 pm
Location: Italy
Has thanked: 4 times
Been thanked: 3 times

Okami HD - PC File Encrypted

Post by Scorpion2k7 »

I need help to decrypt Okami HD PC files.
I uploaded an example of an encrypted and decrypted file
You do not have the required permissions to view the files attached to this post.
ffgriever
beginner
Posts: 30
Joined: Fri Dec 15, 2017 5:21 pm
Has thanked: 1 time
Been thanked: 28 times

Re: Okami HD - PC File Encrypted

Post by ffgriever »

It's blowfish with 256bit key. The key had to be (obviously) in the game. I wrote yesterday a tool to decrypt/encrypt it (I'm porting our Polish translation project from PS2 to PC). Don't mind "compress/decompress" in usage, I've copied that part from my another tool ^^. Have fun.

http://ff12.pl/down/okami-encdec.zip

PS. Your encrypted file doesn't match your decrypted file. I guess you either used a memory dump, where pointers might've been overwritten or you've used a files from another system (PS2/WII/PS3).
Acewell
VIP member
VIP member
Posts: 1330
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2710 times
Been thanked: 884 times

Re: Okami HD - PC File Encrypted

Post by Acewell »

ffgriever wrote:It's blowfish with 256bit key. The key had to be (obviously) in the game.
nice work! :D what was the key, if you don't mind me asking? :scaredy:
ffgriever
beginner
Posts: 30
Joined: Fri Dec 15, 2017 5:21 pm
Has thanked: 1 time
Been thanked: 28 times

Re: Okami HD - PC File Encrypted

Post by ffgriever »

AceWell wrote:nice work! :D what was the key, if you don't mind me asking? :scaredy:

Code: Select all

YaKiNiKuM2rrVrPJpGMkfe3EK4RbpbHw
I guess someone was hungry... :D
GMMan
veteran
Posts: 139
Joined: Fri Nov 05, 2010 10:14 pm
Been thanked: 56 times

Re: Okami HD - PC File Encrypted

Post by GMMan »

Quick observation: the actual key is read from the file data_pc/config/flower.cip. It's encrypted with master key

Code: Select all

M2m2sukiYAKIx3pcWgj4Mue3Nh7gapQe
Messing about with some other stuff...
You can run the game with decrypted files by changing the constructor for m2::ResourceReadConfig in hx::SingletonObject<class m2::ResourceReadConfig>::getSingletonInstance(void) (it's the instruction assigning a 1 to a static location near the end of the function, change that to assign 0). The decrypted files need to be in the "data" folder instead of "data_pc". There are also two places you need to patch because apparently someone forgot to turn off a thread when encryption isn't used and it would crash. Search references to m2::ResourceReadConfig::GetUseCipherResource(void) and nop the conditional jump in the last two references. Note you'll need to retain flower.cip even though you don't need to do so usually if they didn't leave that thread running.
Currently researching: Alpha Prime scripting (AI and mods)
Queued: EE .cache repacking, CustomPak repacking, Gameloft Scrambled Zip multitool, GRAF Extractor Skeleton repacking, Gun Metal filenames CRC
ffgriever
beginner
Posts: 30
Joined: Fri Dec 15, 2017 5:21 pm
Has thanked: 1 time
Been thanked: 28 times

Re: Okami HD - PC File Encrypted

Post by ffgriever »

Thanks. Nice finds. It will be helpful for quick changes and testing. To be honest, though, I've never understood this kind of forced and useless code. What was the point? The implementation was simple and didn't take much time, but has certainly cost a measurable amount of money to develop and test. I've got a feeling that it has more to do with board of directors wishes than developers' actual plans.
"- You need to add some protection, you know, that flashy, sparky, magic thing or code or whatever it's called to protect something, wait, assets right, that's what you call it? But make it fast and don't generate any more costs."
(a day has passed)
"- It's protected, see?! This encryption cannot be bruteforced within billions of years!" (then whispering to himself "...but the keys are under the doormat").
"- Jolly good! Now our shareholders will be relieved!"
Just a random rant :D . Even though I enjoy challenge, I'm actually glad it's that obvious this time, as I don't have as much free time to spare as I had 10 or 15 years ago.
GMMan
veteran
Posts: 139
Joined: Fri Nov 05, 2010 10:14 pm
Been thanked: 56 times

Re: Okami HD - PC File Encrypted

Post by GMMan »

It also helps that it literally tells you it's Blowfish.
Currently researching: Alpha Prime scripting (AI and mods)
Queued: EE .cache repacking, CustomPak repacking, Gameloft Scrambled Zip multitool, GRAF Extractor Skeleton repacking, Gun Metal filenames CRC
neuokami
ultra-n00b
Posts: 2
Joined: Tue Oct 01, 2019 5:00 pm

Re: Okami HD - PC File Encrypted

Post by neuokami »

ffgriever wrote: Fri Dec 15, 2017 5:35 pm It's blowfish with 256bit key. The key had to be (obviously) in the game. I wrote yesterday a tool to decrypt/encrypt it (I'm porting our Polish translation project from PS2 to PC). Don't mind "compress/decompress" in usage, I've copied that part from my another tool ^^. Have fun.

http://ff12.pl/down/okami-encdec.zip

PS. Your encrypted file doesn't match your decrypted file. I guess you either used a memory dump, where pointers might've been overwritten or you've used a files from another system (PS2/WII/PS3).
HI, I am a member of the team who have made Chinese localization version of Okami PS2 PS3 and PC. What I have been doing is helping translation, modifying the illustrations. Although the localization process has already been completed and all the texture in the game has been translated as well, I still have some regrets, I want to make Clover logo back in the game, the tech support who provide me the unpacked dds files in my team wouldn't help me with that.

Here is the file name of logo in the opening scene
8A74C5148C436C429FD631EF67ED0EF7:Capcom
171D331CF51A649D37CA2C4C15A3F8B8:Criware
E30ED897FD16CC6607B04DEBCB2D103C:hexa drive

I was wonder if you could tell me where to find these files or how to find .dds in .dat.
Best regards.
You do not have the required permissions to view the files attached to this post.
neuokami
ultra-n00b
Posts: 2
Joined: Tue Oct 01, 2019 5:00 pm

Re: Okami HD - PC File Encrypted

Post by neuokami »

I was foolish, problem solved.
Post Reply