If you're estimating it's 25-50% done, then it's almost certainly 25% done or less, counting the rewriting/restructuring. Just pick how you would write it if you were doing it from scratch. Honestly. Really. Whenever I've been wrong about this kind of thing, it's been on the side of hating to throw away work already done. Anything good in the existing code, you can look at it and take. But really, just begin from scratch.
I wish I would stress this more. Do it right, the way you know how.