-
Notifications
You must be signed in to change notification settings - Fork 269
Closed
Description
Hello! I'm encountering an issue while assembling the decoded executable. For testing purposes, I'm using a simple Hello World program, and when I attempt to assemble it, I get the following error:
IcedError { error: "Can't encode an invalid instruction : 0x40000C (bad)" }
This is my code:
fn disassemble_exe(exe_bytes: &[u8]) -> Vec<u8> {
let mut decoder = Decoder::with_ip(64, exe_bytes, 0x00400000, DecoderOptions::NONE);
let mut assembler = CodeAssembler::new(64).unwrap();
while decoder.can_decode() {
assembler.add_instruction(decoder.decode()).unwrap();
}
let result = assembler.assemble(0x00400000).unwrap();
result
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels