in tools/latrodectus/latro_str_decrypt.py [0:0]
def get_string_decrypt_funcs(imagebase: int) -> list[int]:
result = list()
text_seg = ida_segment.get_segm_by_name(".text")
if text_seg:
text_start = text_seg.start_ea
for ea in idautils.Segments():
matches = RULES.match(data=idaapi.get_bytes(ea, get_segm_end(ea) - ea))
for match in matches:
print(f"Matched rule: {match.rule}")
for offset in match.strings:
result.append(text_start + offset[0])
return result