def processOat(oat_file_name):

    rtn = 0

    print "Processing \'%s\'" % oat_file_name
    try:
        f = open(oat_file_name, 'r')

        try:
            s = f.read()
            hits = [m.start() for m in finditer('dex\n035', s)]

            for dex_addr in hits:
                rtn |= carveDex(f, dex_addr, oat_file_name)
        finally:
            f.close()

    except (IOError, OSError) as e:
        print "[ERROR] Unable to open file \'%s\'" % oat_file_name
        return -1

    return rtn
dataset/ETHPy150Open jakev/oat2dex-python/oat2dex.py/processOat/original