H1 transfer after visa expiry and extension in progress

Hi,
I would like to understand the options I have with the current situation.
My current H1-visa expires on Aug 31 and my company A has filed an extension already.
I also have an approved I140.
If I get a job offer from company B after Aug 31, can they file H1 transfer for me based on I140?
Will I be able to join them?

I would like to understand the worst case outcome here.

They can. But, after your I-94 expiry you will be in period of authorised stay, so, you may end up in something called a bridge situation, where you need the middle petition approval for the next one approval…This is slightly grey area…Worst case, if your bridge petition is denied, then your petition that was filed after that using that will be denied. Read Aytes Memo. You can apply for consular processing and join them by exiting and re-entering with stamping to be safe.