I am using OllyDbg to modify an application but I am quite new in assembly language, I need to place an MD5 hash in a memory address, the destination memory address is stored in EAX
. How can I do it?
The hash that I need to insert is dba2d8bf7063faf1275e693661bc9651
. I have tried in the following way:
MOV DWORD PTR DS:[EAX],32616264
MOV DWORD PTR DS:[EAX+4],66623864
MOV DWORD PTR DS:[EAX+8],33363037
MOV DWORD PTR DS:[EAX+12],31666166
MOV DWORD PTR DS:[EAX+16],65353732
MOV DWORD PTR DS:[EAX+20],36333936
MOV DWORD PTR DS:[EAX+24],63623136
MOV DWORD PTR DS:[EAX+28],31353639
But it is very long and very inefficient in my opinion. I have also tried saving the hash in another address and moving it to where I need it with the MOV
instruction but I can not make it work:
MOV DWORD PTR DS:[EAX], 012B2C60
Where 012B2C60
is the hash address.
Another problem that happens to me is that the yellow underlined bytes are modified when I start the program (I guess they must be dynamic addresses) so what I write in that address is modified when the program starts, how can I prevent this from happening?