Just a remark on the copyright side: assuming you are in the U.S., since 1978 copyright legally exists without any need for registration. However, in practice, legally enforcing a copyright is very difficult. Among other things, it requires proof that the person who violated your copyright actually saw your code. Patent protection covers even later, independent invention. Copyright does not. But that does lead to one interesting technique, additional to an obfuscator: giving your code an "Easter egg" behavior on some unrealistic inputs is an excellent way to demonstrate that someone took your code, since they would hardly have arrived independently at the same "Easter egg" (a behavior that is in no way called for by the specification of the problem at hand).