It is not just the question of EAD. Once your 485 is denied, you have no status any more, since you used EAD to work.
I don't believe there is a way for you to legally change your status in the US. You should be able to do it outside of US. However, and this is the critical point. If you over-stayed your status, then depending on how much you have over-stayed your status, you could be facing a 3-10 year ban from the US.
So do think carefully before you act. Are the few thousand $$ worth that risk? If your answer is yes, then keep working. If you still have the hope of wanting to get your GC at some point in the future, then any illegal stay will be the death of your future GC hopes.