var Onehit_Hook : Array[0..1] of DWORD;
Procedure OnehitHook;
var Index : Integer;
begin
for Index := 0 to 1 do begin
Onehit_Hook[Index] := DWORD(VirtualAllocEx(hProcess, Nil, $1, MEM_COMMIT, PAGE_EXECUTE_READWRITE));
end;
WriteProcessMemory(hProcess, Pointer(Onehit_Hook[0]), @OnehitAsm, $1E, Nativeuint(nil^));
WPM4Byte(Onehit_Hook[0] + $02, Onehit_Hook[1]);
JmpHookEx(Onehit_Hook[0] + $1A, Offset_Onehit + $07, 0);
JmpHookEx(Offset_Onehit, Onehit_Hook[0], 2);
end;
Procedure Onehit(Toggle: Boolean);
Const Value : Array[0..6] of byte = ($0F, $2F, $82, $B0, $04, $00, $00);
if Toggle then begin
WPM1Byte(Onehit_Hook[1], 1);
end else begin
WriteProcessMemory(hProcess, Pointer(Offset_Onehit), @Value, sizeof(Value), Nativeuint(nil^));
WPM1Byte(Onehit_Hook[1], 0);
end;
Offset_OneHit: DWORD = $014C1F3A;
OnehitAsm :
3keU2H2+IXfxc0wR3t3/2zHrCIv7FCej+l5d1pjN3WY3aHyx3xR7vUft2Or3QR596wp5ewgBvy3ZBK3M6uuvdxVU+jFJEb9KOJCKtfcKhE4eyncIgg7qcmdzPSBD61Yj6oj9QNfICU9irHAQ5UtzC8qouIUQabx2nIeAmy8KxiZt5zxrjdxAeiilv5Zhj+cYrljU5SPylCXBvHxb8r/gSA==
알아서 복호화하고 재밌게 쓰세요 ^ㅜ^
댓글4
Offset_OneHit: DWORD = $014C1F3A; = f3 0f 11 80 34 08 00 00 8b e5
OnehitAsm 요거 어딨어?
와 개잘됨
ㄱㅅ