def is_JOP_COP_dispatcher(self):
    "\n        :return boolean: Returns True if the gadget is a JOP or COP dispatcher. Defined as a gadget that begins with a\n                         arithmetic operation on a register and ends with a branch to a deference of that register. Used\n                         to iterate through instructions in payload. Only restrictions on the arithmetic operation is\n                         that it doesn't use the same register as both operands.\n        "
    first_instr = self.instructions[0]
    last_instr = self.instructions[(len(self.instructions) - 1)]
    if (('[' in last_instr.op1) and (first_instr.opcode in ['inc', 'dec', 'add', 'adc', 'sub', 'sbb']) and ('[' not in first_instr.op1)):
        gpi_target = Instruction.get_operand_register_family(last_instr.op1)
        arith_target_1 = Instruction.get_operand_register_family(first_instr.op1)
        if Instruction.is_constant(first_instr.op2):
            additive_value = Instruction.get_operand_as_constant(first_instr.op2)
            if ((additive_value < 1) or (additive_value > 32)):
                return False
        arith_target_2 = Instruction.get_operand_register_family(first_instr.op2)
        return ((gpi_target == arith_target_1) and (arith_target_1 != arith_target_2))
    return False
:return boolean: Returns True if the gadget is a JOP or COP dispatcher. Defined as a gadget that begins with a
                 arithmetic operation on a register and ends with a branch to a deference of that register. Used
                 to iterate through instructions in payload. Only restrictions on the arithmetic operation is
                 that it doesn't use the same register as both operands.
def is_JOP_COP_dispatcher(self):
    "\n        :return boolean: Returns True if the gadget is a JOP or COP dispatcher. Defined as a gadget that begins with a\n                         arithmetic operation on a register and ends with a branch to a deference of that register. Used\n                         to iterate through instructions in payload. Only restrictions on the arithmetic operation is\n                         that it doesn't use the same register as both operands.\n        "
    first_instr = self.instructions[0]
    last_instr = self.instructions[(len(self.instructions) - 1)]
    if (('[' in last_instr.op1) and (first_instr.opcode in ['inc', 'dec', 'add', 'adc', 'sub', 'sbb']) and ('[' not in first_instr.op1)):
        gpi_target = Instruction.get_operand_register_family(last_instr.op1)
        arith_target_1 = Instruction.get_operand_register_family(first_instr.op1)
        if Instruction.is_constant(first_instr.op2):
            additive_value = Instruction.get_operand_as_constant(first_instr.op2)
            if ((additive_value < 1) or (additive_value > 32)):
                return False
        arith_target_2 = Instruction.get_operand_register_family(first_instr.op2)
        return ((gpi_target == arith_target_1) and (arith_target_1 != arith_target_2))
    return False