Incomplete decompilation in golang binary

Open
#7,435 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go

Research direction

Open the attached asd.exe, navigate to main.main, and inspect Pseudo C and MLIL around 0x004cdbe9 and the branch at 0x004cdc90. Reproduce the incorrect always-false branch and confirm that correcting the analysis allows the remaining main-function code to appear in the decompilation.

Written by the indexing model from the issue text.

Description

Core: Calling Convention Core: Dataflow Effort: Medium Impact: Medium Language: Go

Version and Platform (required):

  • Binary Ninja Version: 5.2.8286-dev
  • Edition: Non-Commercial
  • OS: Windows
  • OS Version: 10
  • CPU Architecture: x64

Bug Description:
BInary NInja doesn't fully decompile the main function, decompiler output ends at runtime.ncpu_3 = runtime.ncpu_3;, but there is more code. The bug happens because MLIL thinks that branch at 0x004cdc90 is always false

Steps To Reproduce:

  1. Open asd.exe
  2. Go to main.main function
  3. Open Pseudo C and MLIL (or any other lower BNIL)
  4. Go to 0x004cdbe9
  5. See that in MLIL there is more code.

Expected Behavior:
Full decompilation of main function

Binary:
asd.zip

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

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.

More from Vector35/binaryninja-api

All issues in Vector35/binaryninja-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.