Registering a company is ok and even having the company collect revenue.  However, you are not authorized to work for the company and derive any income from the company, even as its owner, while you are in H-1B status since your H-1B is employer specific and tied to your current employer.