def get_func_of(ea): """Return the function that this address belongs to, if any.""" func = idaapi.get_func(ea) if func: return func.startEA else: return None