Reverse engineering
Reverse engineering a legitimately bought program and studying or modifying its code for knowledge was claimed as legal by Vianello at least in the European Union under some restricted conditions.