Git Product home page Git Product logo

lend's Introduction

lend

Tiny x86 Length Disassembler

The inspiration for the design of this x86 length disassembler came from Zdisasm by Z0MBiE (I can't actually find this on his page but it's around, just google code search for zdisasm.h) and three ideas presented nicely in a single forum thread:

http://www.devmaster.net/forums/showthread.php?t=2311

The three ideas came from the following posts:

  1. The original post by Nick (a purely logical length disassembler)
  2. The post by earlnsk (a Russian switch case length disassembler) The Russian length disassembler can be found here: http://hack-expo.void.ru/groups/blt/text/disasm.txt (Russian) http://z0mbie.daemonlab.org/disasme.txt (English)
  3. The post by WolfgangSt (bitmap lookup tables)

With these ideas I decided to make a tiny length disassemler in c.

My length disassembler can use logical statements or lookup tables (32 byte bitmap tables) to perform the checks required to determine instruction length. Currently the smallest footprint I have managed is 589 bytes (LengthDisasm function length + 4x32 byte lookup tables). I'm sure there are further optimizations possible (even without using assembly).

I haven't looked into it too much but I don't think it would to too difficult to adapt this approach for x86_64.

lend's People

Contributors

greenbender avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.