Vector35 / Vector35/binaryninja-api

Option for simplifying boolean comparisons in HLIL

Open
#4,137 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is it possible to have an option that simplifies boolean comparisons like this examples:

Option disabled (current output):

if (IsUserAnAdmin() == 0 && check_if_elevated() != 1) {
...
if (stb.bypass_uac != 0 && check_if_elevated() != 1) {
...
if (stb.enable_guard != 0) {
...
if (IsWow64Process(GetCurrentProcess(), &Wow64Process) != 0) {
...
if (data_41e694 == 0) {
...
if (is_guard_active(&stc->stb) != 0) {

Option Enabled:

if (!IsUserAnAdmin() && !check_if_elevated()) {
...
if (stb.bypass_uac && !check_if_elevated())
...
if (stb.enable_guard) {
...
if (IsWow64Process(GetCurrentProcess(), &Wow64Process)) {
...
if (!data_41e694) {
...
if (is_guard_active(&stc->stb)) {

I could show more examples, but I think that's enough to tell what I mean.

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 tracing how HLIL renders boolean comparisons and how Binary Ninja exposes decompiler options; the issue names no files or tests. Define the option's behavior against the provided examples, then verify that enabling it produces simplified boolean expressions while disabled output remains unchanged.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.