Posted: Sat May 02, 2020 11:28 am Post subject: Unexpected value after mov
Hi everybody,
Something probably simple but i cant figure this out.
I found address that i want to change, it has one one of 2 values (in 4 bytes) 256 \ 257
When i do :
Code:
mov [rsi+00002705],(int) 257
The value eventually seen as 65792. If ill take calculator and put this number as decimal, the hex value is 10100, which is not exactly what i want. The correct hex value suppose to be 101 = 257 (DEC).
I found another op code that is original to game and it writes the value this way:
Code:
mov [rcx],dil
If i change the value manually at the address to 257 then i get expected result.
What am i missing here ?
It was probably a typo. You meant to press "4" but you accidentally pressed "5".
Or it's not a 4-byte value and the debugger gets confused because you said it is.
If you're wondering about the binary format of integers, they're stored as sums of nonnegative powers of 2 with bytes in little endian order. This is more or less a fancy way of saying hexadecimal in reverse byte order.
e.g. the 4 byte value 0x1234ABCD gets stored as the bytes CD AB 34 12 (in that order).
In your case, you want to set a value to 0x101, but you specified the address wrong:
Code:
00 01 00 00
^^ the start of the actual value
00 01 00 00
^^ the address you were writing to
_________________
I don't know where I'm going, but I'll figure it out when I get there.
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