#include <windows.h>
#define pointer 0x0000000
#define offset 0x10
#define offset1 0x290
#define offset2 0xd4
#define offset3 0x164
#define offset4 0xf0
DWORD GetAntiKickPointer(DWORD dwClientOffset)
{
DWORD dwAddress = dwClientOffset + pointer;
if(!IsBadReadPtr((void*)dwAddress, 4)){
dwAddress = *(DWORD*)dwAddress + offset;
dwAddress = *(DWORD*)dwAddress + offset1;
dwAddress = *(DWORD*)dwAddress + offset2;
dwAddress = *(DWORD*)dwAddress + offset3;
dwAddress = *(DWORD*)dwAddress + offset4;
if (!IsBadWritePtr((void*)dwAddress, 4))
return dwAddress;
}
return NULL;
}
void main()
{
DWORD dwClientOffset = (DWORD)GetModuleHandle(L"AVA.exe");
bool bActivated = false;
while (true)//Keep the thread alive
{
if (GetAsyncKeyState(VK_HOME) & 0x8000) //The Hotkey to enable the function
{
if (bActivated == false)
{
__try{
Beep(1000 , 100);
int* pAntiKick = (int*)GetAntiKickPointer(dwClientOffset);
if (pAntiKick)
*pAntiKick = 5;
bActivated = true;
}
__except(GetExceptionCode())
{
}
Sleep(500);
}
}
else if (GetAsyncKeyState(VK_END) & 0x8000)
{
if (bActivated == true)
{
__try{
Beep(500 , 100);
int* pAntiKick = (int*)GetAntiKickPointer(dwClientOffset);
if (pAntiKick)
*pAntiKick = 6;
bActivated = false;
}
__except(GetExceptionCode())
{
}
Sleep(500);
}
}
Sleep(30);//Stop the loop from chewing the cpu
}
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hinstDLL);
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&main, NULL, 0, NULL);//Creates the thread
}
return TRUE;
}