Okhwan Lee

13 papers A* 1A 2B 4C 1Journal 3Unranked 2
YearRankTypeTitle / Venue / Authors
2016 conf
ICTC
Jeongyoon Heo, Hyung-Sin Kim, Okhwan Lee, Saewoong Bahk
2015 A* conf
INFOCOM
Okhwan Lee, Weiping Sun, Jihoon Kim, Hyuk Lee, Bo Ryu, Jungwoo Lee, Sunghyun Choi
2015 conf
ICC
Seongho Byeon, Changmok Yang, Okhwan Lee, Kangjin Yoon, Sunghyun Choi
2015 J jnl
IEEE Commun. Lett.
Okhwan Lee, Jihoon Kim, Jongtae Lim, Sunghyun Choi
2015 B conf
SECON
Okhwan Lee, Jihoon Kim, Sunghyun Choi
2014 A conf
CoNEXT
Seongho Byeon, Kangjin Yoon, Okhwan Lee, Sunghyun Choi, Woonsun Cho, Seungseok Oh
2014 J jnl
IEEE Commun. Mag.
Weiping Sun, Okhwan Lee, Yeonchul Shin, Seongwon Kim, Changmok Yang, Hyoil Kim, Sunghyun Choi
2012 C conf
APCC
Youngsoo Kim, Edwin Monroy, Okhwan Lee, Kyung-Joon Park, Sunghyun Choi
2012 B conf
SECON
Ildefonso de la Cruz, Okhwan Lee, Sunghyun Choi
2011 J jnl
Ad Hoc Networks
Seongkwan Kim, Okhwan Lee, Sunghyun Choi, Sung-Ju Lee
2009 B conf
PIMRC
Seongkwan Kim, Okhwan Lee, Sunghyun Choi, Sung-Ju Lee
2009 B conf
PIMRC
Seongkwan Kim, Okhwan Lee, Sunghyun Choi, Sung-Ju Lee
2008 A conf
MSWiM
Heeyoung Lee, Seongkwan Kim, Okhwan Lee, Sunghyun Choi, Sung-Ju Lee
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