Experienced Elementalist
- Joined
- Oct 14, 2015
- Messages
- 293
- Reaction score
- 86
You must create a .cpp and .header
You can explore a lot more of that there and with you. Good luck. tt1:
ZAntiHack.cpp
ZAntiHack.h
main.cpp
I will update if I have time left.
You can explore a lot more of that there and with you. Good luck. tt1:
ZAntiHack.cpp
Code:
#include "stdafx.h"
#include "ZAntiHack.h"
bool IsAddressHooked(unsigned long address){
BYTE* offsetValue = (BYTE*)address;
return (*offsetValue == 0xE8 || *offsetValue == 0xE9 || *offsetValue == 0x7E || *offsetValue == 0x74 || *offsetValue == 0xC3);
}
void Main(void*)
{
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_LOWEST);
DWORD getTickCount = (DWORD)GetProcAddress(GetModuleHandleA("kernel32.dll"), "GetTickCount");
DWORD queryPerformanceCounter = (DWORD)GetProcAddress(GetModuleHandleA("kernel32.dll"), "QueryPerformanceCounter");
while(1)
{
Sleep(RandomNumber(5000, 7000));
if (IsAddressHooked(getTickCount) || IsAddressHooked(queryPerformanceCounter) || GetModuleHandleA("hook.dll") != NULL)
{
ExitProcess(NULL);
}
}
}
ZAntiHack.h
Code:
extern void Main(void*);
main.cpp
Code:
(HANDLE)_beginthread(Main, 0, 0);
I will update if I have time left.
Last edited: