Vahid Hassani

18 papers C 4Journal 6Unranked 8
YearRankTypeTitle / Venue / Authors
2025 J jnl
CoRR
Alexander B. Rambech, Ivar Bjørgo Saksvik, Vahid Hassani
2024 J jnl
IEEE Access
Håkon Teigland, Vahid Hassani, Ments Tore Møller
2023 conf
CCTA
Håkon Teigland, Vahid Hassani, Ments Tore Møller
2021 J jnl
CoRR
Ivar Bjørgo Saksvik, Alex Alcocer, Vahid Hassani
2020 conf
CCTA
Vahid Hassani, Øyvind Auestad, Marco Nataletti
2019 conf
ECC
Vahid Hassani, Snorre Fjellvang, Øyvind Auestad, Jan Tommy Gravdahl
2018 J jnl
Annu. Rev. Control.
Vahid Hassani, António M. Pascoal, Tord F. Onstein
2018 J jnl
CoRR
David Mateo, Nikolaj Horsevad, Vahid Hassani, Mohammadreza Chamanbaz, Roland Bouffanais
2017 C conf
ACC
Damiano Rotondo, Vahid Hassani, Andrea Cristofaro
2017 J jnl
CoRR
Severin Sadjina, Lars T. Kyllingstad, Martin Rindarøy, Stian Skjong, Vilmar Æsøy, Dariusz Eirik Fathi, Vahid Hassani, Trond Johnsen, Jørgen Bremnes Nielsen, Eilif Pedersen
2014 conf
MED
Vahid Hassani, Sverre Anders Alterskjar, Dariusz Eirik Fathi, Orjan Selvik, Lars Ove Sather
2013 conf
CDC
Vahid Hassani, António M. Pascoal, Asgeir J. Sørensen
2013 C conf
ACC
Vahid Hassani, Asgeir J. Sørensen, António M. Pascoal
2013 conf
ECC
Vahid Hassani, António M. Pascoal, A. Pedro Aguiar, Michael Athans
2012 C conf
ACC
Vahid Hassani, Asgeir J. Sørensen, António Manuel Santos Pascoal, A. Pedro Aguiar
2009 conf
ECC
Vahid Hassani, A. Pedro Aguiar, António M. Pascoal, Michael Athans
2009 conf
CDC
Vahid Hassani, A. Pedro Aguiar, António Manuel Santos Pascoal, Michael Athans
2009 C conf
ACC
Vahid Hassani, A. Pedro Aguiar, Michael Athans, António M. Pascoal
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