I wouldn't bother with a lawyer before the meeting. The other party (Company) is bringing a lawyer and that sounds real intimidating, until you read that it is his friend.
Take good notes. Write down how you understand everything in your own words. If the Company tells you something, write it down and tell them you expect it in any legal documents. If it's not on paper, it's no good. (Yeah, verbals are sometimes enforceable, but a true PIA to prove.)
After you receive the paperwork, take your plain English notes and the Companies paperwork to an attorney and see if they match up.
You could even start with taking a legal assistant to dinner and they can review it for obvious flaws while you eat. Your offer would be dinner + $50 or $100, or something like that. They can point you in the right direction and help catch some of the more time consuming, but trivial, problems up front. They can also give you advice on what to give an attorney and how to present it to save you money. Then take their comments, your paperwork and the Companies docs to a lawyer for review.
Take any changes needed back to the Company for review/compromise/modification.
Be upfront with the Company. Tell them you will be having an attorney look over any docs before you sign. Tell them why you need any changes. If they try telling you that "Well, yes. It does say 'that' but it really means 'this'", ask them to change it so you feel better about it. Don't ever let them tell you it's a standard form and/or there are things that they wouldn't enforce/hold against you.
I would try to impose, at least, a minimum guaranteed compensation. It sounds like you are trading your free time, for now, for compensation later. Just make sure you get something later, even if they never make a profit.
You could also specify that you own everything you provide them until X amount is paid in full to you. That allows you to take back your property at anytime if you aren't getting paid according to the terms you agree to. This additionally provides punishment if they continue to use your stuff after you take it back. They would be stealing at this point.
Sounds like this is your first time with something like this. Don't worry. You'll make plenty of mistakes to learn from so next time you'll do better. It's very hard to get into business relationships that actually work the way you expect.
You could also try to make the owner/founder/CEO/whoever sign any compensation deal personally. At least then if they try to pull any number of fast ones over on you, you can sue the individual and not worry about whether the company still exists. You, as an individual, are risking something, so should they.
Just watch your tail the best you can and you'll be fine.
- If an offer sounds too good to be true, it is. Always.
- If the Company balks at amending the agreement for your protection, watch out!
- If the Company is a start-up, be cautious.
- If you are donating anything (time/money/other) with the hopes of getting it back, prepare yourself to never get it back.
- If you won't do it without ever getting compensated, put in a payment schedule even if the Company never makes money. If you provide a service, but they can't and go broke, that's not your fault. But it becomes your problem if you never receive anything.
- If the Company has a lawyer and you don't, well... don't do that.
And finally... I'm not a lawyer. But I have been in business and these are just tips that you can ignore or accept.
Good luck to you!