Molecule formation and energy transfer processes in a vapor with high density of 3P-excited sodium atoms