-
-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPGVX ends up broken #101
Comments
Hello there, I don't own this game so it's a bit rough to fully debug this title with just the exe. However, I do believe I have found the issue but at this time I am not able to fix it within Steamless. (Really busy IRL and with other projects.) The issue stems from how this variant of SteamStub is handling the stolen bytes that are reused to build and decrypt the .text section. The section will land up starting at 0x00401000 when the executable is running which this title makes use of as an expected function within the main window class vtable: .rdata:0059799C ; const CRPGVXApp::`vftable'
.rdata:0059799C ??_7CRPGVXApp@@6B@ dd offset sub_4E148E ; DATA XREF: sub_401020+16↑o
.rdata:0059799C ; sub_4010F0+2B↑o
.rdata:005979A0 dd offset sub_403210
.rdata:005979A4 dd offset unknown_libname_124 ; Microsoft VisualC 2-14/net runtime
.rdata:005979A4 ; MFC 3.1-14.0 32bit
.rdata:005979A8 dd offset ?OnCmdMsg@CCmdTarget@@UAEHIHPAXPAUAFX_CMDHANDLERINFO@@@Z ; CCmdTarget::OnCmdMsg(uint,int,void *,AFX_CMDHANDLERINFO *)
.rdata:005979AC dd offset ?OnFinalRelease@CCmdTarget@@UAEXXZ ; CCmdTarget::OnFinalRelease(void)
.rdata:005979B0 dd offset sub_4FA44D
.rdata:005979B4 dd offset sub_4E253C
.rdata:005979B8 dd offset sub_4FDFA3
.rdata:005979BC dd offset sub_4FDFA3
.rdata:005979C0 dd offset ?GetTypeLib@CCmdTarget@@UAEJKPAPAUITypeLib@@@Z ; CCmdTarget::GetTypeLib(ulong,ITypeLib * *)
.rdata:005979C4 dd offset dword_401000 <-- this is broken Due the stole bytes not being restored and decrypted properly, that function is instead incorrect:
|
Alright so scratch what I said above about manually fixing the file. That was wrong as I didn't have the time earlier to really look at it better. I had time to look again tonight and the game is also on sale for a few dollars so I bought it to take a closer look. The current 2.1 unpacker is currently handling this file wrong in multiple places. With the lack of 2.1 variant files, it makes it hard to determine what differences are across each version. But for now, this will require a handful of changes to fully fix properly. Some of the things wrong at the moment:
I need to take a look at some other 2.1 samples I have to compare notes and see if things need to be broken into separate unpackers. |
I found two other pieces of software packed with SteamStub 2.1 So it seems that this failure only appears with RPGVX.exe, so far. Thanks for the time you took to try and figure this out so far, as well as for explaining things. Edit: never mind. Only RPG Maker XP's EXE file works normally. RPG Maker VX Ace's file breaks as well. I tried unpacking it with experimental features, but that breaks the exe file even further. You don't get an error, it instantly closes as if you launched nothing. |
I've had a little more free time tonight to check this out again. I can get Steamless to properly unpack RPGVX now however it breaks compatibility with other titles in the process. The manner in which the 2.x stub variant works makes it pretty annoying to make a single one-size-fits-all solution that works on all packed games with it. For the time being I am still going to not directly fix this yet until I have the time to come up with a better means of parsing out the information for all titles that works in a single go. I don't want to break compatibility with some stuff to fix 1 title. If you wish to fix this in your own codebase to unpack RPGVX.exe, you can change the following:
Change the var aesIv = this.PayloadData.Skip(this.SteamDrmpOffsets[7]).Take(16).ToArray();
var codeStolen = this.PayloadData.Skip(this.SteamDrmpOffsets[7]).Take(32).Skip(16).ToArray(); The issue here is that the SteamDMRP.dll offsets being used are wrong, this is annoying to deal with currently because the module has multiple variants for the different versions of SteamStub 2.x which changes the way things are compile down and the order they are stored. The AES encryption IV and the stolen bytes are stored together though within the payload data. Hopefully I can eventually get to this and come up with a better permanent solution later. |
Got an issue related to #16
When using Steamless on RPGVX.exe, it seems to completely break the exe.
Your software works seemingly correctly on the file when enabling the experimental features only. However, upon trying to run the now unpacked exe file within the installation directory of the original file, this unpacked file appears to be broken. You receive the following error message:
Unknown software exception 0xc0000096 in the executable on location 0x00401005
The program stopped working.
This error shows up the moment you launch the unpacked exe.
Since the software package containing this exe hasn't been updated for years, the file in the zip file provided in issue number 16 is still the latest and thus valid.
Disclaimer: I'm running windows 8.1, a system Valve decided to prevent the Steam Client from running at the end of the year. I realize that this software isn't intended for use by a customer who has a legitly bought copy, but this situation is a bit rediculous in my opinion. Hense I was looking for alternatives on how I could keep some of the stuff I bought without needing to buy it a second time, or something like that. Anyway, as such I was hoping it would work properly, but unfortunately it doesn't.
I was wondering if you could take a look at why this happens, since I have no clue. Thanks in advance.
Associated steam id: https://steamdb.info/app/521880/
The text was updated successfully, but these errors were encountered: