Log date · Fri
Can obfuscated code be recovered? ReSource explained
Compiled and obfuscated code can retain behavioral clues. ReSource’s 83% measures function retrieval, not line-by-line recovery.
What can compiled code reveal?
Compiled code can still reveal branches, constants and calculations; removing debug information does not erase behavior. We compiled one sample twice with Java 17. Without debug information the class fell from 1,192 to 924 bytes and its local-variable table disappeared, but the inspected method had the same bytecode instructions. Both programs returned 120, 120 and 171 for three inputs.
The ReSource paper submitted on August 28, 2026 studies source recovery after optimization and obfuscation. Its authors report 83% Top-5 retrieval accuracy: finding the matching source among candidate functions, not a line-by-line recovery rate. [1]
| Question | Finding |
|---|---|
| What changed with debug information? | The local names units and base appeared only in the debug table. |
| Was the calculation visible? | Both instruction sequences contained 120, 17, a comparison and multiply/add. |
| What does the paper’s number mean? | 83% is its Top-5 function retrieval result. |
What the paper measured
Zhiping Zhou, Xiaohong Li and co-authors submitted v1 at 03:52 UTC on August 28, 2026. ReSource separates recovery into three stages: retrieving guidance from a semantic distortion database, predicting a control-flow skeleton, and refining identifiers and presentation. The authors target control-flow flattening and compare with DeGPT, LLM4Decompile and FidelityGPT. [1]
The paper uses x86-64 C/C++ programs across three optimization levels and four obfuscation techniques, with over 80,000 decompiled/source function pairs and 700 isolated test functions. Its retrieval corpus contains 10,853 distinct source functions; function names are normalized and comments removed before embedding. The abstract also reports average similarity of 0.66, while the paper breaks similarity into dimensions including interface, structure and control flow. Retrieval is a proxy for semantic identifiability: it does not by itself prove functional equivalence of generated code or recovery of a complete app. [1]
The authors report that baselines overfit or degrade under these conditions. This is a reason to revisit assessments as research and tools change, but the paper’s figures cannot estimate the time needed to analyze a particular commercial application.
Two builds and the clues they retain
We wrote a pricing function that returns 120 plus 17 times the quantity when the quantity exceeds 2, and otherwise returns 120. We compiled it with javac 17.0.19 using -g and -g:none, ran both builds and inspected them with javap. This Java classfile illustration separates code clues from debug metadata; it is not a test of ReSource, the paper’s native binaries, optimization levels or control-flow flattening.
public static int total(int units) {
int base = 120;
if (units > 2) return base + units * 17;
return base;
}The debug build recorded the parameter units and local variable base; the other build had no such table. Oracle documents that -g includes local-variable debugging information and -g:none generates none; javap -c prints instructions and -l prints line and local-variable tables. [2][3]
LocalVariableTable:
Start Length Slot Name Signature
0 17 0 units I
3 14 1 base IEven without those names, the other output retained a comparison, multiplication and both constants. A decompiler or an analyst can use such clues to infer part of the behavior, although bytecode does not directly provide original comments, business context or every original name. Compare an interpretation with the source and observed outputs before treating it as reliable.
0: bipush 120
2: istore_1
3: iload_0
4: iconst_2
5: if_icmple 15
8: iload_1
9: iload_0
10: bipush 17
12: imul
13: iadd
14: ireturn
15: iload_1
16: ireturnRecommendations for your assessment
These are engineering recommendations, not protection benefits measured by our sample. Define the asset and the assumed analyst first, then choose checks that can be repeated.
| Question | Finding |
|---|---|
| High-value rules that can run online | Consider moving them to a service and validate sensitive decisions there. |
| Logic that must work offline | Accept that the client must carry executable behavior; assess the cost and compatibility of layered measures. |
| Assessing an obfuscation transform | Compare the same release build and record analysis time, visible clues and functional regressions. |
| A model-generated source interpretation | Test boundary inputs, error paths and side effects; readability alone is insufficient. |
Keep the compiler, dependencies, inputs and build configuration fixed in a comparison, and record tool versions and the analyst’s starting information. Inspect names, control flow, constants and behavior separately; record time and mistakes. Repeat after compiler or protection-tool upgrades instead of treating an old result as a permanent guarantee.
Inspect your own build
Run these commands in an isolated directory containing our Quote.java to reproduce the comparison. For your own Java release, replace the class path and class name with your artifact. javap shows class bytecode, not the original source; treat output containing sensitive business information as internal material.
mkdir -p debug nodebug
javac -g -d debug Quote.java
javac -g:none -d nodebug Quote.java
java -cp debug Quote
java -cp nodebug Quote
javap -classpath debug -c -l Quote
javap -classpath nodebug -c -l QuoteChoose a known critical function and record expected inputs and results before inspecting names, constants and branches in the release artifact. Add boundary and error-path tests; for high-value rules, also check whether the server validates independently. Tie the report to the exact build and schedule the next assessment.
Your checklist
- Inventory critical client logic and its protections.
- Fix the release build and tool versions; inspect visible names and constants.
- Test source interpretations against boundary inputs and error paths.
- Assess server-side validation and offline requirements.
- Record results and reassess after tool upgrades.
Primary sources
- arXiv: Decoupling is a Necessity: Transformation-Agnostic Decompiled Code Recovery under Optimization and Obfuscation · Source date 2026-08-28 · Checked 2026-10-12
- Oracle: javap command · Checked 2026-11-11
- Oracle: javac command · Checked 2026-11-11