All Projects → AdamNiederer → cargo-disassemble

AdamNiederer / cargo-disassemble

Licence: AGPL-3.0 license
Disassemble your Rust project with Cargo

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to cargo-disassemble

Pokered
Disassembly of Pokémon Red/Blue
Stars: ✭ 2,924 (+13823.81%)
Mutual labels:  disassembly
oracles-disasm
Disassembly of Oracle of Ages and Seasons
Stars: ✭ 125 (+495.24%)
Mutual labels:  disassembly
cargo-cook
A rust cargo subcommand which cooks your crate
Stars: ✭ 29 (+38.1%)
Mutual labels:  cargo-subcommand
Pokemon Reverse Engineering Tools
Tools for building and disassembling Pokémon Red and Pokémon Crystal
Stars: ✭ 249 (+1085.71%)
Mutual labels:  disassembly
binary-auditing-solutions
Learn the fundamentals of Binary Auditing. Know how HLL mapping works, get more inner file understanding than ever.
Stars: ✭ 61 (+190.48%)
Mutual labels:  disassembly
rom
A disassembly of the ZX Spectrum ROM, created using SkoolKit.
Stars: ✭ 34 (+61.9%)
Mutual labels:  disassembly
Pokegold
Disassembly of Pokémon Gold/Silver
Stars: ✭ 215 (+923.81%)
Mutual labels:  disassembly
The-Great-Escape
Classic ZX Spectrum game "The Great Escape" reverse engineered
Stars: ✭ 69 (+228.57%)
Mutual labels:  disassembly
crackerjack
A collection of crackmes
Stars: ✭ 37 (+76.19%)
Mutual labels:  disassembly
dragon-warrior-disassembly
NES Dragon Warrior software disassembly
Stars: ✭ 46 (+119.05%)
Mutual labels:  disassembly
jetpac-disassembly
JETPAC: annotated source code disassembly of this classic 8-bit game (1983, ZX Spectrum)
Stars: ✭ 36 (+71.43%)
Mutual labels:  disassembly
bmod
bmod parses binaries for modification/patching and disassembles machine code sections.
Stars: ✭ 12 (-42.86%)
Mutual labels:  disassembly
Guanciale
🥓 Grab info needed by Carbonara from executables and disassemblers databases
Stars: ✭ 14 (-33.33%)
Mutual labels:  disassembly
Android Disassembler
Disassemble ANY files including .so (NDK, JNI), Windows PE(EXE, DLL, SYS, etc), linux binaries, libraries, and any other files such as pictures, audios, etc(for fun)files on Android. Capstone-based disassembler application on android. 안드로이드 NDK 공유 라이브러리, Windows 바이너리, etc,... 리버싱 앱
Stars: ✭ 250 (+1090.48%)
Mutual labels:  disassembly
supermetroid
Super Metroid SNES game, disassembled
Stars: ✭ 77 (+266.67%)
Mutual labels:  disassembly
Pokegold Spaceworld
Disassembly of the Pokémon Gold and Silver 1997 Space World demo
Stars: ✭ 246 (+1071.43%)
Mutual labels:  disassembly
tenda-reverse
Reverse engineering, getting root access to Tenda MW6 wifi mesh router
Stars: ✭ 90 (+328.57%)
Mutual labels:  disassembly
cargo-release
Cargo subcommand `release`: everything about releasing a rust crate.
Stars: ✭ 854 (+3966.67%)
Mutual labels:  cargo-subcommand
cargo-aur
Prepare Rust projects to be released on the Arch Linux User Repository
Stars: ✭ 49 (+133.33%)
Mutual labels:  cargo-subcommand
cargo-supply-chain
Gather author, contributor and publisher data on crates in your dependency graph.
Stars: ✭ 287 (+1266.67%)
Mutual labels:  cargo-subcommand

cargo-disassemble

Easily disassemble your Rust project

Usage

cargo-disassemble attempts to emulate the command-line interface of other cargo subcommands. Notice that the function argument is optional - not including it will disassemble all functions in the current crate.

USAGE:
    cargo-disassemble [FLAGS] [OPTIONS] [function]

FLAGS:
        --all-features           Enable all features
        --everything             Include functions not defined by the current crate
    -h, --help                   Prints help information
        --intel                  Emit intel-flavored x86 ASM
        --no-default-features    Enable no_default features
        --optimize               Optimize the binary as much as possible
        --release                Compile in release mode
    -V, --version                Prints version information

OPTIONS:
        --features <features>    Features to enable, if any

ARGS:
    <function>    The name of the function to be decompiled

Example

Given the function:

#[inline(never)]
fn is_branch_label(line: &str) -> bool {
    line.starts_with(".LBB")
}

we can disassemble the optimized version of is_branch_label with the following command:

$ cargo disassemble is_branch_label --release --optimize --intel

which will yield this result:

cargo_disassemble::is_branch_label
        cmp	rsi, 4
        je	.LBB66_4
        cmp	rsi, 5
        jb	.LBB66_3
        cmp	byte ptr [rdi + 4], -65
        jle	.LBB66_3
.LBB66_4:
        push	rbp
        mov	rbp, rsp
        sub	rsp, 16
        mov	qword ptr [rbp - 16], rdi
        mov	qword ptr [rbp - 8], rsi
        mov	al, 1
        lea	rcx, [rip + .Lbyte_str.1e]
        cmp	rdi, rcx
        lea	rsp, [rsp + 16]
        pop	rbp
        je	.LBB66_6
        cmp	dword ptr [rdi], 1111641134
        je	.LBB66_6
.LBB66_3:
        xor	eax, eax
        ret

Caveats

When compiling in release mode, rustc will often aggressively inline smaller functions. Because inlined functions typically don’t have a freestanding copy in the final binary, they may not be disassembled. Adding the #[inline(never)] attribute to a function will ensure it’s included, but may also change the code within the function.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].