libmwemu 0.24.5

x86 32/64bits and system internals emulator, for securely emulating malware and other stuff.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::emu;

pub fn GlobalAddAtomA(emu: &mut emu::Emu) {
    let lp_string = emu
        .maps
        .read_dword(emu.regs().get_esp())
        .expect("kernel32!GlobalAddAtomA cannot read lp_string") as u64;

    let atom_name = emu.maps.read_string(lp_string);

    log_red!(emu, "kernel32!GlobalAddAtomA name: `{}`", atom_name);

    emu.stack_pop32(false);

    // TODO: implement real atom table
    emu.regs_mut().rax = 0xC001; // Return a dummy atom
}