i have this code:
extern "C" __declspec(dllexport) void getName(void)
{
char buf[20];
int slotNumber = 1;
DWORD tempdw;
DWORD hStorm_LOBBYPTR;
hStorm_LOBBYPTR = (DWORD)GetModuleHandleW(L"Storm.dll") + 0x1000 + 0x40000 + 0x8000;
__asm
{
PUSHAD
MOV EAX, DWORD PTR DS:[hStorm_LOBBYPTR]
TEST EAX, EAX
JE nick_false
MOV ECX, DWORD PTR DS:[EAX+0xC464]
TEST ECX, ECX
JE nick_false
MOV EAX, DWORD PTR DS:[ECX+0x170+0xB0]
TEST EAX, EAX
JE nick_false
MOV EDX, slotNumber
MOV ECX, DWORD PTR DS:[EAX+EDX*4]
MOV EAX, DWORD PTR DS:[ECX+0x1A0]
MOV ECX, DWORD PTR DS:[EAX+0x1E4]
MOV EAX, DWORD PTR DS:[ECX+0x1E4]
MOV ECX, DWORD PTR DS:[EAX+0x1E8]
MOV tempdw, ECX
POPAD
JMP nick_true
nick_false:
XOR EAX, EAX
MOV tempdw, EAX
POPAD
}
sprintf(buf,"%d", tempdw);
MessageBox(0, buf, "Dll Injector", MB_ICONEXCLAMATION | MB_OK);
tempdw is a pointer, but when I try to look at it,
I have this kind of garbage in MessageBox:

What should I do?
My guess is that your assembly stomps over something (possibly a register) which means that the
sprintffails and the buffer just contains random stack noise.Check this out by removing the assembly.