The primary function of the decidua capsularis is to protect the developing embryo. It creates a barrier that separates the embryo from the uterine cavity, preventing any potential harmful substances from reaching the embryo. Additionally, the decidua capsularis plays a role in the immune modulation, preventing the maternal immune system from attacking the semi-allogeneic embryo. It also aids in the exchange of nutrients and waste products between the mother and the embryo.