Can i transfer to a new company in Indian offshore from US onsite location with expired H1B petition?

I have been suffering from some health issues because of which i want a transfer to India. My H1B visa has expired this October, 2016 and i am still in US (my total stay days in US is only 9 months). But, management doesn’t bother about my problem and delaying my transfer as much as possible in spite of numerous follow-ups.

Can i make a switch to a different company in India offshore location while i am still in US? Can i go into any legal issues?

Will my H1B be rejected if i make a switch and i wont be able to return to US with this visa?

Also, an H1B extension has been filed few months back but i haven’t received my approval. Will that be denied also?

Please suggest what needs to be done from my end.