here I'm again with a MASM question
following problem:
mov ebp, 012345678h ;//some value
lea ESI,
mov dword ptr , ebp
;// above 2 lines should patch the instruction
;// mov eax, 66666666h to mov eax, 12345678h
call BlaBla ;// after this call there should be EAX=12345678h
invoke ExitProcess,0
BlaBla Proc
nop
xyz: mov eax, 066666666h
nop
ret
BlaBla Endp
--> gives a error message: Undefined symbol xyz
(this is self modifing code. make shure that .CODE section is writeable)
Anyone with a solution for this? :confused:
CRYO
following problem:
mov ebp, 012345678h ;//some value
lea ESI,
mov dword ptr , ebp
;// above 2 lines should patch the instruction
;// mov eax, 66666666h to mov eax, 12345678h
call BlaBla ;// after this call there should be EAX=12345678h
invoke ExitProcess,0
BlaBla Proc
nop
xyz: mov eax, 066666666h
nop
ret
BlaBla Endp
--> gives a error message: Undefined symbol xyz
(this is self modifing code. make shure that .CODE section is writeable)
Anyone with a solution for this? :confused:
CRYO
Simple solution:
Posted on 2002-04-22 11:47:21 by bitRAKE
BlaBla Proc
nop
xyz[color=red][b]::[/b][/color] mov eax, 066666666h
nop
ret
BlaBla Endp
Labels inside PROCs default to private - the double colon makes it global - be careful to not use this frivalously. :)
Posted on 2002-04-22 11:47:21 by bitRAKE
yes, you were right! It's a real easy solution.
thanks mirno
thanks bitrake
:grin:
thanks mirno
thanks bitrake
:grin: