The reason I have approached this is to refactor the code as you go along. Don't copy -refactor. When you find code that you can copy, think of how you would modularize it so you can call the same module from both places. Then create the module, and change both places.
Yes, you might be breaking legacy code. That's where
unit tests come in. You need a good base of unit tests before you can do this refactoring. What is that you say? Don't have unit tests? Build unit tests, then test the legacy code with the unit tests, then refactor, then retest refactored code
It's going to be very difficult at first. Fixing legacy code is a lot like straightening out Christmas lights. It seems impossible at first, until you start doing it. Then when you start doing it, you realize it's more difficult than you thought, but as you keep doing it, it becomes easier and easier until you have a small jumble at your feet and you are like "tat was easier than I thought"