The primary function of MGMT is to transfer the alkyl group from the O6 position of guanine to a cysteine residue within its own structure. This is a direct reversal of the damage, which contrasts with other DNA repair mechanisms that involve removing and resynthesizing damaged DNA segments. The unique mechanism of MGMT makes it a critical player in protecting cells from the toxic and mutagenic effects of alkylating agents.