Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/koukyosyumei/mydisassembler

Disassembler for X86-64 implemented from scratch in C++
https://github.com/koukyosyumei/mydisassembler

assembly disassembler disassembly x86-64

Last synced: 3 days ago
JSON representation

Disassembler for X86-64 implemented from scratch in C++

Awesome Lists containing this project

README

        

# MyDisassembler

Welcome to MyDisassembler, a project designed to help learners understand X86-64 machine codes, assembly language, ELF format, and disassembly strategies. With this tool, we can explore the intricacies of low-level programming and gain insights into how binaries are structured and executed.

You might find [our memo](MEMO.md) helpful if you're new to X86-64 and assembly (like us).

## Install

To get started with MyDisassembler, follow these simple steps:

- Clone the Repository:

```bash
git clone https://github.com:Koukyosyumei/MyDisassembler.git
```

- Build the Project:

```bash
cd MyDisassembler
./script/build.sh
```

## Usage

Once installed, you can use MyDisassembler to disassemble binary files and delve into their assembly code. Here's how you can use it:

```bash
./build/script/mydisas example/jmp.o
```

```yaml
section: .text ----

40 <_start>:
40: mov eax 0x00000000 ( b8 0 0 0 0 )
45: cmp eax 0x00 ( 83 f8 0 )
48: jz 4e ; relative offset = 4 ( 74 4 )
4a: jmp 52 ; relative offset = 6 ( eb 6 )
4c: jmp 40 <_start> ; relative offset = -14 ( eb f2 )

4e :
4e: push rsp ( 54 )
4f: xor eax eax ( 31 c0 )
51: ret ( c3 )

52 :
52: push rdi ( 57 )
53: xor ecx ecx ( 31 c9 )
55: ret ( c3 )
-------------------
Done!
```

## Features

- Implemented entirely from scratch in C++
- Supports both linear sweeping and recursive descent disassembly strategies
- Handles most basic operations with precision
- Capable of parsing ELF headers for deeper analysis

## Future Improvements

- Expand test coverage for enhanced reliability
- Add support for VEX Prefix
- Incorporate additional instructions, including floating-point operations
- Introduce support for AT&T syntax

Feel free to contribute to MyDisassembler and make it even better!