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 


[Question] Error Bypassing GetPixel

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

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Thu Jul 10, 2008 9:03 pm    Post subject: [Question] Error Bypassing GetPixel Reply with quote

I think one can bypass gg to use GetPixel by adding the 5 bytes like the postmesage bypass...right? Or am I mistaken?

Edit: Now I am getting the error

Code:
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.  This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.


Anyone can help?


Last edited by kitterz on Fri Jul 11, 2008 9:09 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Thu Jul 10, 2008 9:05 pm    Post subject: Reply with quote

Yes you are correct.
_________________
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Jul 10, 2008 9:07 pm    Post subject: Reply with quote

Yea...

Code:

DWORD GPA = (DWORD)GetProcAddress(LoadLibrary("USER32.DLL"), "GetPixel")+5;

_declspec(naked) COLORREF GetPixelX(HDC hdc, int nXPos, int nYPos) {
   _asm {
      mov edi, edi
      push ebp
      mov ebp, esp
      jmp[GPA]
   }
}

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Thu Jul 10, 2008 9:18 pm    Post subject: Reply with quote

oib111 wrote:
Yea...

Code:

DWORD GPA = (DWORD)GetProcAddress(LoadLibrary("USER32.DLL"), "GetPixel")+5;

_declspec(naked) COLORREF GetPixelX(HDC hdc, int nXPos, int nYPos) {
   _asm {
      mov edi, edi
      push ebp
      mov ebp, esp
      jmp[GPA]
   }
}


Thx but i already knew how XD
Back to top
View user's profile Send private message Send e-mail
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Thu Jul 10, 2008 10:21 pm    Post subject: Reply with quote

oib111 wrote:
Yea...

Code:

DWORD GPA = (DWORD)GetProcAddress(LoadLibrary("USER32.DLL"), "GetPixel")+5;

_declspec(naked) COLORREF GetPixelX(HDC hdc, int nXPos, int nYPos) {
   _asm {
      mov edi, edi
      push ebp
      mov ebp, esp
      jmp[GPA]
   }
}

Code:
jmp dword ptr ds:[GPA]


And you can simply do:
Code:
jmp dword ptr ds:[GetPixel+5]

or of this doesn't work:
Code:
mov eax,dword ptr ds:[GetPixel]
add eax,5
jmp eax
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Thu Jul 10, 2008 10:30 pm    Post subject: Reply with quote

Symbol wrote:
And you can simply do:
Code:
jmp dword ptr ds:[GetPixel+5]

or of this doesn't work:
Code:
mov eax,dword ptr ds:[GetPixel]
add eax,5
jmp eax


You are making the assumption that the IAT isn't also hooked.
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Thu Jul 10, 2008 11:25 pm    Post subject: Reply with quote

btw thats's "Gdi32.Dll" not "User32.Dll"
_________________
Stylo
Back to top
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Fri Jul 11, 2008 7:35 am    Post subject: Reply with quote

1qaz wrote:
btw thats's "Gdi32.Dll" not "User32.Dll"


Yep, I was wondering when someone was going to notice that XD
Back to top
View user's profile Send private message Send e-mail
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