debugging reverse engineering algorithm