IMO the PC's would own the ship, they would still need to re-register the ship at a suitable port so that it would no longer be classified as a pirate. They would also have to prove to the authorities how they came into possession of the ship such as supplying the ships black box etc to prove...