Mutate macro¶
The MUTATE macro marks a region of code for mutation. It converts the original native machine code into more complex, equivalent instructions for the same architecture. MUTATE code runs much faster than VM code, but provides less protection.
Use MUTATE for code that needs some obfuscation while retaining high runtime performance.
Note: The current version of SecureEngineĀ® does not support this macro for .NET languages or Visual Basic applications compiled in P-Code mode.
Delphi Macro Usage¶
C/C++ Macro Usage¶
Visual Basic Macro Usage¶
Named Macro Usage¶
Use VIRTUALIZER_MUTATE_START_NAMED to assign a readable label to a MUTATE block. The label is displayed in the Protection Macros panel and during protection:
The named start marker uses the normal VIRTUALIZER_MUTATE_ONLY_END marker. Pass a non-empty, NUL-terminated UTF-8 string containing 1 to 255 bytes, excluding the terminator. Control characters are not accepted. A string literal is recommended so Code Virtualizer can recover the label reliably.
Remarks¶
Consider the following restrictions when choosing where to insert a MUTATE macro:
-
Switch statements inside the macro might not work correctly in some compiled applications. These statements have different names in different languages, such as "Case" in Delphi and "Select Case" in Visual Basic.
-
Exception handling inside the macro might not work correctly. Avoid placing MUTATE macros around try-except clauses. In Visual Basic, this restriction applies to "On Error" statements.