Don't just set off to rewrite the code based on what you understand. There's a lot of experience, implicit requirement, and bug fixes in it.
Instead, keep improving the code as you work with it. Put in unit tests when possible, and look for opportunities to clean it up. What you want to be doing is called "refactoring", which means making relatively small changes to the code to improve it in a controlled manner. Refactoring changes should be small enough so that you're confident they aren't introducing bugs, and unit tests will be very useful in that.
For example, where I work, I've been moving some functionality from where it was originally put (because it was in the same class as the routines that used it) to another class. The other class is considerably smaller, so it's cleaning up the original class somewhat, and it's designed to have the information the functionality needs. I've been doing it as I've been going along.
You'll never get the code as clean as it would be if some omniscient being rewrote it one night, but no real-world code is ever in that state. Either it's new and buggy, or tested and at least somewhat ugly. You can get the code to a state where it's a lot easier to work with.