Not too bad actually. First you need to remove the trim around the gear shift - pull it up and back from behind the gear shift. This exposes two screws below the main trim (the one containing the ventilation controls that also surrounds the stereo and air vents). Undo these screws then carefully prise out the main trim piece. It is held in firmly by clips.
This piece won't come away far as the wires for the hazard button and vent controls will restrict it but these can be unclipped easily enough.
With the main trim piece completely removed you'll see where the metal bracket around the standard stereo is screwed into the car. Unscrew this and unclip the plug and aerial from the back of the stereo. There should be threaded holes in your new stereo that you can screw the original bracket to and then screw the bracket and new stereo back into the car in the same way the original one was mounted.
As for wiring, there may be adaptors available that convert the aftermarket stereo plug to the Subaru plug (Repco, Supercheap, etc) so you don't have to cut and trace wiring. I didn't pursue this and instead just cut the original Subaru connector off, worked out which wires supplied power, drove the speakers, etc, and used a terminal block to connect them to my new stereo.
Sorry I don't have any pics from when I had it all pulled apart. I can dig up a listing of the wire colours and their respective functions if that helps (hopefully it didn't change between 02 and 05).
One thing I didn't realise until later was that one of the wires supplies power to (or at least switches on) the RF amplifier. This needs to be powered on from one of the wires on the stereo (usually a blue wire normally used for activating an external power amplifier) if you want radio reception.