Code:
#include <windows.h>
#include "detours.h"
#pragma comment(lib, "detours.lib")
// use a naked function so that there is no prolog or epilog and you can right pure asm
DWORD back = 0x5BF94FD4;
__declspec (naked) void Hack()
{
__asm
{
inc [esi]
pop edi
mov eax,esi
jmp back
}
}
void thread()
{
DetourFunction((BYTE*)(0x5BF94FCF), (BYTE*)Hack); //This is to basically detour the function that makes your smg count go down.
}
BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpReserved )
{
if( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread( NULL, NULL, (LPTHREAD_START_ROUTINE)thread, NULL, NULL, NULL);
}
return TRUE;
}
