decrypting and patching game .exe

Posted by blueoris 
decrypting and patching game .exe
Date: September 25, 2021 07:33AM
Posted by: blueoris
Are there instructions on how to decrypt / patch the official gp4.exe so to remove the CD verification?
I know there is a GP4_1.02_nocd.zip by Lo2k in this site, but I'd like to do it myself for leaning purposes.
Similar instructions are around to manually patch other games executable like gtr2 etc, so I was hoping to find some information for gp4.
Re: decrypting and patching game .exe
Date: September 25, 2021 07:47AM
Posted by: mortal
No, not that I'm aware of. Just use the decrypted exe.


[www.mediafire.com] Some say you should click it, you know you want to. :-) [www.gp4central.com] <----GP4 Central
Re: decrypting and patching game .exe
Date: September 25, 2021 11:55AM
Posted by: St.Hubbins
Not instructions, but you could always generate a file that allows you to compare the original GP4.exe with the decrypted.exe:

- Windows Key + R to get run menu, type cmd and hit enter
- Go to the directory with your executables, e.g.: cd "C:\Program Files (x86)\Infogrames/Grand Prix 4"
- Type (without the quotes) "fc /b GP4.exe GP4Derypted.exe > mypatch.patch" ...then hit ENTER

That will create a .patch file inside the same directory which you can open with notepad to compare the bytes that have been changed between the first and second files.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The test of a first-rate intelligence is the ability to hold two opposed ideas in the mind at the same time, and still retain the ability to function. -- F.Scott Fitzgerald
Re: decrypting and patching game .exe
Date: September 25, 2021 08:38PM
Posted by: SDI
The way I've implemented it in GPxPatch is by letting the game decrypt itself. The encrypted executable decrypts itself and spawns another process from that. GPxPatch waits for that process and hooks into that instead. If you somehow manage to store it on disk after it was decrypted, you're done. But for educational purposes it's of course more rewarding to crack the encryption instead.

René Smit, Independent Software Developer.
Download my GPx tools here.
Re: decrypting and patching game .exe
Date: September 26, 2021 04:43AM
Posted by: blueoris
St.Hubbins Wrote:
-------------------------------------------------------
> Not instructions, but you could always generate a
> file that allows you to compare the original
> GP4.exe with the decrypted.exe:
>
> - Windows Key + R to get run menu, type cmd and
> hit enter
> - Go to the directory with your executables, e.g.:
> cd "C:\Program Files (x86)\Infogrames/Grand Prix
> 4"
> - Type (without the quotes) "fc /b GP4.exe
> GP4Derypted.exe > mypatch.patch" ...then hit
> ENTER
>
> That will create a .patch file inside the same
> directory which you can open with notepad to
> compare the bytes that have been changed between
> the first and second files.

Interesting. I am curious to find out how does a byte by byte comparison between an encrypted .exe and a decrypted and modified version of the original file work and then how could the findings be used.
Re: decrypting and patching game .exe
Date: September 26, 2021 04:53AM
Posted by: blueoris
SDI Wrote:
-------------------------------------------------------
> The way I've implemented it in GPxPatch is by
> letting the game decrypt itself. The encrypted
> executable decrypts itself and spawns another
> process from that. GPxPatch waits for that process
> and hooks into that instead. If you somehow manage
> to store it on disk after it was decrypted, you're
> done.

So does it means that I can read a certain number of bytes starting from the memory position that the process with the decrypted data points to and then save the data I got to disk?
Re: decrypting and patching game .exe
Date: October 01, 2021 06:49PM
Posted by: SDI
Yes, that should work.

René Smit, Independent Software Developer.
Download my GPx tools here.
Sorry, only registered users may post in this forum.

Click here to login

Maintainer: mortal, stephan | Design: stephan, Lo2k | Moderatoren: mortal, TomMK, Noog, stephan | Downloads: Lo2k | Supported by: Atlassian Experts Berlin | Forum Rules | Policy