Involved in the cellular defense against the biological effects of O6-methylguanine (O6-MeG) and O4-methylthymine (O4-MeT) in DNA. Repairs the methylated nucleobase in DNA by stoichiometrically transferring the methyl group to a cysteine residue in the enzyme. This is a suicide reaction: the enzyme is irreversibly inactivated. a 6-O-methyl-2'-deoxyguanosine in DNA + L-cysteinyl-[protein] = a 2'-deoxyguanosine in DNA + S-methyl-L-cysteinyl-[protein] a 4-O-methyl-thymidine in DNA + L-cysteinyl-[protein] = a thymidine in DNA + S-methyl-L-cysteinyl-[protein] Activity is stable at 90 degrees Celsius for at least 30 minutes. This enzyme catalyzes only one turnover and therefore is not strictly catalytic. According to one definition, an enzyme is a biocatalyst that acts repeatedly and over many reaction cycles. Belongs to the MGMT family.