In my opinion, I think you should first uncomplicate things. Meaning, ask the girl to file first a legal separation petition. You will never know when her supposed ex-husband may file a case contesting both of your married status (if you and her get married without clearing this out).

If things get settled, you can go forward and marry her in Muslim/Islamic rites.

Just my 2 cents.