macro_rules! spoof {
($addr:expr, $($arg:expr),+ $(,)?) => { ... };
}Expand description
Spoof a direct function call. Resolves the spoofing scaffolding once
and then jumps to addr with the supplied args under a fake stack.
§Examples
ⓘ
let kernel32 = dyncvoke_core::get_module_base_address("kernel32.dll");
let virtual_alloc = dyncvoke_core::get_function_address(kernel32, "VirtualAlloc");
let addr = spoof::spoof!(
virtual_alloc,
core::ptr::null_mut::<core::ffi::c_void>(),
1 << 12,
0x3000u32,
0x04u32
)?;