How? Using a bank/broker in the US, from the internet. He's a resident in Iran but there's nothing stopping him from moving.
When? Before the sanctions.
Do you remember recent US︀ sanctions? Iran, Iraq, Liberia, Sudan, Syria like in 2018 if I remember correctly. Before this︁ thing happened.
Is our Iranian dude screwed? What's gonna happen to his stocks and money︂ in the US?