Since this matter is with the court, no management is going to take you in, even if they have a soft corner for you, as this will create a complete disturbance. Since you had already approached the court, either wait for the decision (which may take a very long time) or search for a new job. Since you had not clearly mentioned on what grounds they had terminated your services, it is difficult to tell how strong your case is. But this is for sure, even if the lower court passes the order in your favor, the company will surely go for an appeal in a higher court.
Regarding your question on legal hassle, if management provides you a job, then this will weaken their case. Hence, they will never do this.
Regards, AK