It is possible to get an H1b and start a company. There is a good number of YC founders who are internationals and have gone through this process (& know some of the hacks). In short, you need a board of directors (could be other founders/advisors etc.) to show the USCIS that the board can hire/fire you. Also, you need to pay yourself an estimated market rate.