Rajat Garg

15 papers A 1B 3C 1Journal 2Unranked 8
YearRankTypeTitle / Venue / Authors
2026 J jnl
J. Chem. Inf. Model.
Benjamin D. Harding, Barry E. DeZonia, Rajat Garg, Ziling Hu, Frank Delaglio, Timothy Grant, Chad M. Rienstra
2023 conf
ISED
Rajat Garg, Kartikay Singh, Isha Singh, Anil Kumar, Shashi Kumar, Rajeev Tiwari
2023 J jnl
CoRR
Hardik Sharma, Rajat Garg, Harshini Sewani, Rasha Kashef
2016 A conf
ICS
Sanyam Mehta, Rajat Garg, Nishad Trivedi, Pen-Chung Yew
2011 B conf
CCGRID
Ramya Prabhakar, Shekhar Srikantaiah, Rajat Garg, Mahmut T. Kandemir
2011 B conf
PPoPP
Ramya Prabhakar, Shekhar Srikantaiah, Rajat Garg, Mahmut T. Kandemir
2009 conf
ICUMT
Rajat Garg, Vikrant Gupta, Vineet Agrawal
2009 conf
ICUMT
Rajat Garg, Nadarajan Shriram, Vikrant Gupta, Vineet Agrawal
2009 conf
ICVES
Rajat Garg, Nadarajan Shriram, Vikrant Gupta, Vineet Agrawal
2009 conf
PDCCS
Rajat Garg, Christina M. Patrick, Mahmut T. Kandemir
2009 conf
ICUMT
Rajat Garg, Vikrant Gupta, Vineet Agrawal
2009 C conf
CLUSTER
Christina M. Patrick, Rajat Garg, Seung Woo Son, Mahmut T. Kandemir
2009 B conf
CCGRID
Rajat Garg, Seung Woo Son, Mahmut T. Kandemir, Padma Raghavan, Ramya Prabhakar
2009 conf
PDCCS
Rajat Garg, Ramya Prabhakar, Mahmut T. Kandemir
2009 conf
PDCCS
Seung Woo Son, Mahmut T. Kandemir, Yuanrui Zhang, Rajat Garg
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