Welcome aboard!
A similar scenario happened in the old Marvel comics, where a pirate nemesis of Han Solo came across a Star Destroyer that had been heavily damaged in a battle with the Rebellion, and realized it was repairable. The issue of how many pirates does it take to crew an Imperial ship didn’t really come up though.
And if you’re wondering how Han and his opponents can be out in space without a pressure suit, there’s a forcefield protecting them.