We present results from a long observation using the integral held spectrograph ARGUS of the ultraluminous IRAS source IRAS 09104 + 4109, which is associated with the central galaxy of a rich cluster at a redshift z=0.44. We map the distribution, kinematics and ionization state of its extended emission-line region, and show that both the nucleus and a secondary peak of line emission have ratios consistent with photoionization by a hidden, but luminous, quasar continuum. The kinematics of the ionized gas suggests that the galaxy and its extended emission-line region form a relatively static system at the cluster core. A strongly blueshifted component of emission-line gas around the nucleus reveals a central outflow, due either to a change in the central radio source, or to a massive supernova wind. We also present a similar to 30-ks ROSAT HRI pointed observation of IRAS 09104 + 4109. The X-ray image is extended, and a deprojection analysis confirms the presence of a 800-1100 M. yr(-1) cooling flow in the L(X)=2.9 x 10(45) erg s(-1) duster. A central dip is observed in the X-ray image, which may be caused by the outflow seen in the optical data. IRAS 09104 + 4109 is probably a very highly absorbed quasar, and presents the firmest case for a strong cooling flow occurring around a quasar, and the first to be discovered directly from an X-ray image.