hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Mon Nov 19, 2007 2:03 am Post subject: Oh god, what is going on? wsprintf insanity and masm. |
|
|
As wacky as it may be, I want to loop through until I hits the location I specified. (Everything read will eventually all go to a text file, but this is currently blowing my mind) Now, for instance, it's starting at 00900000 and going to 0100579C... well...
Code: | readloop:
invoke ReadProcessMemory, gameProcess, base, addr buffer, 4, NULL
add base, 00000001h
cmp base, 0100579Ch
jne readloop
je result
result:
mov eax, dword ptr [buffer]
invoke wsprintf, addr buffer, addr format, eax
invoke SetDlgItemText, hwnd, IDC_EDT1, addr buffer |
this works no problem... but... Instead of 3, it shits out 300, 7 would turn into 700. 10F would turn into 10f00, etc. basically, it's correct... except it's uh... moved over.
Now if I for example start at 0100579C and just do this...
Code: | readloop:
invoke ReadProcessMemory, gameProcess, base, addr buffer, 4, NULL
mov eax, dword ptr [buffer]
invoke wsprintf, addr buffer, addr format, eax
invoke SetDlgItemText, hwnd, IDC_EDT1, addr buffer |
It ends up perfectly fine. What the shit?
|
|