![]() |
miasm
Reverse engineering framework
|
Classes | |
| class | additional_info |
| class | bs_mod_name_prio4 |
| class | bs_mod_name_prio5 |
| class | bs_mod_name_prio6 |
| class | instruction_ppc |
| class | mn_ppc |
| class | ppc_arg |
| class | ppc_crfreg |
| class | ppc_crfreg_noarg |
| class | ppc_deref32 |
| class | ppc_divert_conditional_branch |
| class | ppc_float |
| class | ppc_gpreg |
| class | ppc_gpreg_noarg |
| class | ppc_gpreg_or_0 |
| class | ppc_gpreg_or_0_noarg |
| class | ppc_imm |
| class | ppc_reg |
| class | ppc_s14imm_branch |
| class | ppc_s16imm |
| class | ppc_s24imm_branch |
| class | ppc_spr |
| class | ppc_tbr |
| class | ppc_u02imm_noarg |
| class | ppc_u04imm |
| class | ppc_u05imm |
| class | ppc_u08imm |
| class | ppc_u16imm |
| class | ppc_vex |
Functions | |
| def | cb_deref_imm_reg (tokens) |
| def | ppc_swap_10 (v) |
| def | ppc_bo_bi_to_mnemo (bo, bi, prefer_taken=True, default_taken=True) |
| def | ppc_all_bo_bi () |
| def | ppcop (name, fields, args=None, alias=False) |
Variables | |
| log = logging.getLogger("ppcdis") | |
| console_handler = logging.StreamHandler() | |
| LPARENTHESIS = Suppress(Literal("(")) | |
| RPARENTHESIS = Suppress(Literal(")")) | |
| tuple | deref_reg_disp = (Optional(base_expr) + LPARENTHESIS + gpregs.parser + RPARENTHESIS).setParseAction(cb_deref_imm_reg) |
| tuple | deref_reg = (LPARENTHESIS + gpregs.parser + RPARENTHESIS).setParseAction(cb_deref_imm_reg) |
| tuple | deref = deref_reg | deref_reg_disp |
| rd = bs(l=5, cls=(ppc_gpreg,)) | |
| ra = bs(l=5, cls=(ppc_gpreg,)) | |
| ra_or_0 = bs(l=5, cls=(ppc_gpreg_or_0,)) | |
| rb = bs(l=5, cls=(ppc_gpreg,)) | |
| rs = bs(l=5, cls=(ppc_gpreg,)) | |
| crfd = bs(l=3, cls=(ppc_crfreg,)) | |
| crfs = bs(l=3, cls=(ppc_crfreg,)) | |
| sh = bs(l=5, cls=(ppc_u05imm,)) | |
| mb = bs(l=5, cls=(ppc_u05imm,)) | |
| me = bs(l=5, cls=(ppc_u05imm,)) | |
| nb = bs(l=5, cls=(ppc_u05imm,)) | |
| crm = bs(l=8, cls=(ppc_u08imm,)) | |
| sr = bs(l=4, cls=(ppc_u04imm,)) | |
| spr = bs(l=10, cls=(ppc_spr,)) | |
| tbr = bs(l=10, cls=(ppc_tbr,)) | |
| u05imm = bs(l=5, cls=(ppc_u05imm,)) | |
| s24imm_branch = bs(l=24, cls=(ppc_s24imm_branch,), fname="imm") | |
| s14imm_branch = bs(l=14, cls=(ppc_s14imm_branch,), fname="imm") | |
| s16imm = bs(l=16, cls=(ppc_s16imm,), fname="imm") | |
| u16imm = bs(l=16, cls=(ppc_u16imm,), fname="imm") | |
| u08imm = bs(l=5, cls=(ppc_u08imm,), fname="imm") | |
| u02imm_noarg = bs(l=2, cls=(ppc_u02imm_noarg,), fname="imm") | |
| ra_noarg = bs(l=5, cls=(ppc_gpreg_noarg,), fname="ra") | |
| ra_or_0_noarg = bs(l=5, cls=(ppc_gpreg_or_0_noarg,), fname="ra") | |
| dregimm = bs(l=16, cls=(ppc_deref32,)) | |
| rc_mod = bs_mod_name(l=1, mn_mod=['', '.'], fname='rc') | |
| frd = bs(l=5, cls=(ppc_float,)) | |
| frb = bs(l=5, cls=(ppc_float,)) | |
| frs = bs(l=5, cls=(ppc_float,)) | |
| fm = bs(l=8, cls=(ppc_u08imm,)) | |
| va = bs(l=5, cls=(ppc_vex,)) | |
| vb = bs(l=5, cls=(ppc_vex,)) | |
| vd = bs(l=5, cls=(ppc_vex,)) | |
| rb_noarg = bs(l=5, cls=(ppc_gpreg_noarg,), fname="rb") | |
| dictionary | arith1_name |
| dictionary | logic2_name = {"ORI": 0b011000, "XORI": 0b011010, "ANDI.": 0b011100 } |
| dictionary | slogic2_name = {"ORIS": 0b011001, "XORIS": 0b011011, "ANDIS.": 0b011101 } |
| dictionary | arith3_name |
| dictionary | xor_name = { "EQV": 0b0100011100, "XOR": 0b0100111100 } |
| dictionary | arith4_name |
| dictionary | arith5_name = {"CNTLZW": 0b00000, "EXTSH": 0b11100, "EXTSB": 0b11101 } |
| dictionary | crlogic_name |
| dictionary | rotins_name = {"RLWIMI": 0b010100, "RLWINM": 0b010101 } |
| bs_arith1_name = bs_name(l=6, name=arith1_name) | |
| dictionary | load1_name |
| dictionary | load1_name_u |
| dictionary | load2_name |
| dictionary | load2_name_u = {"LWZU": 0b0001, "LBZU": 0b0011, "LHZU": 0b1001, "LHAU": 0b1011} |
| dictionary | store1_name |
| dictionary | store1_name_u |
| dictionary | store2_name = { "STW": 0b0100, "STB": 0b0110, "STH": 0b1100, "STMW": 0b1111 } |
| dictionary | store2_name_u = { "STWU": 0b0101, "STBU": 0b0111, "STHU": 0b1101 } |
| dictionary | logic1_name |
| dictionary | dcb_name |
| dictionary | load1_name_float = {"LFS": 0b110000, "LFD": 0b110010 } |
| dictionary | load1_name_float_u = {"LFSU": 0b110001, "LFDU": 0b110011 } |
| dictionary | store1_name_float = {"STFS": 0b110100, "STFD": 0b110110 } |
| dictionary | store1_name_float_u = {"STFSU": 0b110101, "STFDU": 0b110111 } |
| dictionary | load1_name_vex |
| branch_to_reg = bs_mod_name_prio4(l=1, mn_mod=['LR', 'CTR'], fname='btoreg') | |
| branch_lk = bs_mod_name_prio5(l=1, mn_mod=['', 'L'], fname='lk') | |
| branch_aa = bs_mod_name_prio6(l=1, mn_mod=['', 'A'], fname='aa') | |
| def miasm.arch.ppc.arch.cb_deref_imm_reg | ( | tokens | ) |
| def miasm.arch.ppc.arch.ppc_all_bo_bi | ( | ) |

