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
def extractsib(instruction): '''Returns (scale,index,base) of an instruction''' sib = getSib(instruction) return decoder.extractsib( decodeInteger(sib) )
def extractsib(instruction): '''Returns (scale,index,base) of an instruction''' sib = getSib(instruction) return decoder.extractsib(decodeInteger(sib))