Catalyzes the dephosphorylation of the riboflavin precursor 5-amino-6-(5-phospho-D-ribitylamino)uracil and of flavin mononucleotide (FMN) in vitro (PubMed:26316208). Also catalyzes the dephosphorylation of phosphorylated 5-6 carbon sugars and monophosphate nucleotides (NMP) in vitro (PubMed:25848029). 5-amino-6-(5-phospho-D-ribitylamino)uracil + H2O = 5-amino-6-(D-ribitylamino)uracil + phosphate Cofactor biosynthesis; riboflavin biosynthesis; 5-amino-6-(D-ribitylamino)uracil from GTP: step 4/4. Belongs to the HAD-like hydrolase superfamily. Cof family.