Converts O-methylsterigmatocystin (OMST) to aflatoxin B1 and converts dihydro-O-methylsterigmatocystin (DHOMST) to aflatoxin B2 in the aflatoxin biosynthesis pathway. 8-O-methylsterigmatocystin + 2 O2 + 2 reduced [NADPH--hemoprotein reductase] = aflatoxin B1 + CO2 + 2 H(+) + H2O + methanol + 2 oxidized [NADPH--hemoprotein reductase] 8-O-methyldihydrosterigmatocystin + 2 O2 + 2 reduced [NADPH--hemoprotein reductase] = aflatoxin B2 + CO2 + 2 H(+) + H2O + methanol + 2 oxidized [NADPH--hemoprotein reductase] Mycotoxin biosynthesis; aflatoxin biosynthesis. Belongs to the cytochrome P450 family.