Converts molybdopterin precursor Z into molybdopterin. This requires the incorporation of two sulfur atoms into precursor Z to generate a dithiolene group. The sulfur is provided by the thiocarboxylated form of SAMP1 (Probable). Cofactor biosynthesis; molybdopterin biosynthesis. Sampylated at Lys-240 and Lys-247 with the archaeal ubiquitin-like proteins SAMP1 and SAMP3, which may regulate enzymatic activity. Cells lacking this gene do not grow anaerobically with DMSO and do not show DMSO reductase activity although dmsA transcript is present, indicating lack of maturation of the DmsA apoprotein into the MoCo-holoprotein. Their growth in the presence of oxygen is not affected. Disruption of this gene does not affect the formation of SAMP-protein conjugates. In the C-terminal section; belongs to the MoaE family.