| def miasm.arch.ppc.arch.ppc_bo_bi_to_mnemo | ( | bo, | |
| bi, | |||
prefer_taken = True, |
|||
default_taken = True |
|||
| ) |

| def miasm.arch.ppc.arch.ppc_swap_10 | ( | v | ) |
| def miasm.arch.ppc.arch.ppcop | ( | name, | |
| fields, | |||
args = None, |
|||
alias = False |
|||
| ) |
| dictionary miasm.arch.ppc.arch.arith1_name |
| dictionary miasm.arch.ppc.arch.arith3_name |
| dictionary miasm.arch.ppc.arch.arith4_name |
| dictionary miasm.arch.ppc.arch.arith5_name = {"CNTLZW": 0b00000, "EXTSH": 0b11100, "EXTSB": 0b11101 } |
| miasm.arch.ppc.arch.branch_aa = bs_mod_name_prio6(l=1, mn_mod=['', 'A'], fname='aa') |
| miasm.arch.ppc.arch.branch_lk = bs_mod_name_prio5(l=1, mn_mod=['', 'L'], fname='lk') |
| miasm.arch.ppc.arch.branch_to_reg = bs_mod_name_prio4(l=1, mn_mod=['LR', 'CTR'], fname='btoreg') |
| miasm.arch.ppc.arch.bs_arith1_name = bs_name(l=6, name=arith1_name) |
| miasm.arch.ppc.arch.console_handler = logging.StreamHandler() |
| miasm.arch.ppc.arch.crfd = bs(l=3, cls=(ppc_crfreg,)) |
| miasm.arch.ppc.arch.crfs = bs(l=3, cls=(ppc_crfreg,)) |
| dictionary miasm.arch.ppc.arch.crlogic_name |
| miasm.arch.ppc.arch.crm = bs(l=8, cls=(ppc_u08imm,)) |
| dictionary miasm.arch.ppc.arch.dcb_name |
| tuple miasm.arch.ppc.arch.deref = deref_reg | deref_reg_disp |
| tuple miasm.arch.ppc.arch.deref_reg = (LPARENTHESIS + gpregs.parser + RPARENTHESIS).setParseAction(cb_deref_imm_reg) |
| tuple miasm.arch.ppc.arch.deref_reg_disp = (Optional(base_expr) + LPARENTHESIS + gpregs.parser + RPARENTHESIS).setParseAction(cb_deref_imm_reg) |
| miasm.arch.ppc.arch.dregimm = bs(l=16, cls=(ppc_deref32,)) |
| miasm.arch.ppc.arch.fm = bs(l=8, cls=(ppc_u08imm,)) |
| dictionary miasm.arch.ppc.arch.load1_name |
| dictionary miasm.arch.ppc.arch.load1_name_float = {"LFS": 0b110000, "LFD": 0b110010 } |
| dictionary miasm.arch.ppc.arch.load1_name_float_u = {"LFSU": 0b110001, "LFDU": 0b110011 } |
| dictionary miasm.arch.ppc.arch.load1_name_u |
| dictionary miasm.arch.ppc.arch.load1_name_vex |
| dictionary miasm.arch.ppc.arch.load2_name |
| dictionary miasm.arch.ppc.arch.load2_name_u = {"LWZU": 0b0001, "LBZU": 0b0011, "LHZU": 0b1001, "LHAU": 0b1011} |
| miasm.arch.ppc.arch.log = logging.getLogger("ppcdis") |
| dictionary miasm.arch.ppc.arch.logic1_name |
| dictionary miasm.arch.ppc.arch.logic2_name = {"ORI": 0b011000, "XORI": 0b011010, "ANDI.": 0b011100 } |
| miasm.arch.ppc.arch.LPARENTHESIS = Suppress(Literal("(")) |
| miasm.arch.ppc.arch.mb = bs(l=5, cls=(ppc_u05imm,)) |
| miasm.arch.ppc.arch.me = bs(l=5, cls=(ppc_u05imm,)) |
| miasm.arch.ppc.arch.nb = bs(l=5, cls=(ppc_u05imm,)) |
| miasm.arch.ppc.arch.ra_noarg = bs(l=5, cls=(ppc_gpreg_noarg,), fname="ra") |
| miasm.arch.ppc.arch.ra_or_0 = bs(l=5, cls=(ppc_gpreg_or_0,)) |
| miasm.arch.ppc.arch.ra_or_0_noarg = bs(l=5, cls=(ppc_gpreg_or_0_noarg,), fname="ra") |
| miasm.arch.ppc.arch.rb_noarg = bs(l=5, cls=(ppc_gpreg_noarg,), fname="rb") |
| miasm.arch.ppc.arch.rc_mod = bs_mod_name(l=1, mn_mod=['', '.'], fname='rc') |
| dictionary miasm.arch.ppc.arch.rotins_name = {"RLWIMI": 0b010100, "RLWINM": 0b010101 } |
| miasm.arch.ppc.arch.RPARENTHESIS = Suppress(Literal(")")) |
| miasm.arch.ppc.arch.s14imm_branch = bs(l=14, cls=(ppc_s14imm_branch,), fname="imm") |
| miasm.arch.ppc.arch.s16imm = bs(l=16, cls=(ppc_s16imm,), fname="imm") |
| miasm.arch.ppc.arch.s24imm_branch = bs(l=24, cls=(ppc_s24imm_branch,), fname="imm") |
| miasm.arch.ppc.arch.sh = bs(l=5, cls=(ppc_u05imm,)) |
| dictionary miasm.arch.ppc.arch.slogic2_name = {"ORIS": 0b011001, "XORIS": 0b011011, "ANDIS.": 0b011101 } |
| miasm.arch.ppc.arch.sr = bs(l=4, cls=(ppc_u04imm,)) |
| dictionary miasm.arch.ppc.arch.store1_name |
| dictionary miasm.arch.ppc.arch.store1_name_float = {"STFS": 0b110100, "STFD": 0b110110 } |
| dictionary miasm.arch.ppc.arch.store1_name_float_u = {"STFSU": 0b110101, "STFDU": 0b110111 } |
| dictionary miasm.arch.ppc.arch.store1_name_u |
| dictionary miasm.arch.ppc.arch.store2_name = { "STW": 0b0100, "STB": 0b0110, "STH": 0b1100, "STMW": 0b1111 } |
| dictionary miasm.arch.ppc.arch.store2_name_u = { "STWU": 0b0101, "STBU": 0b0111, "STHU": 0b1101 } |
| miasm.arch.ppc.arch.u02imm_noarg = bs(l=2, cls=(ppc_u02imm_noarg,), fname="imm") |
| miasm.arch.ppc.arch.u05imm = bs(l=5, cls=(ppc_u05imm,)) |
| miasm.arch.ppc.arch.u08imm = bs(l=5, cls=(ppc_u08imm,), fname="imm") |
| miasm.arch.ppc.arch.u16imm = bs(l=16, cls=(ppc_u16imm,), fname="imm") |
| dictionary miasm.arch.ppc.arch.xor_name = { "EQV": 0b0100011100, "XOR": 0b0100111100 } |