Previously I made a post in the
Methods Q&A Thread, which you can read here, regarding my unsatisfactory results with "Red Dead Redemption 2", I decided to get to work on a real solution. After some more research
I came across a dump of some partially reverse-engineered code, obtained from a paid modding group's tools. I've used portions of this code-base as the foundation of a project that whilst pretty niche, I'm sure will be of use to one or two users down the road.
In it's current state this project is merely a proof of concept. Currently RPFTool provides a complete framework for the decompression, recompression, and decryption of RPF8 containers, and is able to unpack and decode resource files, baring the hashed filenames.
The key features I'm missing right now is the corresponding encryption logic. I've tried adding the unencrypted flag in the RPF8 header, however this doesn't seem to make a difference, with the outcome of attempting to load these modified/rebuilt RPF8 containers continuing to result in a CTD with a vague error message. Over the last few days I've been attempting to figure out how to extract the AES encryption keys from a memory dump of the title in question, but I've not yet had any success. Attached is both a compiled copy of the latest build as well as the entire source code. A lot of the credit goes to the linked github repo above, I refactored a bit of code to work with my solution but I've only really written a few hundred lines of code.
If anyone is able to provide the encryption logic directly or information which I can use to develop it (maybe I'm overlooking something obvious here), I'll update the project accordingly. It would be nice to have a simple solution for this title, depending on the structure future revisions and the need for support of prior revisions of the RPF container, this tool might
evolve into something more practical. Just thought I'd make a separate thread to push this to a wider audience.