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::tests::helpers;
use crate::*;

#[test]
// this tests a linux 64bits static ELF binary.
pub fn elf64lin_static_helloworld() {
    helpers::setup();

    let mut emu = emu64();

    let sample = helpers::test_data_path("elf64lin_static_helloworld.bin");
    emu.load_code(&sample);
    emu.run(Some(0x44ab87));

    assert_eq!(emu.regs().rcx, 0x4cc2d0);
    assert_eq!(emu.pos, 11229);
}