miasm
Reverse engineering framework
|
Public Member Functions | |
def | additional_info (self) |
def | gen_modes (cls, subcls, name, bases, dct, fields) |
def | getmn (cls, name) |
def | getpc (cls, attrib=None) |
def | getsp (cls, attrib=None) |
def | getbits (cls, bitstream, attrib, start, n) |
def | endian_offset (cls, attrib, offset) |
def | value (self, mode) |
Public Member Functions inherited from miasm.core.cpu.cls_mn | |
def | guess_mnemo (cls, bs, attrib, pre_dis_info, offset) |
def | reset_class (self) |
def | init_class (self) |
def | add_pre_dis_info (self, prefix=None) |
def | getbytes (cls, bs, offset, l) |
def | pre_dis (cls, v_o, attrib, offset) |
def | post_dis (self) |
def | check_mnemo (cls, fields) |
def | mod_fields (cls, fields) |
def | dis (cls, bs_o, mode_o=None, offset=0) |
def | fromstring (cls, text, loc_db, mode=None) |
def | dup_info (self, infos) |
def | get_cls_instance (cls, cc, mode, infos=None) |
def | asm (cls, instr, loc_db=None) |
def | filter_asm_candidates (cls, instr, candidates) |
def | encodefields (self, decoded) |
def | decoded2bytes (self, result) |
def | gen_args (self, args) |
def | args2str (self) |
def | __str__ (self) |
def | parse_prefix (self, v) |
def | set_dst_symbol (self, loc_db) |
def | getdstflow (self, loc_db) |
Public Member Functions inherited from miasm.core.cpu.metamn | |
def | __new__ (mcs, name, bases, dct) |
Static Public Attributes | |
int | num = 0 |
all_mn = list() | |
all_mn_mode = defaultdict(list) | |
all_mn_name = defaultdict(list) | |
all_mn_inst = defaultdict(list) | |
bintree = dict() | |
instruction = instruction_mep | |
regs = mep_regs_module | |
int | delayslot = 0 |
string | name = "mep" |
dictionary | pc = {'l': PC, 'b': PC} |
Static Public Attributes inherited from miasm.core.cpu.cls_mn | |
list | args_symb = [] |
instruction = instruction | |
int | alignment = 1 |
Additional Inherited Members | |
Public Attributes inherited from miasm.core.cpu.cls_mn | |
args | |
fields_order | |
to_decode | |
args_symb | |
Toshiba MeP-c4 disassembler & assembler
def miasm.arch.mep.arch.mn_mep.additional_info | ( | self | ) |
Define instruction side effects # GV: not fully understood yet When used, it must return an object that implements specific variables, such as except_on_instr. Notes: - it must be implemented ! - it could be moved to the cls_mn class
def miasm.arch.mep.arch.mn_mep.endian_offset | ( | cls, | |
attrib, | |||
offset | |||
) |
Adjust the byte offset according to the endianness
def miasm.arch.mep.arch.mn_mep.gen_modes | ( | cls, | |
subcls, | |||
name, | |||
bases, | |||
dct, | |||
fields | |||
) |
Ease populating internal variables used to disassemble & assemble, such as self.all_mn_mode, self.all_mn_name and self.all_mn_inst Notes: - it must be implemented ! - it could be moved to the cls_mn class. All miasm architectures use the same code Args: cls: ? sublcs: name: mnemonic name bases: ? dct: ? fields: ? Returns: a list of ?
def miasm.arch.mep.arch.mn_mep.getbits | ( | cls, | |
bitstream, | |||
attrib, | |||
start, | |||
n | |||
) |
Return an integer of n bits at the 'start' offset Note: code from miasm/arch/mips32/arch.py
Reimplemented from miasm.core.cpu.cls_mn.
def miasm.arch.mep.arch.mn_mep.getmn | ( | cls, | |
name | |||
) |
Get the mnemonic name Notes: - it must be implemented ! - it could be moved to the cls_mn class. Most miasm architectures use the same code Args: cls: the mnemonic class name: the mnemonic string
def miasm.arch.mep.arch.mn_mep.getpc | ( | cls, | |
attrib = None |
|||
) |
"Return the ExprId that represents the Program Counter. Notes: - mandatory for the symbolic execution - PC is defined in regs.py Args: attrib: architecture dependent attributes (here, l or b)
def miasm.arch.mep.arch.mn_mep.getsp | ( | cls, | |
attrib = None |
|||
) |
"Return the ExprId that represents the Stack Pointer. Notes: - mandatory for the symbolic execution - SP is defined in regs.py Args: attrib: architecture dependent attributes (here, l or b)
def miasm.arch.mep.arch.mn_mep.value | ( | self, | |
mode | |||
) |
Adjust the assembled instruction based on the endianness Note: code inspired by miasm/arch/mips32/arch.py
Reimplemented from miasm.core.cpu.cls_mn.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |