![]() |
miasm
Reverse engineering framework
|


Public Member Functions | |
| def | __init__ (self, arch, attrib, loc_db) |
| def | get_ir (self, instr) |
| def | new_ircfg (self, *args, **kwargs) |
| def | new_ircfg_from_asmcfg (self, asmcfg, *args, **kwargs) |
| def | instr2ir (self, instr) |
| def | add_instr_to_ircfg (self, instr, ircfg, loc_key=None, gen_pc_updt=False) |
| def | gen_pc_update (self, assignments, instr) |
| def | add_instr_to_current_state (self, instr, block, assignments, ir_blocks_all, gen_pc_updt) |
| def | add_asmblock_to_ircfg (self, block, ircfg, gen_pc_updt=False) |
| def | add_block (self, block, gen_pc_updt=False) |
| def | add_bloc (self, block, gen_pc_updt=False) |
| def | get_next_loc_key (self, instr) |
| def | get_loc_key_for_instr (self, instr) |
| def | gen_loc_key_and_expr (self, size) |
| def | expr_fix_regs_for_mode (self, expr, *args, **kwargs) |
| def | expraff_fix_regs_for_mode (self, expr, *args, **kwargs) |
| def | irbloc_fix_regs_for_mode (self, irblock, *args, **kwargs) |
| def | is_pc_written (self, block) |
| def | set_empty_dst_to_next (self, block, ir_blocks) |
| def | post_add_asmblock_to_ircfg (self, block, ircfg, ir_blocks) |
Public Attributes | |
| pc | |
| sp | |
| arch | |
| attrib | |
| loc_db | |
| IRDst | |
Intermediate representation object Allow native assembly to intermediate representation traduction
| def miasm.ir.ir.IntermediateRepresentation.__init__ | ( | self, | |
| arch, | |||
| attrib, | |||
| loc_db | |||
| ) |
Reimplemented in miasm.ir.ir.ir.
| def miasm.ir.ir.IntermediateRepresentation.add_asmblock_to_ircfg | ( | self, | |
| block, | |||
| ircfg, | |||
gen_pc_updt = False |
|||
| ) |
Add a native block to the current IR @block: native assembly block @ircfg: IRCFG instance @gen_pc_updt: insert PC update effects between instructions
Reimplemented in miasm.arch.mips32.ira.ir_a_mips32l, and miasm.arch.arm.sem.ir_arml.


| def miasm.ir.ir.IntermediateRepresentation.add_bloc | ( | self, | |
| block, | |||
gen_pc_updt = False |
|||
| ) |
DEPRECATED function Use add_asmblock_to_ircfg instead of add_bloc

| def miasm.ir.ir.IntermediateRepresentation.add_block | ( | self, | |
| block, | |||
gen_pc_updt = False |
|||
| ) |
DEPRECATED function Use add_asmblock_to_ircfg instead of add_block

| def miasm.ir.ir.IntermediateRepresentation.add_instr_to_current_state | ( | self, | |
| instr, | |||
| block, | |||
| assignments, | |||
| ir_blocks_all, | |||
| gen_pc_updt | |||
| ) |
Add the IR effects of an instruction to the current state. Returns a bool: * True if the current assignments list must be split * False in other cases. @instr: native instruction @block: native block source @assignments: list of current AssignBlocks @ir_blocks_all: list of additional effects @gen_pc_updt: insert PC update effects between instructions
Reimplemented in miasm.ir.analysis.ira, and miasm.arch.ppc.ira.ir_a_ppc32b.


| def miasm.ir.ir.IntermediateRepresentation.add_instr_to_ircfg | ( | self, | |
| instr, | |||
| ircfg, | |||
loc_key = None, |
|||
gen_pc_updt = False |
|||
| ) |
Add the native instruction @instr to the @ircfg @instr: instruction instance @ircfg: IRCFG instance @loc_key: loc_key instance of the instruction destination @gen_pc_updt: insert PC update effects between instructions

| def miasm.ir.ir.IntermediateRepresentation.expr_fix_regs_for_mode | ( | self, | |
| expr, | |||
| * | args, | ||
| ** | kwargs | ||
| ) |
| def miasm.ir.ir.IntermediateRepresentation.expraff_fix_regs_for_mode | ( | self, | |
| expr, | |||
| * | args, | ||
| ** | kwargs | ||
| ) |
| def miasm.ir.ir.IntermediateRepresentation.gen_loc_key_and_expr | ( | self, | |
| size | |||
| ) |
Return a loc_key and it's corresponding ExprLoc @size: size of expression

| def miasm.ir.ir.IntermediateRepresentation.gen_pc_update | ( | self, | |
| assignments, | |||
| instr | |||
| ) |

| def miasm.ir.ir.IntermediateRepresentation.get_ir | ( | self, | |
| instr | |||
| ) |
Reimplemented in miasm.arch.x86.sem.ir_x86_16, miasm.arch.ppc.sem.ir_ppc32b, miasm.arch.msp430.sem.ir_msp430, miasm.arch.mips32.sem.ir_mips32l, miasm.arch.mep.sem.ir_mepb, miasm.arch.arm.sem.ir_arml, and miasm.arch.aarch64.sem.ir_aarch64l.

| def miasm.ir.ir.IntermediateRepresentation.get_loc_key_for_instr | ( | self, | |
| instr | |||
| ) |
Returns the loc_key associated to an instruction @instr: current instruction

| def miasm.ir.ir.IntermediateRepresentation.get_next_loc_key | ( | self, | |
| instr | |||
| ) |

| def miasm.ir.ir.IntermediateRepresentation.instr2ir | ( | self, | |
| instr | |||
| ) |


| def miasm.ir.ir.IntermediateRepresentation.irbloc_fix_regs_for_mode | ( | self, | |
| irblock, | |||
| * | args, | ||
| ** | kwargs | ||
| ) |

| def miasm.ir.ir.IntermediateRepresentation.is_pc_written | ( | self, | |
| block | |||
| ) |
Return the first Assignblk of the @block in which PC is written @block: IRBlock instance
| def miasm.ir.ir.IntermediateRepresentation.new_ircfg | ( | self, | |
| * | args, | ||
| ** | kwargs | ||
| ) |
Return a new instance of IRCFG
| def miasm.ir.ir.IntermediateRepresentation.new_ircfg_from_asmcfg | ( | self, | |
| asmcfg, | |||
| * | args, | ||
| ** | kwargs | ||
| ) |
Return a new instance of IRCFG from an @asmcfg @asmcfg: AsmCFG instance

| def miasm.ir.ir.IntermediateRepresentation.post_add_asmblock_to_ircfg | ( | self, | |
| block, | |||
| ircfg, | |||
| ir_blocks | |||
| ) |


| def miasm.ir.ir.IntermediateRepresentation.set_empty_dst_to_next | ( | self, | |
| block, | |||
| ir_blocks | |||
| ) |

| miasm.ir.ir.IntermediateRepresentation.arch |
| miasm.ir.ir.IntermediateRepresentation.attrib |
| miasm.ir.ir.IntermediateRepresentation.IRDst |
| miasm.ir.ir.IntermediateRepresentation.loc_db |
| miasm.ir.ir.IntermediateRepresentation.pc |
| miasm.ir.ir.IntermediateRepresentation.sp |