#[unsafe(no_mangle)]pub unsafe extern "C" fn mem_shellcode_load(
code: *const u8,
code_len: usize,
reloc_offsets: *const usize,
reloc_symbols: *const *const c_char,
reloc_count: usize,
near_address: usize,
_auto_free: i32,
address_out: *mut usize,
) -> i32Expand description
Loads shellcode into a code cave and returns its address.
Parameters:
code: pointer to the raw machine code bytes (required, non-null)code_len: number of bytes atcode(must be > 0)reloc_offsets: parallel array of byte offsets for symbol relocationsreloc_symbols: parallel array of null-terminated C strings naming the symbolsreloc_count: length of both relocation arrays (0 = no relocations)near_address: hint for cave allocation; pass 0 for no preferenceauto_free: ignored by this implementation — shellcode is always stored in the registry somem_shellcode_freecontrols the lifetimeaddress_out: receives the address of the loaded shellcode (required, non-null)