May be involved in thiamine salvage. 4-amino-5-aminomethyl-2-methylpyrimidine + H2O = 4-amino-5-hydroxymethyl-2-methylpyrimidine + NH4(+) H2O + N-formyl-4-amino-5-aminomethyl-2-methylpyrimidine = 4-amino-5-aminomethyl-2-methylpyrimidine + formate Cofactor biosynthesis; thiamine diphosphate biosynthesis. Belongs to the thiaminase-2 family.