 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
azfk Cheater
Reputation: 0
Joined: 26 May 2009 Posts: 37
|
Posted: Sun Jul 26, 2009 3:11 pm Post subject: GameGuard's string encryption |
|
|
I've recently unpacked gameguard (I think at any rate) and now i'm wondering how can i decrypt their strings
| Code: |
if ( CryptAcquireContextA(&hProv, 0, "Microsoft Base Cryptographic Provider v1.0", 1u, 0xF0000000u) )
{
if ( CryptImportKey(hProv, &pbData, 0x54u, 0, 0, &hKey) )
{
NumberOfBytesWritten = 0;
CryptEncrypt(hKey, 0, 1, 0, 0, &NumberOfBytesWritten, 0);
v25 = NumberOfBytesWritten;
|
That was a chunk shown by IDA Hex-rays, well, I have no clue what to do now, I'm just looking into the cryptography provider for more info atm.
If anyone has suggestions, it would be appreciated
|
|
| Back to top |
|
 |
smartz993 I post too much
Reputation: 2
Joined: 20 Jun 2006 Posts: 2013 Location: USA
|
Posted: Sun Jul 26, 2009 9:19 pm Post subject: |
|
|
There is one function that is called a ton of times..
it takes one parameter.
Look for calls to 3 functions, whose parameter is a pointer to char buffer, whose first byte is 01.
then load up the file in a program you write, and scan for all the calls, then find the pushes in front, and grab the return from it.
there are your decrypted strings.
|
|
| Back to top |
|
 |
azfk Cheater
Reputation: 0
Joined: 26 May 2009 Posts: 37
|
Posted: Mon Jul 27, 2009 9:16 pm Post subject: |
|
|
lol ok, lemme try to straighten the methodology here,
one function is called a lot of times, (simple, will see this function called again and again)
this function takes one parameter, presumably something simple like
| Code: |
push blah
call blahblah
|
3. Look for calls to 3 functions, whose parameter is a pointer to char buffer, whose first byte is 01.
Does this relate to the first 2 steps? Or are there 3 functions called in sequence one after the other, and the parameters are a pointer to a char buffer whose byte is 01?
4. then load up the file in a program you write, and scan for all the calls, then find the pushes in front, and grab the return from it.
wouldn't just running this in olly and watching the char buffer be simpler?
P.S. is this called like 150x times? since there are loads of detected strings?
|
|
| Back to top |
|
 |
smartz993 I post too much
Reputation: 2
Joined: 20 Jun 2006 Posts: 2013 Location: USA
|
Posted: Mon Jul 27, 2009 10:57 pm Post subject: |
|
|
There are 3 functions which are all called a bunch of times.
Decrypted strings (which are pushed before the calls) all start with the byte 01.
Scan for the calls to these 3 functions, then look for the addresses of the char buffs, and call it yourself. The return pointer will be in eax.
(The way i did it used a function pointer, but the first version used asm)
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|