icedland / iced

Blazing fast and correct x86/x64 disassembler, assembler, decoder, encoder for Rust, .NET, Java, Python, Lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decode Trap code?

wolfoops opened this issue · comments

Hi,
To decode ""\xeb\x01\xeb\xb8\x01\x02\x03\x04\x90\x90\x90"" x2 (a simple trap code, or is it a proper naming?), is there way to output

00007FFAC46ACDAF EB01                 jmp    7FFAC46ACDB2 
00007FFAC46ACDB1 EB                   db     EB <Manual edit 'nop'90 to EB
00007FFAC46ACDB2 B801020304           mov    eax,4030201 
00007FFAC46ACDB7 90                   nop 
00007FFAC46ACDB8 90                   nop 
00007FFAC46ACDB9 90                   nop 

instead of (trapped)

00007FFAC46ACDA4 EB01                 jmp    7FFAC46ACDA7 
00007FFAC46ACDA6 EBB8                 jmp    7FFAC46ACD60 
00007FFAC46ACDA8 0102                 add    [rdx],eax 
00007FFAC46ACDAA 030490               add    eax,[rax+rdx*4] 
00007FFAC46ACDAD 90                   nop 
00007FFAC46ACDAE 90                   nop 

beside handle the input piece by piece or line by line?
(note: I'm using rust build lua version)
Thank you~