Display MoreDestro, the genius behind Wingloader, has made the first public release of RegFaker, a registry patch for Wing Commander Prophecy and Secret Ops. Destro says:
RegFaker - A Registry Patch for Wing Commander Prophecy & Secret Ops
Current Version: v0.1
Hey, I figured I'd share this here to see what the reception is.
I've created a RegFaker.dll that hooks ADVAPI32.dll that stores the functions that the games use to access registry items for the games. Upon first launch it will dump the registry items to a RegFaker.ini. This gives the user the ability to add custom codes such as {Location} that returns current working directory, this will essentially make Wing Commander Prophecy and Secret Ops portable applications so that the games folder can be renamed and moved around on the drive without breaking the installation.
I did this specifically for Proton and Linux compatibility with Wing Loader and for my own general amusement to learn function hooking via .dll and ghidra better. 😝
Usage
*Install the game normally so it has valid registry keys.
1. Open the game executable in a hex editor such as "HxD", search for `ADVAPI32.DLL` and rename to `REGFAKER.DLL`. (Do the same with Launcher.exe and/or Setup.exe)
2. Save the modified binary.
3. Place `RegFaker.dll` next to the executable.
4. Run the game (and launcher.exe & setup.exe to get all codes); when it exits, there will be a file `RegFaker.ini` containing all registry values the program used. (In the same format as a RegEdit Export)
5. Open .ini and add any custom codes (listed below) and save the .ini file.
6. The game will now use the RegFaker.ini file instead of the Window Registry.
Custom codes
1. {Location} - This will return the current working directory *Note the \\ as {Location} does not include them
[HKEY_LOCAL_MACHINE\Software\Origin Systems\Wing Commander Prophecy]
"Installed To:"="{Location}\\"
2. {Ignore} - Will ignore any local items in that section after that point and fetch from the real registry instead. *Used for things like DirectX Version and things that you actually want to get from the registry.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX]
"{Ignore}"
[HKEY_CURRENT_USER\Control Panel\Mouse]
"{Ignore}"
3. {Lock} - This will lock the keys in the local RegFaker.ini so that the game cannot overwrite them after custom code are added.
[HKEY_LOCAL_MACHINE\Software\Origin Systems\Wing Commander Prophecy]
"{Lock}"
"Installed From:"=".\\"
"Install Size:"=dword:00000002I'll be completely honest: in spite of that excellent description, I have no real understanding of what this is or even really what it does. But that's on my limited brain. If you ARE someone that does know, the fact that Destro is behind it means that this is certainly the one of these you've been waiting for. You can find the latest version and follow development in this thread.
- RegFaker v0.1 (18K, .zip)