Software tests can serve a number of functions

Fortunately, however, you’re not doing it from scratch. You still have the old, compiled version of the software that you can still execute. In such a situation, you can use exploratory testing with the compiled software to figure out what it does and how. Once you reliably determine some aspect of its behavior, codify it in a unit test. Then, when you start writing the new source code, simply run the exact same unit tests to see if the code you’re writing matches the behavior of the previous version.