How legal is the reverse engineering in question here ?