It is registered in accounts overseas, for example in Ireland, but is then invested in whatever assets the company chooses to invest it in.
The interactive chart shows the 50 US companies with the most profits stockpiled “overseas” to avoid taxes in the US, while the actual money is wherever, including in US-based assets (click on the image or HERE for all 50, where you can hover over the blue bars to get the amounts)
More on money moving:
Smart Money is Exiting The Market