How to use the reil.x86.operand.get_size function in reil

To help you get started, we’ve selected a few reil examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github c01db33f / reil / x86 / memory.py View on Github external
clear = True
    if len(i.operands) == 1:
        # source is the accumulator
        value = ctx.accumulator

        if i.operands[0].type == capstone.x86.X86_OP_REG:
            clear = False
    else:
        value = operand.get(ctx, i, 1, size=size)

        if (i.operands[0].type == capstone.x86.X86_OP_REG and
            i.operands[1].type == capstone.x86.X86_OP_REG):
            clear = False

    # Oh x86 how I hate you
    if i.operands[1].type == capstone.x86.X86_OP_MEM and operand.get_size(ctx, i, 1) != 32:
        clear = False

    operand.set(ctx, i, 0, value, clear=clear)
github c01db33f / reil / x86 / memory.py View on Github external
def x86_mov(ctx, i):
    size = operand.get_size(ctx, i, 0)
    value = None

    clear = True
    if len(i.operands) == 1:
        # source is the accumulator
        value = ctx.accumulator

        if i.operands[0].type == capstone.x86.X86_OP_REG:
            clear = False
    else:
        value = operand.get(ctx, i, 1, size=size)

        if (i.operands[0].type == capstone.x86.X86_OP_REG and
            i.operands[1].type == capstone.x86.X86_OP_REG):
            clear = False