Fullbright with inline ASM
Hello guys 
I have a problem... since a few days i play with ASM and i try to make a simple Fullbright cheat with inline ASM. (with dll injection)
But mw3 crash everytime when i inject the .dll.
My Code:
Code:
#include "stdafx.h"
#include <Windows.h>
void Fullbright(){
DWORD dwFullbright = 0x06098CEC;
__asm{
PUSH 0
CALL [dwFullbright]
MOV ESP, 9
}
}
DWORD WINAPI Init(LPVOID unused)
{
Fullbright();
}
BOOL WINAPI DllMain(HINSTANCE mod, DWORD DWORD_INITALIZE, LPVOID res)
{
switch(DWORD_INITALIZE)
{
case DLL_PROCESS_ATTACH:
CreateThread(0, 0, &Init , 0, 0, 0);
MessageBoxA(0, "Fullbright enabled", "Gangnamstyle is shit",0);
break;
case DLL_PROCESS_DETACH:
MessageBoxA(0, "Fullbright disabled", "Gangnamstyle is very shit",0);
break;
}
return TRUE;
}
It would be nice if someone can tell me what i do wrong
.
Thanks.
cheers =)) Is that how you create a thread? I think that may be incorrect...
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Init, 0, 0, 0);
And try testing it without the breaks.