def __get_data_refs()

in nightMARE/src/nightmare/malware/xorddos/core.py [0:0]


def __get_data_refs(instruction: SmdaInstruction.SmdaInstruction):
    detailed = instruction.getDetailed()
    if len(detailed.operands) > 0:
        for i in detailed.operands:
            value = None
            if i.type == x86.X86_OP_IMM:
                value = i.imm
            if i.type == x86.X86_OP_MEM:
                value = i.mem.disp
                if detailed.reg_name(i.mem.base) == "rip":
                    value += detailed.address + detailed.size
            if value is not None and value > 0:
                yield value