pub unsafe fn hook_function(
original_function: usize,
new_function: usize,
new_function_end: Option<&mut usize>,
len: usize,
) -> Result<()>
Expand description
Injects a jmp in the target address. The minimum length of it is 12 bytes. In case the space is bigger than 14 bytes, it’ll inject a non-dirty trampoline, and will nop the rest of the instructions.
§Safety
this function is inherently unsafe since it does a lot of nasty stuff.