ArsTechnica recently published a nice article about the legality of reverse engineering in the context of Google Chrome using undocumented behavior in windows for some of it's security protections (to achieve DEP on some versions of Windows XP, for example).