PS3 Max Payne 3 RPF tool

montcer

Member
Hello,

UPDATED: Find the solution in the 3rd post. Instructions and updated tool there.

I am kinda frustrated here, so please help me with the following 2 matters :(
I have a requested help here, here, and here, with no luck so far.
(The post is kinda long, so I use bold letters for the important matters)

1. To find / build a tool to mod RAGE4 RPF files, more exactly, for the PS3 version of Max Payne 3.
2. To find the key to mod those files.


FIRST: I know that out there are many tools to mod RPF files, but I can't find one that works with Max Payne 3 for the PS3. And no, OpenIV does not work for this version, already tried it.

I did find this tool called rpftool written by a Xentax user called twisted, who was helping another user regarding this subject, several years ago. I did contact him, but he tell me that doesn't have time to help me, hahaha.
I did build his tool with VisualStudio 2012+DevExpress v18 (see attached, release.7z), but I believe I did something wrong when compiling the tool because the dev used DevExpressv12 to write it, and I have v18 which I used to compile it.
So, can someone please help me properly building that tool? Or finding another tool.


SECOND:
In order to mod the RPF files, the encryption key is needed. Twisted stated here that the key can be found at 0x014C6CA4, but in in which file? I believe it should be inside EBOOT.ELF
I did open EBOOT.ELF (after getting it from the EBOOT.BIN) with an HEX editor, and that address takes me to another place.
So, can someone please help me finding the key?


Finally
, if someone who knows how to write in C#, I believe that it can be added to the tool an option to auto find the key if the eboot.elf is located within the same folder.

Thanks in advance for any good soul who is able to help me.
 
Last edited:
UPDATE: Twisted, the author of the rpftool app, told me that his tool is ok, and that the buttons will only be enable if the keys are placed in the keys.ini file, so I only need to find the key to decrypt the RPF files for the PS3!
 
UPDATE 2: Twisted, again, the rpftool author, point me out to find the key. It can be found in the eboot.elf at 0x015119A4 until 0x015119C3! 20 lenght. Also, you will find more useful the tool version attached here, since it bypass the MD5 key verification, and avoid the annoy update message.

Happy modding! :cheerful:
 

Attachments

Hello again!

While modding Max Payne 3 for the PS3, I stumbled across some .SCO files, which seems to be script type files, so how can I open / mod .SCO files for Max Payne for the PS3!? :(

I find this tool called SCO Tool Box. In its source code, it states the following:
Code:
                RegistryKey key;
                if ((key = Registry.LocalMachine.OpenSubKey(Key32)) != null ||
                    (key = Registry.LocalMachine.OpenSubKey(Key64)) != null)
                {
                    dir = key.GetValue(ValueName).ToString();
                    exe = "GTAIV.exe";
                }

                if ((key = Registry.LocalMachine.OpenSubKey(Key32E)) != null ||
                    (key = Registry.LocalMachine.OpenSubKey(Key64E)) != null)
                {
                    dir = key.GetValue(ValueName).ToString();
                    exe = "EFLC.exe";
                }
            }

            return FindKey(dir, exe);

            } catch { return null; }
        }

        private static byte[] FindKey(string gtaPath, string gtaExe)
        {
            gtaExe = Path.Combine(gtaPath, gtaExe);

            try {
                uint[] searchOffsets = {
                                       //EFIGS EXEs
                                       0xA94204 /* 1.0 */, 
                                       0xB607C4 /* 1.0.1 */, 
                                       0xB56BC4 /* 1.0.2 */,
                                       0xB75C9C /* 1.0.3 */,
                                       0xB7AEF4 /* 1.0.4 */,
                                        0xBE1370 /* 1.0.4r2 */,
                                        0xBE6540 /* 1.0.6 */,
                                       0xBE7540 /* 1.0.7 */,
                                       //Russian EXEs
                                       0xB5B65C /* 1.0.0.1 */,
                                       0xB569F4 /* 1.0.1.1 */,
                                       0xB76CB4 /* 1.0.2.1 */,
                                       0xB7AEFC /* 1.0.3.1 */,
                                       //Japan EXEs
                                        0xB8813C /* 1.0.1.2 */,
                                        0xB8C38C /* 1.0.2.2 */,
                                     0xBE6510 /* 1.0.5.2 */,
                                     //EFLC
                                       0xBEF028 /* 1.1.2 */,
                                       0xC705E0 /* 1.1.1 */,
                                       0xC6DEEC /* 1.1.0 */,
                                   };
                const string validHash = "DEA375EF1E6EF2223A1221C2C575C47BF17EFA5E";
                byte[] key = null;

                var fs = new FileStream(gtaExe, FileMode.Open, FileAccess.Read);

                foreach (var u in searchOffsets)
                {
                    if (u <= fs.Length - 32)
                    {
                        var tempKey = new byte[32];
                        fs.Seek(u, SeekOrigin.Begin);
                        fs.Read(tempKey, 0, 32);

                        var hash = BitConverter.ToString(SHA1.Create().ComputeHash(tempKey)).Replace("-", "");
                        if (hash == validHash)
                        {
                            key = tempKey;
                            break;
                        }
                    }
                }

I tried to replace the GTA 4 executable for the Max Payne eboot.elf, and point the program to the key used to open the .rpf, but no, it does not open the .SCO files. I am pretty sure that the .rpf files key can't be the same for the .SCO, but I doubt the program (SCO ToolBox) will work diferent.

Any way, could some expert modder help me out on this? Thanks!
 
UPDATE 2: Twisted, again, the rpftool author, point me out to find the key. It can be found in the eboot.elf at 0x015119A4 until 0x015119C3! 20 lenght. Also, you will find more useful the tool version attached here, since it bypass the MD5 key verification, and avoid the annoy update message.

Happy modding! :cheerful:
Thanks you very much montcer, This program can run on Windows 7? I can not run, it crashed when i open.
 
Thanks you very much montcer, This program can run on Windows 7? I can not run, it crashed when i open.

You are welcome!

It should run, but I noticed that the build version I shared doesn't include some libraries used to compile it. You may need to install these. The program runs for me because I have the programs installed.
 
Back
Top