Reverse engineering (RE) is the process of discovering the technological principles of a device, object or system through analysis of its structure, function and operation.
It often involves taking something (e.g., a mechanical device, electronic component, or software program) apart and analyzing its workings in detail to be used in maintenance or to try to make a new device or program that does the same thing without copying anything from the original.
Reverse engineering has its origins in the analysis of hardware for commercial or military advantage. The purpose is to deduce design decisions from end products with little or no additional knowledge about the procedures involved in the original production.
The same techniques are currently being researched for application to legacy software systems, not for industrial or defense ends, but rather to replace incorrect, incomplete, or otherwise unavailable documentation.