def _prepare_guid(op, prefix): if op.type == o_mem: guid_ptr = Pointer(op.value) if guid_ptr.type != "EFI_GUID" or not is_uname( guid_ptr.name) or guid_ptr.name in ["Protocol", "HandlerType"]: guid_data1 = str("%.8x" % get_wide_dword(op.value)).upper() guid_ptr.name = "%s_PROTOCOL_%s_GUID" % (prefix, guid_data1) else: print("Do not know how to extract GUID ptr from %s at 0x%X" % (op, op.ea)) return return GUID(ptr=guid_ptr)
def _data(cls, offset): name = idc.Name(offset) if ida_name.is_uname(name): return hashlib.md5(name).hexdigest() return None
def _data(cls, offset): name = ida_name.get_name(offset) if ida_name.is_uname(name): # TODO: get flags here return {'name': name} return None
def data(self): name = ida_name.get_name(self.offset) if ida_name.is_uname(name): # TODO: get flags here return {'name': name, 'flags': 0} return None
def data(self): name = idc.Name(self.offset) if ida_name.is_uname(name): return None return hashlib.md5(name).hexdigest()
def _is_uname(name): return is_uname(name) and name not in ( 'class', 'new', )