Vector35 / Vector35/binaryninja-api

Convert a jump that can only get two possible target address to an if-else statement

Open
#6,644 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Core Effort: Low IL Optimization Impact: Low
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

Image

We can see in the screenshot that the code is using a clever trick to check whether the value of argc is 2, and then jump to different addresses based on the comparison. Such branchless obfuscation tricks can often be seen in malware, so ideally we should convert it to an if-else

Related to #if-else

Binary bright robot builds quietly

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing related issue #5637 and the decompiler behavior shown in the screenshot for the binary "bright robot builds quietly." Confirm how the two possible target addresses are represented, then verify that the resulting output uses an if-else statement rather than the branchless jump pattern.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
reverse-engineering
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.