SCEMU the lib
Usage
Download the maps32.zip or maps64.zip from: https://github.com/sha0coder/scemu/releases/download/maps/maps32.zip https://github.com/sha0coder/scemu/releases/download/maps/maps64.zip
Uncompress it somewhere, in the example it's on /tmp/ but dont use tmp.
Create an emu32 or emu64 and it's important to set the maps folder.
use emu32;
let mut emu = emu32;
emu.set_maps_folder;
emu.init;
Load your shellcode or PE binary and run the emulator. Zero parameter means emulate for-ever.
emu.load_code;
emu.set_verbose;
emu.run;
Or if you prefer call specific function.
emu.load_code;
let crypto_key_gen = 0x40112233;
let ret_addr = 0x40110000; // any place safe to return.
let param1 = 0x33;
let param2_out_buff = emu.alloc;
emu.maps.memset; // non necesary, by default alloc create zeros.
emu.maps.write_spaced_bytes; // example of initialization.
// call function
emu.regs.set_eip;
emu.stack_push32;
emu.stack_push32;
emu.stack_push32;
emu.run; // emulate until arrive to ret_addr
emu.step;
// check result
println!;
emu.maps.dump;