Results 1 to 3 of 3

Thread: Oy! Disassember

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Location
    Middle Earth
    Posts
    156

    Oy! Disassember

    Hi all. I am at the point (in multiple projects) where I need
    to create a run-time disassembler. I basically envision passing it
    the address of a function in memory and getting some sort of
    opcode list which I could dynamically modify/copy/etc.

    My biggest problem is I don't know where to begin. I want
    to explicitly target 32-bit code and work with the x86 instruction
    set exclusively (if this is at all possible). Some things I could use
    right now are:

    * Advice. Is what I'm proposing even feasable?
    * Where can I get a listing of the x86 opcodes?
    * How do I distinguish between code and data? Would
    I even need to worry about this?
    * Any tutorials (boy am I reaching) around on the subject?

    Thanks,

    -CC

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    It is feasible to some extent. Modifying works as long as the code length doesn't change, if it did you wouldn't have space to store the additional instructions. Or if you copied the whole thing to a new location you would have to find and modify each call to this function in the exe. Feasible, but hard and prone to bugs.

    You can get a listing from intel, or from the AoA webpage (see Tutorials).

    You can't distinguish. Code and data look the same in binary. But as long as only valid function addresses are passed you don't need to worry about it. Just disassemble until you hit a ret instruction.

    No tutorials that I know of.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Location
    Middle Earth
    Posts
    156
    Thanks Bee. That gives me a little more confidence in my
    endeavor. BTW, I found an additional site for opcodes in
    the interim:

    http://www.sandpile.org/

    -CC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width