Involved in the conversion of sterigmatocystin to O-methylsterigmatocystin (OMST) and dihydrosterigmatocystin to dihydro-o-methylsterigmatocystin in the aflatoxin biosynthesis pathway. S-adenosyl-L-methionine + sterigmatocystin = 8-O-methylsterigmatocystin + H(+) + S-adenosyl-L-homocysteine dihydrosterigmatocystin + S-adenosyl-L-methionine = 8-O-methyldihydrosterigmatocystin + H(+) + S-adenosyl-L-homocysteine Mycotoxin biosynthesis; aflatoxin biosynthesis. Belongs to the class I-like SAM-binding methyltransferase superfamily. Cation-independent O-methyltransferase family. COMT subfamily.