I've been in a similar situation and our approach was to make a business case for the rewrite.
* Original programmer who was the team lead was gone and had no interest in consulting for us
* Code was thousands of lines of completely uncommented 8051 assembly language
* Code had known bugs
* Bug fixing and documenting/understanding would likely go on for months
* We could not integrate the rest of the system functionality without a complete understanding of that undocumented code
* We were confident that one person could rewrite it in less than six weeks since we had complete knowledge of what it needed to do.
And then left it up to management as to what was the best approach. They were making a completely informed decision, but phrased the way we did, no reasonable person would have told us to continue with buggy, undocumented code that was at the heart of the system we were building.
I'm often on the receiving end of completely unrealistic estimates. It would piss me off to no end to find out that someone lied about how long they expected something to take.