Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


GetDC patched? Msea 0.69 Hackshield Pro

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
andonrui
Cheater
Reputation: 0

Joined: 22 Apr 2008
Posts: 33

PostPosted: Thu Mar 26, 2009 3:10 pm    Post subject: GetDC patched? Msea 0.69 Hackshield Pro Reply with quote

Hi,

Maplesea 0.69 getpixel no longer works, since getpixel is already trampoline could it be GetDC this is patch?

thanks

Code:

FARPROC   fpGetDC = (FARPROC)GetDC + sizeof(ULONG_PTR) + 1;
ULONG_PTR ulGetDC = *(ULONG_PTR*)(GetDC+1);

__declspec(naked) HDC WINAPI xGetDC(HWND hWnd)
{
    _asm
    {
        mov eax, [ulGetDC]
        jmp [fpGetDC]
    }
}



i tried this bypass by irwin but got this error while compiling:

1>.\fpGetDC.cpp(Cool : error C2296: '+' : illegal, left operand has type 'FARPROC'
1>.\fpGetDC.cpp(9) : error C2296: '+' : illegal, left operand has type 'HDC (__stdcall *)(HWND)'
Back to top
View user's profile Send private message
pkedpker
Master Cheater
Reputation: 1

Joined: 11 Oct 2006
Posts: 412

PostPosted: Sat Mar 28, 2009 5:45 pm    Post subject: Reply with quote

did you include windef.h?

or just windows.h should do the trick.

_________________
Hacks I made for kongregate.
Kongregate Universal Badge Hack: http://forum.cheatengine.org/viewtopic.php?p=4129411
Kongreate Auto Rating/Voter hack: http://forum.cheatengine.org/viewtopic.php?t=263576
Took a test lol
Back to top
View user's profile Send private message
BanMe
Master Cheater
Reputation: 0

Joined: 29 Nov 2005
Posts: 375
Location: Farmington NH, USA

PostPosted: Sat Mar 28, 2009 5:59 pm    Post subject: Reply with quote

Code:

#include <windows.h>
#include <tchar.h>
BOOL WINAPI CheckAndPatchGetDC()
{
    BOOL bRet = FALSE;
   BYTE GetDCAsm[15] =  {0xB8,0x91,0x11,0x00,0x00,0xBA,0x00,0x03,0xFE, 0x7F,0xFF,0x12,0xC2,0x04,0x00};
     bRet = (memcmp((void*)GetProcAddress(GetModuleHandle(_T("user32.dll")),"GetDC"),GetDCAsm,sizeof(GetDCAsm))== 0) ? TRUE : FALSE;
     if(bRet)
     {
         return bRet;
     }
     else
     {
         memcpy((void*)GetProcAddress(GetModuleHandle(_T("user32.dll")),"GetDC"),GetDCAsm,sizeof(GetDCAsm));
         bRet = (memcmp((void*)GetProcAddress(GetModuleHandle(_T("user32.dll")),"GetDC"),GetDCAsm,sizeof(GetDCAsm)) == 0) ? TRUE : FALSE;
      }
      return bRet;
}


sorry about the pm i wrote the code without compiling it and had minor syntax and header faults...

regards BanMe

_________________
don't +rep me..i do not wish to have "status" or "recognition" from you or anyone.. thank you.
Back to top
View user's profile Send private message MSN Messenger
andonrui
Cheater
Reputation: 0

Joined: 22 Apr 2008
Posts: 33

PostPosted: Sun Mar 29, 2009 3:03 am    Post subject: Reply with quote

Its okie BanMe, thank you so much for your assistance and you've been more than helpful i really appreciate. It compiled fine this time but its still patched, all it does is return -1 when i call Getpixel.

Regards.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites