Q: H1b Transfer with receipt notice on OPT

I am on my OPT. Company A filed h1b petition for me. It is selected in the lottery and is currently under review for change of status but NOT APPROVED yet. I got another exciting job offer from company B. Can company B file amendment on exiting petition to transfer my h1b from A to B ? Or can company B file new h1b petition immediately irrespective of exiting petition from company A ? What if company A withdrew their petition in both cases ?

This question hasn't been answered yet.