I’m looking for a library that will disassemble x86 code into some sort of object model that I can then use to write routines that analyze the code. I’m not interested in a library that converts x86 code to text disassembly–I’ve found more than a few of those, but they’re not that useful since I want to do some work on top of the code that I disassemble. Oh, and I’d like it to be .Net code (VB or C# preferable).
Share
Reflector doesn’t do x86 as far as I know.
Your best bet is using the scripting or COM interface to OllyDbg or IDA Pro.
I would recommend IDA Pro if you can afford it. IDA has a very rich API, active development and lots of documentation. You can run it in autonomous mode, I believe using the ‘-AS’ switch. See http://www.hex-rays.com/idapro/idadoc/417.htm for more info on the command line arguments.
I also ran into libdasm, but never used it, so not sure how good it is. libdasm looks like C/C++ so it should be simple to write an API wrapper in C#.