OS Lock locks code to a list of operating systems. This will ensure that the code will only work in one of the allowed operating systems. This is a good transformation to enforce applications to a specific platform. Countermeasures can be specified (optionally) to be executed when the code runs in any other operating system.
Consider combining this transformation with obfuscation transformations to harden the resulting code making it more resilient to automated de-obfuscator tools and harder to understand by a human. You may also find useful to combine this transformation with other locks: