Classes | |
class | asm_bloc |
class | asm_constraint |
class | asm_constraint_bad |
class | asm_constraint_next |
class | asm_constraint_to |
class | asm_label |
class | asm_raw |
class | asm_symbol_pool |
class | basicblocs |
class | BlockChain |
class | BlockChainWedge |
class | disasmEngine |
Functions | |
def | is_int |
def | expr_is_label |
def | expr_is_int_or_label |
def | dis_bloc |
def | split_bloc |
def | dis_bloc_all |
def | bloc2graph |
def | conservative_asm |
def | fix_expr_val |
def | guess_blocks_size |
def | fix_label_offset |
def | group_constrained_blocks |
def | get_blockchains_address_interval |
def | resolve_symbol |
def | filter_exprid_label |
def | get_block_labels |
def | assemble_block |
def | asmbloc_final |
def | sanity_check_blocks |
def | asm_resolve_final |
def | blist2graph |
def | find_parents |
def | bloc_blink |
def | getbloc_around |
def | getbloc_parents |
def | getbloc_parents_strict |
def | bloc_find_path_next |
def | bloc_merge |
Variables | |
tuple | log_asmbloc = logging.getLogger("asmblock") |
tuple | console_handler = logging.StreamHandler() |
def miasm2.core.asmbloc.asm_resolve_final | ( | mnemo, | |
blocks, | |||
symbol_pool, | |||
dst_interval = None |
|||
) |
Resolve and assemble @blocks using @symbol_pool into interval @dst_interval
Definition at line 1045 of file asmbloc.py.
def miasm2.core.asmbloc.asmbloc_final | ( | mnemo, | |
blocks, | |||
blockChains, | |||
symbol_pool, | |||
conservative = False |
|||
) |
Resolve and assemble @blockChains using @symbol_pool until fixed point is reached
Definition at line 975 of file asmbloc.py.
def miasm2.core.asmbloc.assemble_block | ( | mnemo, | |
block, | |||
symbol_pool, | |||
conservative = False |
|||
) |
Assemble a @block using @symbol_pool @conservative: (optional) use original bytes when possible
Definition at line 930 of file asmbloc.py.
def miasm2.core.asmbloc.blist2graph | ( | ab | ) |
ab: list of asmbloc return: graph of asmbloc
Definition at line 1076 of file asmbloc.py.
def miasm2.core.asmbloc.bloc2graph | ( | blocks, | |
label = False , |
|||
lines = True |
|||
) |
def miasm2.core.asmbloc.bloc_blink | ( | blocs | ) |
Definition at line 1126 of file asmbloc.py.
def miasm2.core.asmbloc.bloc_find_path_next | ( | blocs, | |
blocby_label, | |||
a, | |||
b, | |||
path = None |
|||
) |
Definition at line 1204 of file asmbloc.py.
def miasm2.core.asmbloc.bloc_merge | ( | blocs, | |
dont_merge = [] |
|||
) |
Definition at line 1225 of file asmbloc.py.
def miasm2.core.asmbloc.conservative_asm | ( | mnemo, | |
instr, | |||
symbols, | |||
conservative | |||
) |
Asm instruction; Try to keep original instruction bytes if it exists
Definition at line 611 of file asmbloc.py.
def miasm2.core.asmbloc.dis_bloc | ( | mnemo, | |
pool_bin, | |||
cur_bloc, | |||
offset, | |||
job_done, | |||
symbol_pool, | |||
dont_dis = [] , |
|||
split_dis = [
] , |
|||
follow_call = False , |
|||
dontdis_retcall = False , |
|||
lines_wd = None , |
|||
dis_bloc_callback = None , |
|||
dont_dis_nulstart_bloc = False , |
|||
attrib = {} |
|||
) |
def miasm2.core.asmbloc.dis_bloc_all | ( | mnemo, | |
pool_bin, | |||
offset, | |||
job_done, | |||
symbol_pool, | |||
dont_dis = [] , |
|||
split_dis = [] , |
|||
follow_call = False , |
|||
dontdis_retcall = False , |
|||
blocs_wd = None , |
|||
lines_wd = None , |
|||
blocs = None , |
|||
dis_bloc_callback = None , |
|||
dont_dis_nulstart_bloc = False , |
|||
attrib = {} |
|||
) |
def miasm2.core.asmbloc.expr_is_int_or_label | ( | e | ) |
Definition at line 32 of file asmbloc.py.
def miasm2.core.asmbloc.expr_is_label | ( | e | ) |
Definition at line 28 of file asmbloc.py.
def miasm2.core.asmbloc.filter_exprid_label | ( | exprs | ) |
def miasm2.core.asmbloc.find_parents | ( | blocs, | |
l | |||
) |
Definition at line 1118 of file asmbloc.py.
def miasm2.core.asmbloc.fix_expr_val | ( | expr, | |
symbols | |||
) |
def miasm2.core.asmbloc.fix_label_offset | ( | symbol_pool, | |
label, | |||
offset, | |||
modified | |||
) |
Fix the @label offset to @offset. If the @offset has changed, add @label to @modified @symbol_pool: current symbol_pool
Definition at line 682 of file asmbloc.py.
def miasm2.core.asmbloc.get_block_labels | ( | block | ) |
def miasm2.core.asmbloc.get_blockchains_address_interval | ( | blockChains, | |
dst_interval | |||
) |
Compute the interval used by the pinned @blockChains Check if the placed chains are in the @dst_interval
Definition at line 848 of file asmbloc.py.
def miasm2.core.asmbloc.getbloc_around | ( | blocs, | |
a, | |||
level = 3 , |
|||
done = None , |
|||
blocby_label = None |
|||
) |
Definition at line 1131 of file asmbloc.py.
def miasm2.core.asmbloc.getbloc_parents | ( | blocs, | |
a, | |||
level = 3 , |
|||
done = None , |
|||
blocby_label = None |
|||
) |
Definition at line 1156 of file asmbloc.py.
def miasm2.core.asmbloc.getbloc_parents_strict | ( | blocs, | |
a, | |||
level = 3 , |
|||
rez = None , |
|||
done = None , |
|||
blocby_label = None |
|||
) |
Definition at line 1179 of file asmbloc.py.
def miasm2.core.asmbloc.group_constrained_blocks | ( | symbol_pool, | |
blocks | |||
) |
Return the BlockChains list built from grouped asm blocks linked by asm_constraint_next @blocks: a list of asm block
Definition at line 803 of file asmbloc.py.
def miasm2.core.asmbloc.guess_blocks_size | ( | mnemo, | |
blocks | |||
) |
def miasm2.core.asmbloc.is_int | ( | a | ) |
Definition at line 23 of file asmbloc.py.
def miasm2.core.asmbloc.resolve_symbol | ( | blockChains, | |
symbol_pool, | |||
dst_interval = None |
|||
) |
Place @blockChains in the @dst_interval
Definition at line 863 of file asmbloc.py.
def miasm2.core.asmbloc.sanity_check_blocks | ( | blocks | ) |
Do sanity checks on blocks' constraints: * no multiple next constraint to same block * no next constraint to self
Definition at line 1025 of file asmbloc.py.
def miasm2.core.asmbloc.split_bloc | ( | mnemo, | |
attrib, | |||
pool_bin, | |||
blocs, | |||
symbol_pool, | |||
more_ref = None , |
|||
dis_bloc_callback = None |
|||
) |
Definition at line 450 of file asmbloc.py.
tuple miasm2.core.asmbloc.console_handler = logging.StreamHandler() |
Definition at line 17 of file asmbloc.py.
tuple miasm2.core.asmbloc.log_asmbloc = logging.getLogger("asmblock") |
Definition at line 16 of file asmbloc.py.