Control flow flattening is the obfuscation technique that "... splits all the source code's basic blocks - such as the function body, loops, and conditional branches - and puts them all inside a single infinite loop with a switch statement..." with hidden dispatcher of switching values. This makes the reverse engineering of a programs considerably harder because the original natural control flow is now broken and the switching procedure is obscured.


The following image demonstrates the control flow graphs before and after this transformation ( see Control-Flow Flattening)

The following image demonstrates the control flow graphs before and after this transformation (see



1.FLATCODE JOB uses several obfuscation techniques including control flow flattening and byte code modification with further code reconstruction using java instrumentation.


2. During obfuscation FLATCODE JOB flattens the control flow of the application's methods, rearranges their basic blocks, creates the values of switching variables according to the original code, and encodes them.


3. After flattening, byte codes of java classes are further modified


2. It attaches a Dll file to the obfuscated program to decode the switching variables at

run time.



4. At run time, the Dll file attached to the application reconstructs the modifications made in byte codes of java classes and decodes the switching variables.