Majumder Haider

11 papers B 1Journal 5Unranked 5
YearRankTypeTitle / Venue / Authors
2025 B conf
ICCCN
Gloria Mollah, Majumder Haider, Imtiaz Ahmed, Danda B. Rawat
2025 conf
MILCOM
Abigail O. Oyekola, Majumder Haider, Imtiaz Ahmed, Danda B. Rawat
2025 J jnl
CoRR
Majumder Haider, Imtiaz Ahmed, Zoheb Hassan, Timothy J. O'Shea, Lingjia Liu, Danda B. Rawat
2025 J jnl
IEEE Commun. Lett.
Majumder Haider, Imtiaz Ahmed, Zoheb Hassan, Timothy J. O'Shea, Lingjia Liu, Danda B. Rawat
2025 conf
CCNC
Gloria Mollah, Majumder Haider, Danda B. Rawat, Imtiaz Ahmed
2024 conf
ICC Workshops
Majumder Haider, Imtiaz Ahmed, Md. Zoheb Hassan, Mohammad Matin, Cong Pu
2024 conf
ICC Workshops
Majumder Haider, Imtiaz Ahmed, Fadel Lashhab, Tim O'Shea, Danda B. Rawat, Mohammad Matin
2024 J jnl
IEEE Trans. Veh. Technol.
Majumder Haider, Imtiaz Ahmed, Ahmed Rubaai, Cong Pu, Danda B. Rawat
2024 J jnl
IT Prof.
Imtiaz Ahmed, Md. Zoheb Hassan, Majumder Haider, Kamrul Hasan
2024 J jnl
J. Intell. Transp. Syst.
Majumder Haider, Md. Mahmudul Kabir Peyal, Tao Huang, Wei Xiang
2022 conf
ICUFN
Majumder Haider, Imtiaz Ahmed, Danda B. Rawat
redb/extractors/decompiler/bninja/analysis/low_level_normalization.py
← Index redb/extractors/decompiler/bninja/analysis/low_level_normalization.py python
from binaryninja import (
    ILRegister, ILRegisterStack, ILFlag,
    ILIntrinsic, ILSemanticFlagGroup,
)

class LowLevelNormalization:
    def __init__(self):
        return

    def _collect_ops(self, il, ops):
        if il is None:
            return
        ops.append(int(il.operation))
        operands = getattr(il, "operands", None)
        if not operands:
            return
        for op in operands:
            if hasattr(op, "operation"):
                self._collect_ops(op, ops)
            elif isinstance(op, (list, tuple)):
                for sub in op:
                    if hasattr(sub, "operation"):
                        self._collect_ops(sub, ops)

    def normalize_instruction_all_levels(self, instr_il):
        ops = []
        self._collect_ops(instr_il, ops)

        return ops

    def _leaf_type(self, val):
        if isinstance(val, ILRegister):
            return "REG"
        if isinstance(val, ILRegisterStack):
            return "REG_STACK"
        if isinstance(val, ILFlag):
            return "FLAG"
        if isinstance(val, ILSemanticFlagGroup):
            return "FLAG_GROUP"
        if isinstance(val, ILIntrinsic):
            return "INTRINSIC"
        if isinstance(val, bool):
            return "BOOL"
        if isinstance(val, int):
            return "CONST"
        return type(val).__name__.upper()

    def _collect(self, il, out):
        if il is None:
            return
        out.append(int(il.operation))
        operands = getattr(il, "operands", None)
        if not operands:
            return
        for op in operands:
            if hasattr(op, "operation"):
                self._collect(op, out)
            elif isinstance(op, (list, tuple)):
                for sub in op:
                    if hasattr(sub, "operation"):
                        self._collect(sub, out)
                    else:
                        out.append(self._leaf_type(sub))
            else:
                out.append(self._leaf_type(op))

    def normalize_instr_with_operands(self, instr_il):
        ops = []
        self._collect(instr_il, ops)
        return ops