I guess you could line-for-line duplicate functionality, but that's just like running the binary in an emulator with extra steps.
Part of the value of a migration would be the opportunity to to unwind some of the details that are contradictory, mis- or non-documented, or wrong-but-unfixable.
The logic changes can be done without destroying investment in the current ecosystem though. So they are really handled separately in terms of planning/budgeting.
Also, a lot of the problematic issues are related not to fixing the local code, but dealing with stuff like external systems or pre-existing legacy data that you need to be able to read back after 30 years from cold storage.
Part of the value of a migration would be the opportunity to to unwind some of the details that are contradictory, mis- or non-documented, or wrong-but-unfixable.