Signatures of Galaxy Formation in the Intracluster Medium