I spoke with a lawyer at Gowlings in Ottawa (for Canadian stuff). They were very professional and knowledgeable. What you want is a law firm that specializes in intellectual property law.
However, having gone through all that, I warn you they are very expensive and they told me very little that I hadn't already found out on my own by reading a legal text book on the subject of intellectual property law.
One thing of value they did for me was to draw up a commercial software license agreement, and they can also draw up a copyright assignment document that you may want contributors to sign before you accept any significant source code contributions from them. (Agreement to share the ownership between both you and them.) Again, these are things you can try to write yourself based on other ones you find around the internet, but lawyers are supposed to catch things that we might miss.