H1B: Changing job when petition in progress

I am currently in India, working for Company A. Company B in US has applied for my H1B petition this year. My petition is picked in lottery and I am waiting for the adjudication result.

Before this October, can I change to a Company C in India before I join Company B who applied for my visa petition? I am asking this because there is some acquisition done in my current organization that could result in job layoffs. I wanted to understand if that can have an impact on the H1B visa process in such situation.

Yes, you can. You would need your petition information like Receipt Number and preferably a copy of approval letter for the transfer. You can read this article All about H1B Visa Transfer