Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   C++ asm help. Patching a program in runtime [newbie question] (http://www.go4expert.com/forums/cpp-asm-help-patching-program-runtime-t25491/)

Dreadnought 10Apr2011 17:07

C++ asm help. Patching a program in runtime [newbie question]
 
Hey guys,

So I'm attempting to patch a program using inline asm in C++ while the program is running.

What i'm trying todo in C++ is this for eg:

Turning
00482F02 8D51 19 LEA EDX,DWORD PTR DS:[ECX+19] 00482F0B 83C1 19 ADD ECX,19

Into
00482F02 8D51 14 LEA EDX,DWORD PTR DS:[ECX+14] 00482F0B 83C1 14 ADD ECX,14But I just cant find anything to help which is why I came here, I'd like to use Microsoft Detours 2.1 todo this but im 99% it doesn't support this kinda job

Thanks,
Dread

Dreadnought 10Apr2011 17:10

Re: C++ asm help. Patching a program in runtime [newbie question]
 
Cant seem to figure out how to edit:
Let me redo the eg.. this is from olydbg.

I wonna change
Code:

00482F02              8D51 19              LEA EDX,DWORD PTR DS:[ECX+19]
00482F0B              83C1 19              ADD ECX,19

Into

Code:

00482F02              8D51 14              LEA EDX,DWORD PTR DS:[ECX+14]
00482F0B              83C1 14              ADD ECX,14



All times are GMT +5.5. The time now is 21:38.