Igor Semaev

12 papers Journal 10Unranked 2
YearRankTypeTitle / Venue / Authors
2026 conf
PQCrypto (1)
Irene Di Muzio, Martin Feussner, Igor Semaev
2025 conf
LightSec
Martin Feussner, Igor Semaev
2025 J jnl
IACR Cryptol. ePrint Arch.
Irene Di Muzio, Martin Feussner, Igor Semaev
2024 J jnl
IACR Cryptol. ePrint Arch.
Martin Feussner, Igor Semaev
2024 J jnl
Des. Codes Cryptogr.
Isaac Andrés Canales Martinez, Igor Semaev
2023 J jnl
IACR Cryptol. ePrint Arch.
Isaac Andrés Canales Martinez, Igor Semaev
2022 J jnl
IACR Cryptol. ePrint Arch.
Igor Semaev
2021 J jnl
CoRR
Alessandro Budroni, Igor Semaev
2021 J jnl
IACR Cryptol. ePrint Arch.
Alessandro Budroni, Igor Semaev
2020 J jnl
CoRR
Igor Semaev
2020 J jnl
IACR Cryptol. ePrint Arch.
Igor Semaev
2019 J jnl
IACR Cryptol. ePrint Arch.
Igor Semaev, Andrea Tenti
redb/extractors/decompiler/bninja/analysis/medium_level_normalization.py
← Index redb/extractors/decompiler/bninja/analysis/medium_level_normalization.py python
from binaryninja import (
    MediumLevelILInstruction,
    Variable, SSAVariable,
    ILIntrinsic,
)


class MediumLevelNormalization:
    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 isinstance(op, MediumLevelILInstruction):
                self._collect_ops(op, ops)
            elif isinstance(op, (list, tuple)):
                for sub in op:
                    if isinstance(sub, MediumLevelILInstruction):
                        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, SSAVariable):
            return "SSA_VAR"
        if isinstance(val, Variable):
            return "VAR"
        if isinstance(val, ILIntrinsic):
            return "INTRINSIC"
        if isinstance(val, bool):
            return "BOOL"
        if isinstance(val, float):
            return "FLOAT_CONST"
        if isinstance(val, int):
            return "CONST"
        if isinstance(val, str):
            return "STR"
        return type(val).__name__.upper()

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

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