A method of code obfuscation includes receiving a code segment. The
existing code of the code segment is modified and/or additional code
injected to create overlapped code. The overlapped code performs a
plurality of semantically different actions depending upon the content of
execution. The resulting obfuscated code having overlapped code is then
output.