A Game-Theoretic Analysis of the Empirical Revenue Maximization Algorithm with Endogenous Sampling