First, most companies will have a time zone limit.
2. Companies will require that you can communicate in English extremely well.
3. You need access to a reliable electric grid and reliable fast internet (the firewall rules out mainland China completely--1/5 of the world).
4. Many companies don't want to hire someone from a country without a strong legal framework accessible to foreigners--they want to be able to enforce NDAs etc... And some companies don't want to risk dealing with any foreign legal system at all, even a good one.
5. Travel time (and expense/visas) to the office in case you need to visit.
6. You need to pass the "culture fit" interview.
7. Very likely to run into someone involved in hiring who has a bad impression of programmers from certain countries after working with terrible offshore teams. Overcoming this sterotype won't be easy. Related to 6.
Already being in America gives you several huge advantages.