Vector35 / Vector35/binaryninja-api

Cannot set individual bits in eflags as clobbered

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

Nobody has claimed this yet.

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

Description

Binary silly ocean glows quickly, address 0x1000c8a5

We can see that at 0x1000c8a5, the code calls a function which is immediately followed by a jne instruction:

Image

Inside of the function, there is a cmp instruction that sets the various flags:

Image

Right now, since the analysis does not know that the flags call be set within the function, it thinks the condition is opaque, and removed it at higher level of IL, which can be seen at LLIL.

Image

As a result, code after the condition are missing in the decompilation

However, there is no way to set the individual bits in eflags as clobbered, which might fix the issue. Setting the entire eflags as clobbered does not help, since the analysis does not understand the relationship between the eflags as a whole and the individual bits

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 with the analysis around address 0x1000c8a5 and inspect the LLIL for the call, cmp, and following jne. Confirm that individual eflags clobbers are not represented or propagated; done means the condition and code after it remain present in the decompilation for this binary.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
reverse-engineering
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.