syReplaceFunc
Signature
Parameters
| Parameter | Type | Description |
|---|---|---|
address |
u32 | The address to hook |
replacement |
void* | Pointer to hook code to inject |
original |
void** | Pointer to a function pointer that will get set to the original unhooked function |
Description
Injects a hook over the first instruction of a function. The original paramter will get set to a pointer to the unmodified original function. This is useful for calling the original behavior from within your replacement.
Retuning from your replacement will return to the function caller, not the replaced function.