Posted: Mon Jan 02, 2023 12:02 pm Post subject: Step 9 on CE tutorial
Hey everyone, I've been going at this for hours now and I can't seem to find a satisfying answer so maybe some of you could help me find the error on this assembly code
So on step 9(x32) CE tutorial
Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
cmp dword ptr [ebx+10], 01 // or cmp [ebx+10], 1
je exit
originalcode:
mov [ebx+04],eax
fldz
exit:
jmp returnhere
"Tutorial-i386.exe"+28E89:
jmp newmem
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"Tutorial-i386.exe"+28E89:
mov [ebx+04],eax
fldz
//Alt: db 89 43 04 D9 EE
Why won't this simple code work? It checks for the team number, if it's 1 it just does nothing(jump exit) else it should go to the original code...
It gives me a floating point op exception... Why? I'm not even handling floating numbers (team number isn't a float... right?)
This is not code you want to skip. Move it to where it's run for both enemies and allies.
Code:
...
je exit
originalcode:
mov [ebx+04],eax
exit:
fldz
jmp returnhere
Thanks so much, yes that makes sence, so I've read the documentation about fldz, it basically pushes 0.0 on the stack, I'm guessing the program will pop that stack somewhere else where it needs that 0 and since nothing was on the stack it crashed?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum