The problem is that when applying for, or even transferring, an H-1B the petitioning employer has to show revenue or existing capital and they also ask you if you have any ownership in the company. I am not sure what the impact of putting 'yes' in the ownership column would mean; likely a request for evidence.
Consult a good lawyer to guesstimate your chance of getting an H1 sponsored by your new company. If the odds are good (ideally, preexisting success cases) I would apply for a whole new H1 (not a transfer). If for some reason you do not get it, you are not out of status. If you do get it, turn in your resignation at the existing place. Make sure you work for the required number of hours for both parties during your transition period (2 weeks or whatever).
You can transfer it to the company, but if the Feds find out that you own significant equity in that company - they take that as an indication that you are intending to be an 'immigrant' on a non-immigrant visa, which violates the intent and spirit of the visa.
So, sure, you may be able to do it and not get caught. But if you do, you just got a one-way ticket home.
Then again, some people have done it, but I'm not familiar with their particular situations or which loopholes they used :)