Complete rewrites from scratch are never the answer, no matter how tempting. You might think that multiple refactors are going to take longer, but you’re completely forgetting to account for all the things that you don’t know yet, especially about the obscure, bizarre business rules that the current code incorporates and that everyone has forgotten about.

Personal experience here, though my inherited codebase isn’t as bad as yours. At least my predecessors were just clueless, not outsourced and clueless.