miasm
Reverse engineering framework
|
Classes | |
class | additional_info |
class | bs_dgpreg |
class | bs_dr0gbr |
class | bs_dr0gp |
class | instruction_sh4 |
class | mn_sh4 |
class | sh4_arg |
class | sh4_bgpreg |
class | sh4_dgbrimm8 |
class | sh4_dgpreg |
class | sh4_dgpreg_imm |
class | sh4_dgpregpdec |
class | sh4_dgpregpinc |
class | sh4_dpc16imm |
class | sh4_dpc32imm |
class | sh4_dr |
class | sh4_freg |
class | sh4_gpreg |
class | sh4_gpreg_noarg |
class | sh4_imm |
class | sh4_pc32imm |
class | sh4_reg |
class | sh4_simm |
Functions | |
def | cb_deref_pcimm (tokens) |
def | cb_pcandimmimm (tokens) |
def | cb_deref_mem (tokens) |
def | cb_predec (tokens) |
def | cb_postinc (tokens) |
def | cb_regdisp (tokens) |
def | cb_regreg (tokens) |
def | addop (name, fields, args=None, alias=False) |
Variables | |
jra = ExprId('jra', 32) | |
jrb = ExprId('jrb', 32) | |
jrc = ExprId('jrc', 32) | |
PLUS = Suppress("+") | |
MULT = Suppress("*") | |
MINUS = Suppress("-") | |
AND = Suppress("&") | |
LBRACK = Suppress("[") | |
RBRACK = Suppress("]") | |
DEREF = Suppress("@") | |
COMMA = Suppress(",") | |
LPARENT = Suppress("(") | |
RPARENT = Suppress(")") | |
tuple | ref_pc = (LPARENT + reg_info_pc.parser + COMMA + base_expr + RPARENT).setParseAction(cb_deref_pcimm) |
tuple | ref_pcandimm = (LPARENT + reg_info_pc.parser + AND + base_expr + COMMA + base_expr + RPARENT).setParseAction(cb_pcandimmimm) |
tuple | pcdisp = (reg_info_pc.parser + AND + base_expr + PLUS + base_expr).setParseAction(cb_pcandimmimm) |
PTR = Suppress('PTR') | |
tuple | deref_pc = (DEREF + ref_pc).setParseAction(cb_deref_mem) |
tuple | deref_pcimm = (DEREF + ref_pcandimm).setParseAction(cb_deref_mem) |
tuple | dgpregs_base = (DEREF + gpregs.parser).setParseAction(cb_deref_mem) |
tuple | dgpregs_predec = (DEREF + MINUS + gpregs.parser).setParseAction(cb_predec) |
tuple | dgpregs_postinc = (DEREF + gpregs.parser + PLUS).setParseAction(cb_postinc) |
tuple | dgpregs = dgpregs_base | dgpregs_predec | dgpregs_postinc |
tuple | d_gpreg_gpreg = (DEREF + LPARENT + gpregs.parser + COMMA + gpregs.parser + RPARENT).setParseAction(cb_regdisp) |
tuple | dgpregs_p = dgpregs_predec | dgpregs_postinc |
tuple | dgpregs_ir = (DEREF + LPARENT + gpregs.parser + COMMA + base_expr + RPARENT).setParseAction(cb_regdisp) |
tuple | dgbr_imm = (DEREF + LPARENT + reg_info_gbr.parser + COMMA + base_expr + RPARENT).setParseAction(cb_regdisp) |
tuple | dgbr_reg = (DEREF + LPARENT + reg_info_gbr.parser + COMMA + gpregs.parser + RPARENT).setParseAction(cb_regreg) |
rn = bs(l=4, cls=(sh4_gpreg,), fname="rn") | |
rm = bs(l=4, cls=(sh4_gpreg,), fname="rm") | |
d08_rn = bs(l=4, cls=(sh4_dgpreg,), fname="rn", sz = 8) | |
d16_rn = bs(l=4, cls=(sh4_dgpreg,), fname="rn", sz = 16) | |
d32_rn = bs(l=4, cls=(sh4_dgpreg,), fname="rn", sz = 32) | |
d08_rm = bs(l=4, cls=(sh4_dgpreg,), fname="rm", sz = 8) | |
d16_rm = bs(l=4, cls=(sh4_dgpreg,), fname="rm", sz = 16) | |
d32_rm = bs(l=4, cls=(sh4_dgpreg,), fname="rm", sz = 32) | |
brm = bs(l=3, cls=(sh4_bgpreg,), fname="brm") | |
brn = bs(l=3, cls=(sh4_bgpreg,), fname="brn") | |
d08rnimm = bs(l=4, fname="rn", cls=(sh4_dgpreg_imm,), sz = 8) | |
d16rnimm = bs(l=4, fname="rn", cls=(sh4_dgpreg_imm,), sz = 16) | |
d32rnimm = bs(l=4, fname="rn", cls=(sh4_dgpreg_imm,), sz = 32) | |
d08rmimm = bs(l=4, fname="rm", cls=(sh4_dgpreg_imm,), sz = 8) | |
d16rmimm = bs(l=4, fname="rm", cls=(sh4_dgpreg_imm,), sz = 16) | |
d32rmimm = bs(l=4, fname="rm", cls=(sh4_dgpreg_imm,), sz = 32) | |
btype = bs(l=4, fname="btype", order=-1) | |
s08imm = bs(l=8, cls=(sh4_simm,), fname="imm") | |
s12imm = bs(l=12, cls=(sh4_simm,), fname="imm") | |
dpc16imm = bs(l=8, cls=(sh4_dpc16imm,), fname="pcimm", sz=16) | |
dpc32imm = bs(l=8, cls=(sh4_dpc32imm,), fname="pcimm", sz=32) | |
dimm4 = bs(l=4, fname='disp', order=-1) | |
d08gbrimm8 = bs(l=8, cls=(sh4_dgbrimm8,), fname='disp', sz=8) | |
d16gbrimm8 = bs(l=8, cls=(sh4_dgbrimm8,), fname='disp', sz=16) | |
d32gbrimm8 = bs(l=8, cls=(sh4_dgbrimm8,), fname='disp', sz=32) | |
pc32imm = bs(l=8, cls=(sh4_pc32imm,), fname="pcimm") | |
d08rnpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=8, fname="rn") | |
d08rmpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=8, fname="rm") | |
d16rnpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=16, fname="rn") | |
d16rmpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=16, fname="rm") | |
d32rnpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=32, fname="rn") | |
d32rmpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=32, fname="rm") | |
d08rnpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=8, fname="rn") | |
d08rmpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=8, fname="rm") | |
d16rnpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=16, fname="rn") | |
d16rmpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=16, fname="rm") | |
d32rnpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=32, fname="rn") | |
d32rmpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=32, fname="rm") | |
u08imm = bs(l=8, cls=(sh4_imm,), fname="imm") | |
dr0gbr = bs(l=0, cls=(bs_dr0gbr,), sz=8) | |
d08gpreg = bs(l=4, cls=(bs_dgpreg,), sz=8) | |
d32gpreg = bs(l=4, cls=(bs_dgpreg,), sz=32) | |
frn = bs(l=4, cls=(sh4_freg,), fname="frn") | |
frm = bs(l=4, cls=(sh4_freg,), fname="frm") | |
bd08r0gp = bs(l=4, cls=(bs_dr0gp,), sz=8) | |
bd16r0gp = bs(l=4, cls=(bs_dr0gp,), sz=16) | |
bd32r0gp = bs(l=4, cls=(bs_dr0gp,), sz=32) | |
drn = bs(l=3, cls=(sh4_dr,), fname="drn") | |
drm = bs(l=3, cls=(sh4_dr,), fname="drm") | |
def miasm.arch.sh4.arch.addop | ( | name, | |
fields, | |||
args = None , |
|||
alias = False |
|||
) |
def miasm.arch.sh4.arch.cb_deref_mem | ( | tokens | ) |
def miasm.arch.sh4.arch.cb_deref_pcimm | ( | tokens | ) |
def miasm.arch.sh4.arch.cb_pcandimmimm | ( | tokens | ) |
def miasm.arch.sh4.arch.cb_postinc | ( | tokens | ) |
def miasm.arch.sh4.arch.cb_predec | ( | tokens | ) |
def miasm.arch.sh4.arch.cb_regdisp | ( | tokens | ) |
def miasm.arch.sh4.arch.cb_regreg | ( | tokens | ) |
miasm.arch.sh4.arch.AND = Suppress("&") |
miasm.arch.sh4.arch.brm = bs(l=3, cls=(sh4_bgpreg,), fname="brm") |
miasm.arch.sh4.arch.brn = bs(l=3, cls=(sh4_bgpreg,), fname="brn") |
miasm.arch.sh4.arch.btype = bs(l=4, fname="btype", order=-1) |
miasm.arch.sh4.arch.COMMA = Suppress(",") |
miasm.arch.sh4.arch.d08_rm = bs(l=4, cls=(sh4_dgpreg,), fname="rm", sz = 8) |
miasm.arch.sh4.arch.d08_rn = bs(l=4, cls=(sh4_dgpreg,), fname="rn", sz = 8) |
miasm.arch.sh4.arch.d08gbrimm8 = bs(l=8, cls=(sh4_dgbrimm8,), fname='disp', sz=8) |
miasm.arch.sh4.arch.d08rmimm = bs(l=4, fname="rm", cls=(sh4_dgpreg_imm,), sz = 8) |
miasm.arch.sh4.arch.d08rmpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=8, fname="rm") |
miasm.arch.sh4.arch.d08rmpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=8, fname="rm") |
miasm.arch.sh4.arch.d08rnimm = bs(l=4, fname="rn", cls=(sh4_dgpreg_imm,), sz = 8) |
miasm.arch.sh4.arch.d08rnpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=8, fname="rn") |
miasm.arch.sh4.arch.d08rnpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=8, fname="rn") |
miasm.arch.sh4.arch.d16_rm = bs(l=4, cls=(sh4_dgpreg,), fname="rm", sz = 16) |
miasm.arch.sh4.arch.d16_rn = bs(l=4, cls=(sh4_dgpreg,), fname="rn", sz = 16) |
miasm.arch.sh4.arch.d16gbrimm8 = bs(l=8, cls=(sh4_dgbrimm8,), fname='disp', sz=16) |
miasm.arch.sh4.arch.d16rmimm = bs(l=4, fname="rm", cls=(sh4_dgpreg_imm,), sz = 16) |
miasm.arch.sh4.arch.d16rmpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=16, fname="rm") |
miasm.arch.sh4.arch.d16rmpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=16, fname="rm") |
miasm.arch.sh4.arch.d16rnimm = bs(l=4, fname="rn", cls=(sh4_dgpreg_imm,), sz = 16) |
miasm.arch.sh4.arch.d16rnpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=16, fname="rn") |
miasm.arch.sh4.arch.d16rnpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=16, fname="rn") |
miasm.arch.sh4.arch.d32_rm = bs(l=4, cls=(sh4_dgpreg,), fname="rm", sz = 32) |
miasm.arch.sh4.arch.d32_rn = bs(l=4, cls=(sh4_dgpreg,), fname="rn", sz = 32) |
miasm.arch.sh4.arch.d32gbrimm8 = bs(l=8, cls=(sh4_dgbrimm8,), fname='disp', sz=32) |
miasm.arch.sh4.arch.d32rmimm = bs(l=4, fname="rm", cls=(sh4_dgpreg_imm,), sz = 32) |
miasm.arch.sh4.arch.d32rmpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=32, fname="rm") |
miasm.arch.sh4.arch.d32rmpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=32, fname="rm") |
miasm.arch.sh4.arch.d32rnimm = bs(l=4, fname="rn", cls=(sh4_dgpreg_imm,), sz = 32) |
miasm.arch.sh4.arch.d32rnpdec = bs(l=4, cls=(sh4_dgpregpinc,), op='predec', sz=32, fname="rn") |
miasm.arch.sh4.arch.d32rnpinc = bs(l=4, cls=(sh4_dgpregpinc,), op='postinc', sz=32, fname="rn") |
tuple miasm.arch.sh4.arch.d_gpreg_gpreg = (DEREF + LPARENT + gpregs.parser + COMMA + gpregs.parser + RPARENT).setParseAction(cb_regdisp) |
miasm.arch.sh4.arch.DEREF = Suppress("@") |
tuple miasm.arch.sh4.arch.deref_pc = (DEREF + ref_pc).setParseAction(cb_deref_mem) |
tuple miasm.arch.sh4.arch.deref_pcimm = (DEREF + ref_pcandimm).setParseAction(cb_deref_mem) |
tuple miasm.arch.sh4.arch.dgbr_imm = (DEREF + LPARENT + reg_info_gbr.parser + COMMA + base_expr + RPARENT).setParseAction(cb_regdisp) |
tuple miasm.arch.sh4.arch.dgbr_reg = (DEREF + LPARENT + reg_info_gbr.parser + COMMA + gpregs.parser + RPARENT).setParseAction(cb_regreg) |
tuple miasm.arch.sh4.arch.dgpregs = dgpregs_base | dgpregs_predec | dgpregs_postinc |
tuple miasm.arch.sh4.arch.dgpregs_base = (DEREF + gpregs.parser).setParseAction(cb_deref_mem) |
tuple miasm.arch.sh4.arch.dgpregs_ir = (DEREF + LPARENT + gpregs.parser + COMMA + base_expr + RPARENT).setParseAction(cb_regdisp) |
tuple miasm.arch.sh4.arch.dgpregs_p = dgpregs_predec | dgpregs_postinc |
tuple miasm.arch.sh4.arch.dgpregs_postinc = (DEREF + gpregs.parser + PLUS).setParseAction(cb_postinc) |
tuple miasm.arch.sh4.arch.dgpregs_predec = (DEREF + MINUS + gpregs.parser).setParseAction(cb_predec) |
miasm.arch.sh4.arch.dimm4 = bs(l=4, fname='disp', order=-1) |
miasm.arch.sh4.arch.dpc16imm = bs(l=8, cls=(sh4_dpc16imm,), fname="pcimm", sz=16) |
miasm.arch.sh4.arch.dpc32imm = bs(l=8, cls=(sh4_dpc32imm,), fname="pcimm", sz=32) |
miasm.arch.sh4.arch.jra = ExprId('jra', 32) |
miasm.arch.sh4.arch.jrb = ExprId('jrb', 32) |
miasm.arch.sh4.arch.jrc = ExprId('jrc', 32) |
miasm.arch.sh4.arch.LBRACK = Suppress("[") |
miasm.arch.sh4.arch.LPARENT = Suppress("(") |
miasm.arch.sh4.arch.MINUS = Suppress("-") |
miasm.arch.sh4.arch.MULT = Suppress("*") |
miasm.arch.sh4.arch.pc32imm = bs(l=8, cls=(sh4_pc32imm,), fname="pcimm") |
tuple miasm.arch.sh4.arch.pcdisp = (reg_info_pc.parser + AND + base_expr + PLUS + base_expr).setParseAction(cb_pcandimmimm) |
miasm.arch.sh4.arch.PLUS = Suppress("+") |
miasm.arch.sh4.arch.PTR = Suppress('PTR') |
miasm.arch.sh4.arch.RBRACK = Suppress("]") |
tuple miasm.arch.sh4.arch.ref_pc = (LPARENT + reg_info_pc.parser + COMMA + base_expr + RPARENT).setParseAction(cb_deref_pcimm) |
tuple miasm.arch.sh4.arch.ref_pcandimm = (LPARENT + reg_info_pc.parser + AND + base_expr + COMMA + base_expr + RPARENT).setParseAction(cb_pcandimmimm) |
miasm.arch.sh4.arch.RPARENT = Suppress(")") |