The files are in RESOURCE\Textures\flags . Use TX Converter to convert one of the perflg ones to TGA.
Edit that file, replacing an existing one with the one you want. Remember what the old one looked like!
Now convert it back again, overwriting the old file and select the old flag in the interface.
You'll now get your new one while at sea.
Edit that file, replacing an existing one with the one you want. Remember what the old one looked like!
Now convert it back again, overwriting the old file and select the old flag in the interface.
You'll now get your new one while at sea.