Rachel E. O. Roxas

11 papers A* 1C 6Unranked 4
YearRankTypeTitle / Venue / Authors
2021 C conf
PACLIC
Rachel E. O. Roxas, Joseph Marvin Imperial, Angelica H. De La Cruz
2018 conf
LoResMT@AMTA
Nathaniel Oco, Rachel E. O. Roxas
2017 conf
IALP
Julie Ann A. Salido, Nathaniel Oco, Rachel E. O. Roxas, Emmanuel Malaay, Michael Simora, Ronald John Cabatic
2012 C conf
PACLIC
Nathaniel Oco, Rachel E. O. Roxas
2010 C conf
PACLIC
Evan Liz Cantoja Buhay, Marie Joy Padilla Evardone, Hansel Baguio Nocon, Davis Muhajereen Dimalen, Rachel E. O. Roxas
2009 C conf
PACLIC
Shirley N. Dita, Rachel E. O. Roxas, Paul Salvador Inventado
2008 C conf
PACLIC
Eileen Pamela Tiu, Rachel E. O. Roxas
2008 C ed.
PACLIC
Rachel E. O. Roxas
2000 A* conf
ACL
Rachel E. O. Roxas, Allan Borra
1993 conf
HUG
Rachel E. O. Roxas
1991 conf
TPHOLs
Rachel E. O. Roxas, Malcolm C. Newey
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