Catalyzes an amino-pyrimidine hydrolysis reaction at the C5' of the pyrimidine moiety of thiamine compounds, a reaction that is part of a thiamine salvage pathway. Thus, catalyzes the conversion of 4-amino-5-aminomethyl-2-methylpyrimidine to 4-amino-5-hydroxymethyl-2-methylpyrimidine (HMP). Is also able to catalyze the hydrolytic cleavage of thiamine; however, this thiaminase activity may not be physiologically relevant. Therefore, is probably involved in the regeneration of the thiamine pyrimidine from thiamine degraded products present in the environment, rather than in thiamine degradation. 4-amino-5-aminomethyl-2-methylpyrimidine + H2O = 4-amino-5-hydroxymethyl-2-methylpyrimidine + NH4(+) H2O + thiamine = 4-amino-5-hydroxymethyl-2-methylpyrimidine + 5-(2-hydroxyethyl)-4-methylthiazole + H(+) Cofactor biosynthesis; thiamine diphosphate biosynthesis. Homotetramer. Belongs to the TenA family.