Conditional Execution & Flag Reconstruction
Traced branching logic in a Windows executable and reproduced the relevant data transformation in a standalone test program.
The problem
The assessment executable selected among multiple output paths based on a secondary parameter. Straight string searches did not explain the program’s displayed output, requiring a closer look at conditions and formatting logic.
How I approached it
- Established a static baseline with disassembly and decompiled control flow, focusing on the function with multiple output paths.
- Used runtime debugging to inspect branch conditions and compare observed execution with the decompiled logic.
- Wrote a small C test program to reconstruct the relevant output-building behavior outside the original executable.
Tools and techniques
Result
The reconstructed logic produced the expected hidden output in the original assessment. The exercise demonstrated how static and dynamic analysis can complement one another when a code path is difficult to reach through normal interaction.
What I learned
The useful turning point was tracing the condition that selected the output path. Rebuilding the formatting logic in C gave me a separate way to check my interpretation of the decompiled function.