You are going to need a good lawyer in contract law for this one! Serious!
I feel strongly that anytime money is gained by sales or investment, everybody who worked should get paid something . The ideal is that everyone be paid as they go, though it might not be practical, so you should try to allow for some earnings with any funds which arrive. Everyone's time is very valuable in terms of money.
That being said...
With unequal work accomplished, especially very unequal in this case, then I say NO WAY on equal payment long term. However, a contract can stipulate a small amount short term for everybody split evenly on the first payment. The remainder should also be negotiated.
Each person should have kept track of their own hours spent on the project (as I always do) by items, including the leader. This should have been verified every week. With lack of such foresight, I recommend that everyone estimate their time spent and also what percentage they feel was contributed. Have a conference to discuss it. Vote on each person's contribution. You might have it very tough to come to a consensus, but the lack of strategic foresight on the part of the leadership caused all this or lack of strong leadership. Work hard and be sensitive to resolve these issues and do so contractually, making clear that each person consents to the payment amount.
A contract should express what each team member agreed as a future payment plan. Here is going to be a lot of discussion.
Once everybody agrees to a payment plan, then get it contracted, signed, and notarized as soon as possible.
Now that this has all come to light, strong leadership is more important than ever and the survival of the organization is in the negotiations. This is a critical time to resolve past unpaid work and create a plan for fair future payment.