I'm looking for the solution (asp.net C#) to rewrite the core of the project that was created about 10 years ago without any global changes through all of these years. The component that i want to rewrite contains the base system logic, is used in multithreaded environment and contains thousands lines of code. Unit tests covers only 30% of the code. But (of course) I have no chance to break something after refactoring.
The question is: what is the best approach to do this? Are there any helped libraries?
EDIT 1: the source code is not weird, there is a little of spaghetti code, database design is good, there is no repetitive code, but the structure of the project needs to be fully re-factored: changes in oop patterns, disconnecting the implementation, replacing template method pattern with strategy or publisher/subscriber, etc..