When joining pirates, they become friendly and Aegis becomes hostile (if it's still not) only after a certain point in the talk with Captain Grim. However, the autosave is made before that point, so if you reload it, you can simply walk out of the cabin and freely roam the pirate base and talk to pirates despite that they are still unfriendly (orange).
If Aegis were friendly, they have split personality at that moment: they remain friendly in person, but are hostile on NavCom.