Obfuscating IR Code via Return Type Segmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
ImprovesecurityVSAvoidcode complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #7Nested doll (Nesting)

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

Engineering Contradiction:
Improvenumber of addressesVSAvoidcompilation process
Core Design Contradiction:
Device complexityVSEase of manufacture

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.

Inventive Principle:
Principle #35Parameter changes

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.

Inventive Principle:
Principle #6Universality (Multi-functionality)

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

Engineering Contradiction:
Improvecode sizeVSAvoidanalysis and debugging
Core Design Contradiction:
Quantity of substanceVSDifficulty of detecting and measuring

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.

Inventive Principle:
Principle #5Merging (Combining)

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.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Data Source

PatentUS10140436B1Program obfuscation by reorganizing execution paths
Publication Date: 2018.11.27 FLEXERA SOFTWARE LLC
  • US10140436B1 patent drawing
  • US10140436B1 patent drawing
  • US10140436B1 patent drawing

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.