Probing wave functions in complex oxides with X-rays