All five challenges

PRYIDA / BRANCH-MIXER

Branch-dependent mixer

Identify the path through a switch when the selected case changes with the running value.

01 Open the executable

Open branch-mixer.exe in PryIDA and bring up Executable Explorer. You need a Windows x64 host to run this PE.

Windows PryIDA. Open the executable.

02 Find the call

In Disassembly, select CALL at 0x140001020 for the recorded build. Its source begins at file offset 0x420. Right-click the instruction and find Save breakpoint from Assembly.

Windows PryIDA. Find the call.

03 Name the breakpoint

Select that action, enter Challenge call, and click Save breakpoint. This attaches a name to the verified instruction in this build.

Windows PryIDA. Name the breakpoint.

04 Rename and confirm

Open Runtime debugger → Saved breakpoints. Click the saved breakpoint’s Rename button and set it to Branch-dependent mixer · entry. Confirm the file offset stays the same.

Windows PryIDA. Rename and confirm.

05 Prepare the launch

Click Prepare launch with empty stdin. Check that one saved breakpoint matches. Type branch-mixer.exe to authorize this test and click Launch paused.

Windows PryIDA. Prepare the launch.

06 Verify the breakpoint bound

Find the named row under Saved breakpoints. Bound means PryIDA matched the source instruction to the loaded image. The startup thread is still suspended.

Windows PryIDA. Verify the breakpoint bound.

07 Read the call arguments

Click Continue. The named stop appears with raw values for RCX, RDX, R8 and R9. These are 0x13579bdf, 0x2468ace0, 9 and 3. Use them to check the prediction below.

Windows PryIDA. Read the call arguments.

Predict the result

These intermediate values come from a separate calculation using the four observed inputs. The debugger verifies the call boundary and final word.

  1. Set the initial word to the XOR of the first two arguments, 0x373f373f.
  2. At each round, XOR the current word with the round index and 3. The low four bits select a case.
  3. The nine selectors are 12, 13, 2, 0, 3, 5, 3, 15, 12. Apply the dedicated rule on 12 and the default rule on the other observed values.
  4. Using 32-bit arithmetic gives 0x5ba7e41f after the first round and 0x7f7cabaf after the ninth. Compare it with RAX.

08 Save the call and its screenshot

Click Save stop + screenshot. Wait for the screenshot attachment confirmation.

Windows PryIDA. Save the call and its screenshot.

09 Step Over and read the return

Click Step Over. PryIDA pairs the verified stop at 0x140001025 with the preceding call and shows RAX 0x7f7cabaf.

Windows PryIDA. Step Over and read the return.

10 Save the return and its screenshot

Click Save stop + screenshot again. The return goes into a second evidence step.

Windows PryIDA. Save the return and its screenshot.

11 Confirm the clean exit

Click Continue one final time. Confirm the Runtime state says exited. The receipt separately records exit code 0.

Windows PryIDA. Confirm the clean exit.

12 Review the saved call

Open Walkthrough, choose the first step, and expand Screenshot evidence. Check the title, attached image and source range at 0x420. The Source Hex action reopens the file evidence.

Windows PryIDA. Review the saved call.

13 Review the saved return

Select the second step. Confirm its screenshot and observation identify RAX 0x7f7cabaf at file offset 0x425.

Windows PryIDA. Review the saved return.

Verified result

0x7f7cabaf

Original SHA-256 1c612014ed2eaf834ac1175c06868a9d13490aa40def7af19197bbb40a4ead1e

Saved call image · Saved return image · Challenge receipt