is cap-exemption possible for petition with is withdraw by sponsoring employer

I have Stamped H1B expire on SEP 30 2017, I am leaving current company it says they will withdraw the petition, so after they withdraw can new company I join apply for cap-exemption with this old H1B or do i need to again go for fresh petition facing lottery process ?