Obitio Advanced Cheater
Reputation: 0
Joined: 09 Apr 2012 Posts: 68 Location: null
|
Posted: Sat May 19, 2012 10:45 am Post subject: [Delphi]WPM hooking? |
|
|
How would I hook WPM?Because my game prevents wpm...And Dark Byte how do I use your driver and it's wpm functions???
edit here I think I did it:
okay I think I made it.I use this code:
procedure myWriteProcessMemory(hProcess:Cardinal;const lpBaseAddress: Pointer; lpBuffer: Pointer;nSize:Cardinal;var lpNumberOfBytesWritten:Cardinal);external 'My Kernel.dll' name 'WriteProcessMemory';
procedure hook(target, newfunc:pointer);
var
jmpto:dword;
OldProtect: Cardinal; // old protect in memory
begin
jmpto:=dword(newfunc)-dword(target)-5;
VirtualProtect(target, 5, PAGE_EXECUTE_READWRITE, @OldProtect);
pbyte(target)^:=$e9;
pdword(dword(target)+1)^:=jmpto;
end;
Hook(GetProcAddress(GetModuleHandle('kernel32.dll'), 'WriteProcessMemory'), @myWriteProcessMemory);//prevent any dll's from loading into this program.A little annoying though.
ShowMessage('~SINful hacks~ -->WPM hooked.');
I am going to go test this now.
|
|