If you leave a company that is sponsoring your H1B, you're immediately out of status. A new company can apply for an H1B for you. It's a whole new visa, but you are exempt from a few of the steps you already went through (notably worrying about the caps).