Reverse Engineering Binary Files to High-Level Source Code

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for reverse engineering binary files into source code are unreliable, time-consuming, and laborious due to false positives, complexity in understanding raw machine code, and the inability to accurately decompile complex computations, often resulting in structurally different output.

Innovation Solution

A system utilizing a multistage compiler with an artificial neural network to identify and reverse compiler optimizations, generating human-readable high-level source code from binary files across different architectures, by disassembling, de-optimizing, and transforming abstract syntax trees.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Difficulty of detecting and measuring

If a disassembler is used to disassemble the binary file into raw machine code, then the researcher can understand how the binary file operates, but the researcher needs to be skilled in understanding raw machine code and spends excessive time analyzing it

Engineering Contradiction:
Improvedifficulty of understanding binary file operationVSAvoidtime spent analyzing raw machine code
Core Design Contradiction:
Difficulty of detecting and measuringVSLoss of time

Solution Approach 1:

The patent introduces an intermediary decompilation process that translates raw machine code into high-level source code representations. This intermediary layer (source code-like output) serves as a bridge between the binary file and human understanding, eliminating the need for researchers to directly analyze complex raw machine code while preserving the functional behavior of the original program.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the mechanical/discrete process of manual disassembly and analysis with an automated computational system. Instead of requiring researchers to manually interpret raw machine code instructions, the system automatically performs the translation from binary to high-level representations, substituting manual mechanical analysis with automated algorithmic processing.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Loss of information

If a decompiler is used to decompile the binary file, then the researcher can access source code, but the output is a mangled version that does not closely resemble the original source code

Engineering Contradiction:
Improvestructural information of original source codeVSAvoidaccuracy of source code reconstruction
Core Design Contradiction:
Loss of informationVSReliability

Solution Approach 1:

The patent applies preliminary actions by analyzing the binary file and identifying compiler optimization patterns before generating the source code representation. The system pre-processes the binary to recognize optimized constructs (such as loop unrolling, inlining, or vectorization) and reverses these transformations systematically, ensuring the generated source code reflects the original programmer's intent rather than just the optimized machine code structure.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent incorporates feedback mechanisms where the system analyzes the relationship between the binary code structure and expected source code patterns. By comparing the decompiled output against the original binary characteristics and optimization patterns, the system iteratively refines the source code generation to improve structural accuracy and reliability of the reconstructed code.

Inventive Principle:
Principle #23Feedback

3Productivity

If the compiler optimizes the source code for execution speed and memory usage, then the binary file achieves better performance, but the resulting source code becomes structurally different from the original

Engineering Contradiction:
Improveexecution speed of binary fileVSAvoidstructural form of source code
Core Design Contradiction:
ProductivityVSShape

Solution Approach 1:

The patent applies inversion by reversing the compiler's optimization process. Instead of transforming source code into optimized binary (forward compilation), the system transforms optimized binary back into source code-like representations (reverse decompilation). This inversion process systematically undoes compiler optimizations such as loop unrolling, function inlining, and code hoisting, restoring the original structural form while maintaining the optimized execution behavior.

Inventive Principle:
Principle #13The other way round (Inversion)

Solution Approach 2:

The patent changes the parameter of code representation from optimized machine code to deoptimized high-level source code. By manipulating the structural parameters of the code representation, the system can preserve the functional equivalence of optimized code while restoring the original programmer's structural intentions, effectively separating the optimization level from the source code structure.

Inventive Principle:
Principle #35Parameter changes

4Productivity

If an analytical tool is used to analyze the binary file, then the researcher can obtain analysis results, but the tool produces false positives that divert the researcher in unnecessary ways

Engineering Contradiction:
Improvespeed of binary file analysisVSAvoidaccuracy of analysis results
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent creates a copying approach by generating synthetic source code representations that replicate the structure and logic of the original program. Instead of analyzing the binary file directly (which produces false positives), the system creates a copy in the form of high-level source code that can be reliably analyzed by standard tools, eliminating false positives while maintaining analysis productivity.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS11893386B1Optimizing source code from binary files
Publication Date: 2024.02.06 ARCHITECTURE TECH CORP
  • US11893386B1 patent drawing
  • US11893386B1 patent drawing
  • US11893386B1 patent drawing

AI summary

Various computing technologies for various reverse engineering platforms capable of outputting, including creating or generating, a human readable and high level source code, such as C, Fortran, LISP, or BASIC, from various binary files, such as application binaries, executable binaries, or data binaries, in an original language as developed pre-compilation. For example, some of such reverse engineering platforms can be programmed to disassemble binary files from different process architectures, identify various code optimizations as compiler introduced, reverse or unwind various compiler optimizations (de-optimize), and generate a human readable and high-level source code from de-optimized data.