The primary function of loricrin is to contribute to the structural integrity and barrier function of the skin. It is involved in forming the highly cross-linked, insoluble envelope that surrounds keratinocytes. This envelope acts as a protective barrier against environmental stressors such as pathogens, chemicals, and physical abrasions.