Is reverse engineering illegal? Well, if you then go on to sell your version? For example, in an upcoming instructable I'm modding some electronics, well, without revealing my instructable here's an equivilent example:
Lets say I buy a little robot at the store, it has motors and the case and everything. Only problem is, it runs on AA's and you want rechargable batteries. Also, the wireless module for some reason is external and is super ugly and annoying. You crack open everything and you find that the needlessly large circuitboards only have about 20 (somewhat) easy to find components that adds up to like 2 dollars. Following traces, you recreate a schematic from the PCB (already did this, that was fuuunnn :P). Now you reengineer the board (still same schematic) so that it's much more compact, you've added a little charging circuit (and correspond boost circuit, replacing a couple of AA's with a lithium ion), and you made it all fit inside the robot (no wireless module just hanging around outside the robot. Now, essentially the schematic is the same, but you've added stuff like the boost circuit and charging circuit. You've also added a few customizing features that make it more special (adding LEDs, microcontroller, cough cough etc.).
Would it be illegal to sell a board/kit (incase other people want the board and can't solder smd to good) for people to modify there own robot (same model etc.). Also, the schematic from the reverse engineering is very similar to an example circuit in the main chip's datasheet, and a few other parts are common sense (like some resistors here and there, LEDs, a few extra filtering caps), so the company's circuit is nearly identical to the datasheet, is this illegal to sell?