(bv)
| 22 | |
| 23 | |
| 24 | def get_platform_info(bv): |
| 25 | result = { |
| 26 | "sym_lookups": [], |
| 27 | } |
| 28 | |
| 29 | if bv.platform is None: |
| 30 | return result |
| 31 | |
| 32 | def check_prefix(platform_name, prefixes): |
| 33 | for prefix in prefixes: |
| 34 | if platform_name.startswith(prefix): |
| 35 | return True |
| 36 | return False |
| 37 | |
| 38 | for p in platform_info: |
| 39 | if check_prefix(bv.platform.name, p["prefixes"]): |
| 40 | break |
| 41 | else: |
| 42 | return result |
| 43 | |
| 44 | syms = map(bv.get_symbol_by_raw_name, p["sym_lookups"]) |
| 45 | result["sym_lookups"] = [sym.address for sym in filter(lambda x: x is not None, syms)] |
| 46 | |
| 47 | return result |
| 48 | |
| 49 | def propagate_var_name(func, mlil_ssa_func, ssa_var, name, ty): |
| 50 | instructions = list(map(lambda instr: instr.instr_index, mlil_ssa_func.get_ssa_var_uses(ssa_var))) |
no test coverage detected