"unmaintainable" is a very poor description of a codebase, and it's an even worse justification for a re-write. "I've got this unmaintainable codebase which would be annoying to learn, what I'm going to do instead is create an order of magnitude more work and write it again, from scratch, with an exciting new combination of issues!" Wait...