loc
=
todo.pop()
r
=
match_expr(nxt_addr, to_match, [mem_addr_jk, jl_dst_jk, njl_dst_jk])
if
r
and
any
(
filter
(is_dummy_var, loc_db.get_location_names(ircfg.get_loc_key(r[mem_addr_jk])))) \
and
isinstance
(r[jl_dst_jk], ExprInt):
ablk
=
asmcfg.loc_key_to_block(loc_db.get_offset_location(offset))
j_asm
=
ablk.lines[
-
1
]
j_offset
=
j_asm.offset
j_size
=
len
(j_asm.b)
j_dst
=
int
(r[jl_dst_jk])
new_j_asm
=
gen_j_ins(
"JMP"
, j_dst, j_offset, j_size, strict
=
True
)
patches.append((j_offset, new_j_asm))
todo.add(ExprInt(j_dst,
32
))
else
:
for
dst
in
possible_values(nxt_addr):
value
=
dst.value
if
value.is_mem():
logging.warning(
'Bad destination: %s'
, value)
continue
todo.add(value)