class Cradare2::DSL::Disassembly

Overview

DSL for disassembling code and decompilation.

Defined in:

cradare2/dsl/disasm.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : Client) #

[View source]

Instance Method Detail

def annotated_source(target : UInt64 | Int32 | Int64 | String | Nil = nil) : String #

DWARF / PDB line-annotated decompilation if line metadata is present (CLd).


[View source]
def at(address : UInt64 | Int32 | Int64 | String, count : Int32 = 1) : Array(Model::Instruction) #

Disassembles instructions starting at specified address.


[View source]
def decompile(target : UInt64 | Int32 | Int64 | String | Nil = nil, auto_analyze : Bool = true, fallback_asm : Bool = true) : String #

Decompiles current function or target to C-like pseudocode (pdc, or pdg if ghidra is available). Optionally auto-analyzes function first (af @ <addr>) and falls back to disassembly (pdf) if decompilation fails.


[View source]
def function_instructions(target : UInt64 | Int32 | Int64 | String | Nil = nil) : Array(Model::Instruction) #

Disassembles an entire function returning typed instructions.


[View source]
def function_text(target : UInt64 | Int32 | Int64 | String | Nil = nil) : String #

Disassembles an entire function by name or address as formatted text.


[View source]
def instructions(count : Int32 = 10, at : UInt64 | Int32 | Int64 | String | Nil = nil) : Array(Model::Instruction) #

Disassembles instructions at current seek or specified address returning typed instructions.


[View source]
def side_by_side(target : UInt64 | Int32 | Int64 | String | Nil = nil, auto_analyze : Bool = true) : String #

Decompiles function with side-by-side assembly instruction comparison (pdca).


[View source]
def source_interleaved(target : UInt64 | Int32 | Int64 | String | Nil = nil, count : Int32 = 20) : String #

Disassembles instructions interleaved with high-level source lines (pdls).


[View source]
def text(count : Int32 = 10, at : UInt64 | Int32 | Int64 | String | Nil = nil) : String #

Disassembles instructions at current seek or specified address as text.


[View source]