I still maintain that the question is too open-ended as it stands.
A broader perspective
I think RCE always includes the aspect of ethics. Just like a nuclear scientist possesses a wealth of specialized information that can be used for good and bad, so does the reverse engineer.
Strictly speaking implementing a feature is fishy. Very fishy indeed. ReactOS would be a good example of how to deal with that situation. The method is called "clean room reverse engineering". Even more fishy would be to re-implement something based on the implementation details but without the clean room approach.
Clean room reverse engineering
Roughly the point here is that one party looks at the original implementation and code (the reverse engineer). S/he documents the implementation details. As you can imagine this may be important in cases such as ReactOS which strives for binary compatibility. If you read the book "The Old New Thing" by Raymond Chen you will understand immediately what I mean.
Another party (the developer, so to speak - important point is that those parties are indeed different individuals, I think schizophrenia doesn't count, though) then uses that documentation of the implementation details and re-implements it. Now, IANAL, but given ReactOS which thrives on contributions of developers from all over the world hasn't been sued to nirvana, so I suspect this is legally alright. Whether you or others deem it ethical is another thing.
... what I don't understand from your question: why re-implement something that exists in proprietary form? Sure, to provide interoperability (say OOo reading the MS Office formats) this makes sense. But overall isn't it smarter to use ideas from the existing application and implement these? Probably extending them and surpassing the existing function in features and functionality?
The problem with ideas is that there are countries with software patents and the big players are lobbying heavily even in jurisdictions such as the EU to get legislation passed to allow software patents openly. For now they only exist in niches of existing legislation and due to the fact that the officials of the EPO (and national POs) aren't necessarily the most knowledgeable in new technologies.
You should be on the safe side with interoperability for the most part, even with FLOSS, again drawing from the de facto state where projects such as OpenOffice.org and LibreOffice weren't sued to nirvana either. The same holds for Samba, where Microsoft even invited developers of the project to talk to the Microsoft developers.
Your best course of action will be to seek legal advice in your country. It doesn't mean that this applies to other jurisdictions as well, but it will give you a start.
Although the EU directive mentioned by Remko exists, in Germany the copyright holders have pushed through quite extensive changes to the "Urheberrecht" (abbrev: UrhG), which isn't quite identical with copyright from countries whose legislation is based on Common Law (notably the USA). These changes also resulted in the addition of so so called "Hackerparagraph" in the penal code (§ 202c, StGB).
That paragraph stipulates (free form translation of the Legalese, original text in the above linked Wikipedia article):
- (1) Whoever prepares a punishable crime according to § 202a or § 202b by producing or acquiring, selling, ceding access to publishing or otherwise making available passwords, security codes - allowing access to data (§ 202a subparagraph 2) - or computer programs whose purpose is the perpetration of such act, will be punished with imprisonment up to one year or a fine.
This is the most important part and you can see why Germans take "pride" in the body of judicial literature which allegedly surpasses the amounts of literature to be found in the biggest libraries.
Anyway, the problem should be obvious and if it isn't I shall duly point it out. The problem is that there is no definition in the law what comprises such tool. Is IDA Pro such a tool? What about OllyDbg? What about WinDbg? What about GDB or Immunity Debugger? What about Metasploit? There are literally so many possibilities for violating that law that organizations such as the CCC and its members and sympathizers have criticized it many times over. To no avail.
TL;DR: in Germany this is an even more slippery slope. It even resulted in cases where books became virtually useless in the German edition because the author is liable under the Hackerparagraph.