miasm
Reverse engineering framework
|
Public Member Functions | |
def | __init__ (self, arch, attrib, bin_stream, loc_db, **kwargs) |
def | dis_block (self, offset) |
def | dis_multiblock (self, offset, blocks=None, job_done=None) |
def | apply_splitting (self, blocks) |
def | dis_instr (self, offset) |
Public Attributes | |
arch | |
attrib | |
bin_stream | |
loc_db | |
dont_dis | |
split_dis | |
follow_call | |
dontdis_retcall | |
lines_wd | |
blocs_wd | |
dis_block_callback | |
dont_dis_nulstart_bloc | |
dont_dis_retcall_funcs | |
Disassembly engine, taking care of disassembler options and mutli-block strategy. Engine options: + Object supporting membership test (offset in ..) - dont_dis: stop the current disassembly branch if reached - split_dis: force a basic block end if reached, with a next constraint on its successor - dont_dis_retcall_funcs: stop disassembly after a call to one of the given functions + On/Off - follow_call: recursively disassemble CALL destinations - dontdis_retcall: stop on CALL return addresses - dont_dis_nulstart_bloc: stop if a block begin with a few \x00 + Number - lines_wd: maximum block's size (in number of instruction) - blocs_wd: maximum number of distinct disassembled block + callback(mdis, cur_block, offsets_to_dis) - dis_block_callback: callback after each new disassembled block
def miasm.core.asmblock.disasmEngine.__init__ | ( | self, | |
arch, | |||
attrib, | |||
bin_stream, | |||
loc_db, | |||
** | kwargs | ||
) |
Instantiate a new disassembly engine @arch: targeted architecture @attrib: architecture attribute @bin_stream: bytes source @kwargs: (optional) custom options
def miasm.core.asmblock.disasmEngine.apply_splitting | ( | self, | |
blocks | |||
) |
Consider @blocks' bto destinations and split block in @blocks if one of these destinations jumps in the middle of this block. In order to work, they must be only one block in @self per loc_key in @blocks: Asmcfg
def miasm.core.asmblock.disasmEngine.dis_block | ( | self, | |
offset | |||
) |
Disassemble the block at offset @offset and return the created AsmBlock @offset: targeted offset to disassemble
def miasm.core.asmblock.disasmEngine.dis_instr | ( | self, | |
offset | |||
) |
Disassemble one instruction at offset @offset and return the corresponding instruction instance @offset: targeted offset to disassemble
def miasm.core.asmblock.disasmEngine.dis_multiblock | ( | self, | |
offset, | |||
blocks = None , |
|||
job_done = None |
|||
) |
Disassemble every block reachable from @offset regarding specific disasmEngine conditions Return an AsmCFG instance containing disassembled blocks @offset: starting offset @blocks: (optional) AsmCFG instance of already disassembled blocks to merge with
miasm.core.asmblock.disasmEngine.arch |
miasm.core.asmblock.disasmEngine.attrib |
miasm.core.asmblock.disasmEngine.bin_stream |
miasm.core.asmblock.disasmEngine.blocs_wd |
miasm.core.asmblock.disasmEngine.dis_block_callback |
miasm.core.asmblock.disasmEngine.dont_dis |
miasm.core.asmblock.disasmEngine.dont_dis_nulstart_bloc |
miasm.core.asmblock.disasmEngine.dont_dis_retcall_funcs |
miasm.core.asmblock.disasmEngine.dontdis_retcall |
miasm.core.asmblock.disasmEngine.follow_call |
miasm.core.asmblock.disasmEngine.lines_wd |
miasm.core.asmblock.disasmEngine.loc_db |
miasm.core.asmblock.disasmEngine.split_dis |