def disassemble(buf, base=0):
    d = M.i386Disasm()
    offset = 0
    while True:
        if offset >= len(buf):
            break
        o = d.disasm(buf, offset, base)
        yield "0x%x: %s" % (base + offset, str(o))
        offset += o.size
dataset/ETHPy150Open williballenthin/python-sdb/scripts/sdb_dump_patch.py/disassemble/original