| View previous topic :: View next topic |
| Author |
Message |
fjfc Advanced Cheater
Reputation: 0
Joined: 21 Sep 2006 Posts: 91
|
Posted: Wed Apr 02, 2008 7:39 pm Post subject: Api Unhooking Question... |
|
|
Well... today i saw that code in delphi to unhok the PostMessageA
| Quote: | function PMX(
hWnd:HWND;
MSG:UINT;
WPARAM:wParam;
LPARAM:lParam):BOOL;stdcall;
var DblWord:DWORD;
hHandle:THandle;
begin
hHandle:=LoadLibrary('user32.dll');
DblWord:=DWORD(GetProcAddress(hHandle,'PostMessageA'))+5;
asm
mov edi,edi
push ebp
mov esp,ebp
jmp [DblWord]
end;
end;
thx rot1 |
then i tried to use it with GetPixel like that:
| Quote: | function GPX(
DC:HDC;
X:Integer;
Y:Integer):TColor;stdcall; export;
var DblWord:DWORD;
hHandle:THandle;
begin
hHandle:=LoadLibrary('gdi32.dll');
DblWord:=DWORD(GetProcAddress(hHandle,'GetPixel'))+5;
asm
mov edi,edi
push ebp
mov esp,ebp
jmp [DblWord]
end;
end; |
then when i call the api i get an error like
Access Violation at 0042D0A8 Read Of 00000070
do you guys know the problem?
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Wed Apr 02, 2008 7:47 pm Post subject: |
|
|
umm... could be the "export" after stdcall; in GPX
your not Unhooking it btw. your simply jumping over the 5 byte hook that GameGuard creates.
_________________
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Wed Apr 02, 2008 7:49 pm Post subject: |
|
|
Won't work, hooked in kernel-mode.
PROTIP: mov edi, edi is useless, cut it out.
|
|
| Back to top |
|
 |
fjfc Advanced Cheater
Reputation: 0
Joined: 21 Sep 2006 Posts: 91
|
Posted: Wed Apr 02, 2008 7:53 pm Post subject: |
|
|
Well i've put export after but i got the sabe problem...
look i put this in a dll
function GPX(
DC:HDC;
X:Integer;
Y:Integer):TColor;stdcall; export;
var DblWord:DWORD;
hHandle:THandle;
begin
hHandle:=LoadLibrary('gdi32.dll');
DblWord:=DWORD(GetProcAddress(hHandle,'GetPixel'))+5;
asm
mov edi,edi
push ebp
mov esp,ebp
jmp [DblWord]
end;
end;
exports GPX;
then i call at the exe like
================
function GPA(
DC:HDC;
X:Integer;
Y:Integer):TColor;stdcall;
external 'Teste.dll' name 'GPX';
procedure TForm1.Timer1Timer(Sender: TObject);
begin
label1.Color:=GPA(x,300,500);
==============
what is wrong guys ? =/
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25833 Location: The netherlands
|
Posted: Wed Apr 02, 2008 8:08 pm Post subject: |
|
|
you could also just make a raw copy of those dll's and adjust the pointers of your own app to point to make use of the copy
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
fjfc Advanced Cheater
Reputation: 0
Joined: 21 Sep 2006 Posts: 91
|
Posted: Wed Apr 02, 2008 8:11 pm Post subject: |
|
|
just copy Gdi32 to another dll and point my app to use it?
lol i liked that DB xD
thanks ;D
|
|
| Back to top |
|
 |
|