Study of corrosion of metals in gaseous environments, focusing on thermodynamics, mechanisms, and kinetics of the process