Example #1
0
def decode(instruction):
    '''Extract the modrm tuple out of the provided instruction'''
    modrm = instruction[2]
    if len(modrm) > 0:
        modrm = decoder.decodeInteger(modrm)
        return decoder.extractsib(modrm)
    return None
Example #2
0
def extractsib(instruction):
    '''Returns (scale,index,base) of an instruction'''
    sib = getSib(instruction)
    return decoder.extractsib( decodeInteger(sib) )
Example #3
0
def extractsib(instruction):
    '''Returns (scale,index,base) of an instruction'''
    sib = getSib(instruction)
    return decoder.extractsib(decodeInteger(sib))