Wanzhou Ye

14 papers Journal 13Unranked 1
YearRankTypeTitle / Venue / Authors
2019 J jnl
Multim. Tools Appl.
Xiaojuan Zhang, Wanzhou Ye
2018 J jnl
Numer. Algorithms
Jian-Jun Zhang, Jian-Li Zhang, Wanzhou Ye
2017 J jnl
Comput. Optim. Appl.
Yong Zhang, Wanzhou Ye, Jian-Jun Zhang
2017 J jnl
Comput. Math. Appl.
Xiaojuan Zhang, Wanzhou Ye
2017 J jnl
Int. J. Comput. Math.
Yong Zhang, Wanzhou Ye, Jian-Jun Zhang
2015 J jnl
J. Vis. Commun. Image Represent.
Yong Zhang, Wanzhou Ye
2011 J jnl
Discret. Math.
Wanzhou Ye
2011 J jnl
Circuits Syst. Signal Process.
Wanzhou Ye
2010 J jnl
Discret. Math.
Wanzhou Ye, Mingtao Zhang, Yali Ma
2009 J jnl
Discret. Math.
Wanzhou Ye, Liang Wang, Liguo Xu
2008 J jnl
Discret. Math.
Wanzhou Ye, Xianjun Li
2008 J jnl
Ars Comb.
Wanzhou Ye
2003 conf
WAA
Wanzhou Ye
1996 J jnl
IEEE Trans. Signal Process.
Xingwei Zhou, Wanzhou Ye
redb/extractors/decompiler/bninja/function_type.py
← Index redb/extractors/decompiler/bninja/function_type.py python
from enum import Enum

import binaryninja


class FunctionType(Enum):
    USER = "USER"
    LIBRARY = "LIBRARY"
    EXTERNAL = "EXTERNAL"
    THUNK = "THUNK"
    UNKNOWN = "UNKNOWN"


class FunctionTypeAnalysis:
    """Get the function kind based on the symbol type associated to this function"""

    def __init__(self, function):
        """Sets the function type dependent on the symbol type associated to this function. If
        any errors occur, then returns UNKNOWN
        """
        self.func_type = FunctionType.USER

        try:
            symbol_type = function.symbol.type
            # Check if it's an external function (there should not be, already skipping these)
            if symbol_type == binaryninja.enums.SymbolType.ImportedFunctionSymbol:
                self.func_type = FunctionType.EXTERNAL

            # Library functions detected by Binary Ninja
            if symbol_type == binaryninja.enums.SymbolType.LibraryFunctionSymbol:
                self.func_type = FunctionType.LIBRARY

            # Check if it's a thunk function
            if function.is_thunk:
                self.func_type = FunctionType.THUNK

        except Exception as _:
            self.func_type = FunctionType.UNKNOWN

    def get_function_type(self):
        return self.func_type