Hello how to redirect the function's return address to your own function address?
-
Any info example or link with tutorial is welcome i searched google and didnt find nothing good. I want to patch the call of the function so not do modify the original bytes of the function. I dunno if patching is same as redirection buth searched info for bouth didnt find anything. I want to redirect / patch a dll function return address to my addres ok thnx .
-
Any info example or link with tutorial is welcome i searched google and didnt find nothing good. I want to patch the call of the function so not do modify the original bytes of the function. I dunno if patching is same as redirection buth searched info for bouth didnt find anything. I want to redirect / patch a dll function return address to my addres ok thnx .
I don't really get what you're trying to do. why don't you just get the original function's result, and add your calculation on its result then ?
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
I don't really get what you're trying to do. why don't you just get the original function's result, and add your calculation on its result then ?
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
nah1337 wrote:
Can ya do a example for me
you're kidding, right ?
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
No im not see this I want to redirect/ patch a call of the 10003DD7 function its addres is 0x0003DD7 and calls vsnprintf what addres is 0x0076533 int sub_10003DD7(char *Dest, size_t Count, char *Format, ...) { va_list va; // [sp+18h] [bp+10h]@1 int result; // eax@1 size_t v5; // esi@1 char *v6; // edi@1 va_start(va, Format); v5 = Count; v6 = Dest; result = _vsnprintf(Dest, Count, Format, va); v6[v5 - 1] = 0; return result; }
-
No im not see this I want to redirect/ patch a call of the 10003DD7 function its addres is 0x0003DD7 and calls vsnprintf what addres is 0x0076533 int sub_10003DD7(char *Dest, size_t Count, char *Format, ...) { va_list va; // [sp+18h] [bp+10h]@1 int result; // eax@1 size_t v5; // esi@1 char *v6; // edi@1 va_start(va, Format); v5 = Count; v6 = Dest; result = _vsnprintf(Dest, Count, Format, va); v6[v5 - 1] = 0; return result; }
I think your best bet is to look up Matt Pietreck's various books and articles. He does that soort of thing on a regular basis. :)
Bram van Kampen