4.7. Code Control Flow Obfuscation
Code control flow obfuscation allows making IL code more entangled. Decompilers often crash on such code so that the code may be considered as much better protected.
By default, the code control flow obfuscation feature is not used during the obfuscation of the assembly.
To enable the code control flow obfuscation feature, you should apply a specially formed attribute to your assembly. To do that, you can use the instructions below.
Instructions on enabling control flow obfuscation
Open obfuscatable project inside the IDE
Add new source file to the project and call it
ObfuscationSettings.cs(for C#) or
ObfuscationSettings.vb(for Visual Basic .NET). You may prefer to use another name instead of
ObfuscationSettings.cswith the following content (C#):
[assembly: Obfuscation(Feature = "code control flow obfuscation", Exclude = false)]
For Visual Basic .NET, fill
ObfuscationSettings.vbwith the following content:
<Assembly: Obfuscation(Feature:="code control flow obfuscation", Exclude:=False)>