miasm
Reverse engineering framework
miasm.core.asmblock Namespace Reference

Classes

class  AsmBlock
 
class  AsmBlockBad
 
class  AsmCFG
 
class  AsmConstraint
 
class  AsmConstraintNext
 
class  AsmConstraintTo
 
class  AsmRaw
 
class  BlockChain
 
class  BlockChainWedge
 
class  disasmEngine
 

Functions

def conservative_asm (mnemo, instr, symbols, conservative)
 
def fix_expr_val (expr, symbols)
 
def fix_loc_offset (loc_db, loc_key, offset, modified)
 
def group_constrained_blocks (asmcfg)
 
def get_blockchains_address_interval (blockChains, dst_interval)
 
def resolve_symbol (blockChains, loc_db, dst_interval=None)
 
def get_block_loc_keys (block)
 
def assemble_block (mnemo, block, conservative=False)
 
def asmblock_final (mnemo, asmcfg, blockChains, conservative=False)
 
def asm_resolve_final (mnemo, asmcfg, dst_interval=None)
 

Variables

 log_asmblock = logging.getLogger("asmblock")
 
 console_handler = logging.StreamHandler()
 
 bbl_simplifier = DiGraphSimplifier()
 

Function Documentation

◆ asm_resolve_final()

def miasm.core.asmblock.asm_resolve_final (   mnemo,
  asmcfg,
  dst_interval = None 
)
Resolve and assemble @asmcfg into interval
@dst_interval
Here is the call graph for this function:
Here is the caller graph for this function:

◆ asmblock_final()

def miasm.core.asmblock.asmblock_final (   mnemo,
  asmcfg,
  blockChains,
  conservative = False 
)
Resolve and assemble @blockChains until fixed point is
reached
Here is the call graph for this function:
Here is the caller graph for this function:

◆ assemble_block()

def miasm.core.asmblock.assemble_block (   mnemo,
  block,
  conservative = False 
)
Assemble a @block
@conservative: (optional) use original bytes when possible
Here is the call graph for this function:
Here is the caller graph for this function:

◆ conservative_asm()

def miasm.core.asmblock.conservative_asm (   mnemo,
  instr,
  symbols,
  conservative 
)
Asm instruction;
Try to keep original instruction bytes if it exists
Here is the caller graph for this function:

◆ fix_expr_val()

def miasm.core.asmblock.fix_expr_val (   expr,
  symbols 
)
Resolve an expression @expr using @symbols
Here is the caller graph for this function:

◆ fix_loc_offset()

def miasm.core.asmblock.fix_loc_offset (   loc_db,
  loc_key,
  offset,
  modified 
)
Fix the @loc_key offset to @offset. If the @offset has changed, add @loc_key
to @modified
@loc_db: current loc_db
Here is the caller graph for this function:

◆ get_block_loc_keys()

def miasm.core.asmblock.get_block_loc_keys (   block)
Extract loc_keys used by @block
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_blockchains_address_interval()

def miasm.core.asmblock.get_blockchains_address_interval (   blockChains,
  dst_interval 
)
Compute the interval used by the pinned @blockChains
Check if the placed chains are in the @dst_interval
Here is the caller graph for this function:

◆ group_constrained_blocks()

def miasm.core.asmblock.group_constrained_blocks (   asmcfg)
Return the BlockChains list built from grouped blocks in asmcfg linked by
asm_constraint_next
@asmcfg: an AsmCfg instance
Here is the caller graph for this function:

◆ resolve_symbol()

def miasm.core.asmblock.resolve_symbol (   blockChains,
  loc_db,
  dst_interval = None 
)
Place @blockChains in the @dst_interval
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ bbl_simplifier

miasm.core.asmblock.bbl_simplifier = DiGraphSimplifier()

◆ console_handler

miasm.core.asmblock.console_handler = logging.StreamHandler()

◆ log_asmblock

miasm.core.asmblock.log_asmblock = logging.getLogger("asmblock")