I think it depends where you live. If you aren't copying any original code you aren't violating copyright. In the EU (This includes the UK so I doubt that this http://www.winehq.org/hypermail/wine-devel/2003/10/0076.html can apply to the UK), even if you disassemble something to understand how it works and write something that does the same thing, it's legal, so until you aren't doing copy/paste from the original code you're OK, even if you've read it to see how it works. In places where software patents are valid, you may be breaking the law, if that software is patented(DMCA?).