the following piece of code works fine when i use it among some code
MOV ECX,DWORD PTR DS:[0x41154] //Address
but when i try to set that address in my application as a varable and then do something like
MOV ECX,DWORD PTR DS:[PointerAddress]
the application crashes when the code is executed, PointerAddress is currently initialized as
DWORD PointerAddress = 0x41154;
can anyone spot what’s wrong?
Here
PointerAddress is treated as a pointer, not as a DWORD value.
It’s like
and not like
You perform a double dereference, thus the crash.
Try using