Misleading decompilation

Open
#8,086 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet

Research direction

Start with the attached Wincrack.zip and inspect the decompilation at 0x14000812e, focusing on how PEB + 0x800 is represented. Compare the current expression with the requested warning tag or explicit pointer arithmetic; done when the output no longer presents this access misleadingly.

Written by the indexing model from the issue text.

Description

Version and Platform (required):

  • Binary Ninja Version: 5.2.8772
  • Edition: Non-Commercial
  • OS: Windows
  • OS Version: 11
  • CPU Architecture: x64

Bug Description:
Binary ninja decompiles peb + 0x800 as

pebbed ^= gsbase->ProcessEnvironmentBlock->WaitOnAddressHashTable[0xc + (int64_t)(i_1 + 0x80)];

which isn't wrong, but very misleading

Steps To Reproduce:
Please provide all steps required to reproduce the behavior:

  1. Go to 0x14000812e
  2. See that misleading code

Expected Behavior:
There should be an error/warning tag or/and pointer arithmetic (something like (char*)PEB + 0x800)

Binary:
Wincrack.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.