Why does
Code:
extern "C" __declspec(dllexport) bool ScanFake(int *a, int, int, int)
{
*a = 0;
return true;
}
compile to
Code:
sub proc near
arg_0= dword ptr 4
mov eax, [esp+arg_0]
and dword ptr [eax], 0
mov al, 1
retn
sub endp
instead of
Code:
sub proc near
arg_0= dword ptr 4
push ebp
mov ebp, esp
mov ecx, [ebp+arg_0]
mov [ecx],0
mov al, 1
pop ebp
retn
sub endp
Any thoughts how I can get the compiler (VC++) to modify the stack so the four pushed ints will be off it? As soon as I add a __asm{ add esp, 16 }, it will the stack management. But that will lead to ****ing it up again. (Since it will pop too much then.
Code:
push ebp
mov ebp, esp
mov eax, [ebp+arg_0]
and dword ptr [eax], 0
add esp, 10h
mov al, 1
pop ebp
retn
Well: Which parameters do I have to change to get the compiler to add push ebp etc.?