R. M. Suresh

12 papers Journal 8Unranked 4
YearRankTypeTitle / Venue / Authors
2020 J jnl
Concurr. Comput. Pract. Exp.
M. Rajkumar, R. M. Suresh, R. Sasikumar
2020 J jnl
Concurr. Comput. Pract. Exp.
T. Ramesh, R. M. Suresh
2019 J jnl
Clust. Comput.
P. Shobha Rani, R. M. Suresh, R. Sethukarasi
2019 J jnl
Mob. Networks Appl.
M. Padmavathi, R. M. Suresh
2016 J jnl
Wirel. Pers. Commun.
C. S. Anita, R. M. Suresh
2014 J jnl
Int. J. Metadata Semant. Ontologies
R. M. Suresh, K. Dinakaran, Rebecca Amulya
2012 conf
CCSEIT
K. Selvi, R. M. Suresh
2012 J jnl
Int. J. Image Graph.
R. M. Suresh, N. Jayalakshmi
2010 conf
ICDIP
R. M. Suresh, N. Jayalakshmi
2007 J jnl
Image Vis. Comput.
R. M. Suresh, S. Arumugam
2006 conf
ICDIM
R. M. Suresh, R. Padmajavalli
2003 conf
WILF
R. M. Suresh, S. Arumugam
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