I have suffered a similar fate. Back in 1998 I had to translate the shipping cost calculation of a huge brick-and-mortar store in Brazil written in FoxPro - it was the _only_ documentation on how to calculate it they had and finally I gave up on understanding it and made a line-by-line translation for their web store.
It ran for about five years, until the company went bankrupt.