notamuted
Newbie
- May 12, 2018
- 81
- 77
Dude, patreon links! Those are not free, need an account, and patreon site doesn't even work with spyware disabled...Oh, come on! It literrally has "Downloads" section with multiple links
Its free and you don't need an account.Those are not free, need an account, and patreon site doesn't even work with spyware disabled...
Just asking, you're looking for any game with a non-default key? If you tell me how to encrypt the game, I have srpg studio so I can just make a shitty default project and encrypt it.Nope, no random, it seems to use the default "key" key, always. I don't know where the key could be set in the editor (is this a special extra price feature maybe?).
Nope, because you haven't given a download link (your link just leads to a game info page without an actual download link).
The games I could find (not necessarily on f95zone, some are from itchio) and checked are:
- Heelfall
- Netoria Tactics Revolution Carwyn Triumphant
- Azure Orphanage
- GNDH
- FEZG
- Seas of Novis
- Snowbreak
- Tournament of Kings
No custom key among these.
Wow, that would be really awesome!Just asking, you're looking for any game with a non-default key? If you tell me how to encrypt the game, I have srpg studio so I can just make a shitty default project and encrypt it.
I only figured out the first two, I couldn't find any way to set a custom key. I don't think there is a native way to do it. That said, I can always send more projects for testing as needed.Wow, that would be really awesome!
If you could create 4 variants of the default project game that would be invaluable help for reverse engineering how the custom key is stored!
1. one without encryption (for a baseline)
2. one with the default key
3. one with an "abcde" key
4. and finally one with "bcdef" key
The first is needed to establish a baseline (get the plain text version of encryption for that particular SRPG version). The second is needed to rule out false positives, and finally comparing the third and fourth would allow me to locate where and how is the custom key stored in the exported game. For this I would need two known custom keys encrypting the same data.
If you could really create these 4 and upload it on meganz, gofile, pixeldrain (or just attach it here if possible), that would help me a lot and I would be extremely grateful!
About encrypting the game, there's a checkbox on the "Release Project" window. About specifying the key, I have no clue, I couldn't find that in the SRPG manual.
You must be registered to see the links
Thank you very much! Yeah, I couldn't find the custom key input either.I only figured out the first two, I couldn't find any way to set a custom key. I don't think there is a native way to do it. That said, I can always send more projects for testing as needed.You must be registered to see the links
I've checked these...I only figured out the first two, I couldn't find any way to set a custom key. I don't think there is a native way to do it. That said, I can always send more projects for testing as needed.You must be registered to see the links
I assume it would be possible via plugin similar to rpg maker. I dont know much about scripting I just have SRPG studio. Thanks to the thingie you linked I was actually able to open and edit Heelfall and Loyal Demise, though the latter is only in Chinese for some reason? (even if I load the English translated version)Thank you very much! Yeah, I couldn't find the custom key input either.
Anyway, I've implemented what I could, from now on GAME RIPPER can rip SRPG Studio games too!
If you're more specific I can do that, justaplayer asked me to do it with the default project.I've checked these...
1) Can you next time add into the projects some images? It seems these projects contain only *.js script files and 'Project.srpg' file. From which only the latter is encrypted.
2) Assuming 'unencrypt' is indeed not encrypted and for both these projects 'Project.srpg' files are identical - I conclude that 'encrypt' project is encrypted using non-default key.
I suspect it has something to do with srpg studio version. They might have changed the encryption key from known "key", to another one (possibly randomly generated)
I have also run into a data.dts file in which the "encrypted flag" is set, yet "Project.srpg" seems to be clear text (same as in an unencrypted data.dts). The file version is 0x4DE, so relatively new.I've checked these...
1) Can you next time add into the projects some images? It seems these projects contain only *.js script files and 'Project.srpg' file. From which only the latter is encrypted.
2) Assuming 'unencrypt' is indeed not encrypted and for both these projects 'Project.srpg' files are identical - I conclude that 'encrypt' project is encrypted using non-default key.
That's quite possible. Could you please change your C++ code so that in section "3. Getting the key/bitstream" it would save not just the keystream but the original key (the 16 bytes long, an MD5 of something) as well? The thing is, I've already implemented this in GR, you could rip a game with a custom key "gameripper.exe -k (arc4 key)" where that arc4 key is 16 bytes of hex values.I suspect it has something to do with srpg studio version. They might have changed the encryption key from known "key", to another one (possibly randomly generated)
Not sure about Chinese, but it seems that newer SRPG has some sort of localization support. I guess this is buggy? FYI, only the texts are localized, so if you extract a game with GR, the filenames and the comments in scripts won't change, no matter the locale.I assume it would be possible via plugin similar to rpg maker. I dont know much about scripting I just have SRPG studio. Thanks to the thingie you linked I was actually able to open and edit Heelfall and Loyal Demise, though the latter is only in Chinese for some reason? (even if I load the English translated version)
Yes, because I did not know then that Project.srpg isn't always encrypted.If you're more specific I can do that, justaplayer asked me to do it with the default project.
def decrypt_asset(input_buf:bytes,_:str)->bytes:
h = MD5.new()
pwd= bytes([0x90, 0x51, 0xCA, 0xE7, 0x42, 0xF3, 0x95, 0xFC, 0x5C, 0x5A, 0xAE, 0x6F, 0xAF, 0x83, 0x01, 0xF8])
h.update(pwd)
key = h.digest()
cipher = ARC4.new(key)
decrypted_data = cipher.decrypt(input_buf)
return decrypted_data
Also I tested it with your tool and it seems to work as well. I took `hashlib.md5(pwd).hexdigest()` and inserted it into the custom key field (F2 button).I've already implemented this in GR, you could rip a game with a custom key "gameripper.exe -k (arc4 key)" where that arc4 key is 16 bytes of hex values.
So, I too kindly ask you to provide a srpg project with stored assets (images, etc).If you're more specific I can do that, justaplayer asked me to do it with the default project.
View attachment advpro32_dumps_md5input.zip I've attached "advpro32_dumps_md5input.zip" to this comment. It dumps the data passed to 'CryptHashData' call with 2x length as `dumphashinput_31.bin`. (i.e. it will dump fill "keyset" instead of the actually used "key").Could you please change your C++ code so that in section "3. Getting the key/bitstream" it would save not just the keystream but the original key (the 16 bytes long, an MD5 of something) as well?
Nice!The 'Project.srpgs' file stored in data.dts is encrypted using the key "_dyn" (the first half from "_dynamic").
The first 16 bytes of Project.srpg are 100% the same as the last 16 bytes of system.dat, and I've also tried these without luck (I couldn't test Oathbraker sadly). This was my first though too btw.And the actual resources are encrypted using a different key. That key is the first 16 bytes of decrypted/unencrypted "Project.srpgs" file. These bytes are directly fed to MD5 algorithm like this:
I have also tried this, but didn't work for me. Admittedly I couldn't get my hands on any custom key games at all, so this is promising!I tested this approach on oathbreaker game and it seems to be working. But I want test it on more srpgs games to be 100% sure.
Thank you for your feedback! I'm glad it worked! So you are certain that the custom key is MD5(creator uuid)? Awesome!Also I tested it with your tool and it seems to work as well. I took `hashlib.md5(pwd).hexdigest()` and inserted it into the custom key field (F2 button).
I don't understand, this seems pointless. It should output the hKey (or maybe the hHash?) argument to ARC4 function CryptDecrypt (so the same that you've tried with GR's F2 and worked). We are interested in the ARC4's key, regardless of how it is constructed (MD5 of "key", "_dyn", creator uuid or whatever). We need the key as it is passed to CryptDecrypt, because knowing that we can generate the entire keystream.I've attached "advpro32_dumps_md5input.zip" to this comment. It dumps the data passed to 'CryptHashData' call with 2x length as `dumphashinput_31.bin`. (i.e. it will dump fill "keyset" instead of the actually used "key").
I confirm. These are exactly the same bytesCould you please confirm that Oathbreaker's system.dat file is indeed contains 0x53, 0x44, 0x41, 0x54, 0x00, 0x00, 0x00, 0x00, 0x90, 0x51, 0xCA, 0xE7, 0x42, 0xF3, 0x95, 0xFC, 0x5C, 0x5A, 0xAE, 0x6F, 0xAF, 0x83, 0x01, 0xF8? (That's 4 bytes "SDAT" magic, 4 bytes zeros, and 16 bytes same as the decrypted Project.srpg's first 16 bytes).
I am not sure about creator uuid (I don't know what these bytes are), but the custom key is indeed is md5 from these 16 bytes.Thank you for your feedback! I'm glad it worked! So you are certain that the custom key is MD5(creator uuid)? Awesome!
It outputs pbData passed to CryptHashData (md5 input - i.e. these 16 bytes, the default 'key' key, etc...).I don't understand, this seems pointless. It should output the hKey (or maybe the hHash?) argument to ARC4 function CryptDecrypt (so the same that you've tried with GR's F2 and worked). We are interested in the ARC4's key, regardless of how it is constructed (MD5 of "key", "_dyn", creator uuid or whatever). We need the key as it is passed to CryptDecrypt, because knowing that we can generate the entire keystream.
Thanks. I succesfully decrypted and extracted all 8 stored images.You must be registered to see the links
I added 8 random images from heelfall here. I also included what the project folder looks like before deploying it.
Well, that's what the SRPG manual says (I am not sure about creator uuid (I don't know what these bytes are), but the custom key is indeed is md5 from these 16 bytes.
Not sure about that, I think the "handle" is just a simple struct pointer. But okay.hKey and hHash are handles of uknown type, so they can't be dumped. I believe the thing you want is stored inside wincrypt and cannot be accessed by regular means.
Yup. It worksWell, that's what the SRPG manual says (You must be registered to see the links)
system.dat
This file contains a value that uniquely identifies the creator of the project.
And because it's 16 bytes long, it's safe to call it UUID (Universally Unique IDentifier, but MS likes to call it GUID, Globally Unique IDentifier).
Not sure about that, I think the "handle" is just a simple struct pointer. But okay.
Anyway, I've implemented your method in GR, it should work work with Oathbreaker too. Could you give it a spin and report back? I double checked the code, but I couldn't test it myself.
Unfortunately I can't see anything on those outputs because they use some weird codepage. Multiple subfolders shouldn't be a problem, I've tested that and it works.It seems Gameripper misses some images and can't properly process foldered(?) images (extracts only the first file). I've attached `tree` outputs for both results.
The files appear broken if opened in browser. If you download them and open in notepad or other text editor they'll look normal.Unfortunately I can't see anything on those outputs because they use some weird codepage.
SureCould you please run it as "gameripper.exe -vvv" and attach the generated gameripper.log file here?
Thank you very much for your feedback and the provided logs! Thanks to that, I was able to figure out what's going on.The files appear broken if opened in browser. If you download them and open in notepad or other text editor they'll look normal.
Sure