(self)
Find the most likely function declaration from the embedded collection of prototypes, set it to self.prototype,
        and update self.calling_convention with the declaration.

        :return: None
Find the most likely function declaration from the embedded collection of prototypes, set it to self.prototype,
        and update self.calling_convention with the declaration.
Find the most likely function declaration from the embedded collection of prototypes set it to self . prototype and update self . calling_convention with the declaration .
def find_declaration(self):
        """
        Find the most likely function declaration from the embedded collection of prototypes, set it to self.prototype,
        and update self.calling_convention with the declaration.

        :return: None
        """

        # determine the library name

        if not self.is_plt:
            binary_name = self.binary_name
            if binary_name not in SIM_LIBRARIES:
                return
        else:
            binary_name = None
            # PLT entries must have the same declaration as their jump targets
            # Try to determine which library this PLT entry will jump to
            edges = self.transition_graph.edges()
            if len(edges) == 0: return
            node = next(iter(edges))[1]
            if len(edges) == 1 and (type(node) is HookNode or type(node) is SyscallNode):
                target = node.addr
                if target in self._function_manager:
                    target_func = self._function_manager[target]
                    binary_name = target_func.binary_name

        if binary_name is None:
            return

        library = SIM_LIBRARIES.get(binary_name, None)

        if library is None:
            return

        if not library.has_prototype(self.name):
            return

        proto = library.get_prototype(self.name)
        self.prototype = proto.with_arch(self.project.arch)
def find_declaration ( self ) : # determine the library name if not self . is_plt : binary_name = self . binary_name if binary_name not in SIM_LIBRARIES : return else : binary_name = None # PLT entries must have the same declaration as their jump targets # Try to determine which library this PLT entry will jump to edges = self . transition_graph . edges ( ) if len ( edges ) == 0 : return node = next ( iter ( edges ) ) [ 1 ] if len ( edges ) == 1 and ( type ( node ) is HookNode or type ( node ) is SyscallNode ) : target = node . addr if target in self . _function_manager : target_func = self . _function_manager [ target ] binary_name = target_func . binary_name if binary_name is None : return library = SIM_LIBRARIES . get ( binary_name , None ) if library is None : return if not library . has_prototype ( self . name ) : return proto = library . get_prototype ( self . name ) self . prototype = proto . with_arch ( self . project . arch )