Hi :
How can I display in a MessageBox the content of, for example, EAX or EBX register? For example if eax == 48249FA9h, I want to use a MessageBox displaying 48249FA9.
Thanks in advance.
How can I display in a MessageBox the content of, for example, EAX or EBX register? For example if eax == 48249FA9h, I want to use a MessageBox displaying 48249FA9.
Thanks in advance.
ahh I just solved exactly the same problem :) only i had my value in a variable not much difference. use wsprintf api
goes something like this.
ok define DecimalFormat in .data
DecimalFormat db "%-lu",0
and define OutPutBuffer in .data? like
OutPutBuffer db 8 dup(?)
INVOKE wsprintf,ADDR OutPutBuffer,ADDR DecimalFormat,eax
Like I said I used a var not eax. But I think that will work. if not mov eax to some var then put the var name in place of eax. don't used ADDR varname on the input.
then call MessageBox,0,ADDR OutPutBuffer,ADDR OutPutBuffer,MB_OK
I hope this helps
:edit because im an idiot and forgot half my post :)
goes something like this.
ok define DecimalFormat in .data
DecimalFormat db "%-lu",0
and define OutPutBuffer in .data? like
OutPutBuffer db 8 dup(?)
INVOKE wsprintf,ADDR OutPutBuffer,ADDR DecimalFormat,eax
Like I said I used a var not eax. But I think that will work. if not mov eax to some var then put the var name in place of eax. don't used ADDR varname on the input.
then call MessageBox,0,ADDR OutPutBuffer,ADDR OutPutBuffer,MB_OK
I hope this helps
:edit because im an idiot and forgot half my post :)
Try this. Save eax before, then using rotate and code below to translate each 8-bit value
cmp al, 10 ; in al low 8-bit of your value (eax)
sbb al, 69h
das ;after this in al - ASCII symbol