Obfuscating IR Code via Return Type Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing compilation methods fail to effectively obfuscate intermediate representation (IR) code, making it possible to reverse engineer and modify executable programs, which can lead to security breaches and unauthorized modifications.
Innovation Solution
A multi-pass compiler generates obfuscated IR code by identifying and combining functions with similar return types, creating common blocks with shared instructions, and modifying function calls to recursively execute these blocks, thereby complicating reverse engineering and modification of the executable program.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If source code is compiled into executable program using conventional methods, then the executable program can be easily reverse engineered and modified, but implementing obfuscation techniques increases code complexity and compilation overhead
Solution Approach 1:
The patent segments functions by their return types, creating separate function groups (e.g., integer-returning functions, float-returning functions) that are processed independently. This segmentation allows systematic obfuscation while maintaining manageable complexity through organized code structure.
Solution Approach 2:
The patent implements nested execution paths where functions contain recursive calls to themselves with different block parameters. This nested structure creates multiple layers of execution paths that must be traversed, significantly increasing the complexity of reverse engineering while maintaining the original functionality.
2Device complexity
If functions are combined into multi-block functions with recursive calls, then the number of addresses is reduced and execution paths are complicated, but the compilation process becomes more complex
Solution Approach 1:
The patent changes the parameter structure of functions by introducing block identifiers as parameters. Functions are transformed to accept block parameters that dictate execution paths, allowing the same function to perform multiple operations based on the parameter value. This parameter transformation enables address reduction while systematic processing manages compilation complexity.
Solution Approach 2:
The patent creates universal functions that can execute multiple different code blocks based on their parameters. A single function can serve multiple purposes by selecting different execution blocks, reducing the total number of separate function addresses while maintaining all original functionalities through parameter-driven behavior.
3Quantity of substance
If common instructions are identified and combined into common blocks, then code size is reduced and obfuscation is enhanced, but analysis and debugging become more difficult
Solution Approach 1:
The patent merges common instructions from multiple functions into shared common blocks. By identifying and combining redundant instruction sequences, the overall code size is reduced while maintaining functionality. The merging is systematic, grouping common operations into reusable blocks that are referenced by multiple functions.
Solution Approach 2:
The patent adds a new dimension to code organization by introducing block identifiers and execution paths. Instead of linear code sequences, the obfuscated code operates in a multi-dimensional space of blocks and execution paths, making traditional linear analysis and debugging approaches ineffective while the code maintains its logical structure.
Data Source
AI summary
Intermediate representation (IR) code of source code can be generated for compiling the source code into machine code for an executable program. The IR code can be obfuscated by reorganizing the code based on return types of functions of the IR code to change the execution paths, resulting in an executable program that is difficult to reverse engineer.


