You can do it at EZE, but it's better to go to Migraciones on Av. Antartida in Capital just to make sure you have it ready in advance. After you pay they give you a document to present when you leave, and you have 7 days to leave the country. If you don't leave within 7 days you need to go back and pay again.