Oxidase with broad substrate specificity, oxidizing aromatic azaheterocycles, such as N1-methylnicotinamide, N-methylphthalazinium and phthalazine, as well as aldehydes, such as benzaldehyde, retinal, pyridoxal, and vanillin. Plays a key role in the metabolism of xenobiotics and drugs containing aromatic azaheterocyclic substituents. Participates in the bioactivation of prodrugs such as famciclovir, catalyzing the oxidation step from 6-deoxypenciclovir to penciclovir, which is a potent antiviral agent. Is probably involved in the regulation of reactive oxygen species homeostasis. May be a prominent source of superoxide generation via the one-electron reduction of molecular oxygen. May also catalyze nitric oxide (NO) production via the reduction of nitrite to NO with NADH or aldehyde as electron donor. May play a role in adipogenesis.