This project is read-only.

Try to disassemble a x64 code and throws



First of all thanks for this great lib! Very easy to use :)

Now, I have a problem, I'm using it with an X64 code and the Library is throwing an IndexOutOfRangeException.

Seems to be a problem with some Junk code.

You can download a zip file, with code to test it
A png showing how things should be disassembled
A txt with SharpDisasm just before it throws.

This link is the good one:

The code to reproduce the bug
var code = File.ReadAllBytes(@"c:\dev\codex64");

SharpDisasm.ArchitectureMode mode = SharpDisasm.ArchitectureMode.x86_64;
SharpDisasm.Disassembler.Translator.IncludeAddress = true;
SharpDisasm.Disassembler.Translator.IncludeBinary = true;
var disasm = new SharpDisasm.Disassembler(code, mode, 0, true);
var instructions = disasm.Disassemble().ToList();


swell wrote Sep 15, 2015 at 8:50 AM

Oops, just FYI don't click the link above, use this link:

The link above is to delete it :)

spazzarama wrote Oct 5, 2015 at 9:44 AM


Sorry I didn't see this message until now, the linked file is no longer available, could you please either re-upload somewhere or attach to your post?