binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

HLIL expression folding removing non-pure function call

Open farvend opened this issue 3 months ago • 2 comments

Version and Platform (required):

  • Binary Ninja Version: Latest dev branch (commit https://github.com/Vector35/binaryninja-api/commit/876ac63a638e369a14db3241e76acfd509a13bf3)
  • Edition: Non-Commercial
  • OS: Windows
  • CPU Architecture: x64

Bug Description: BN ommited call to a function

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

  1. Open provided binary at 0x140005e60
  2. Open disassembly and Pseudo C
  3. Notice that pseudo C doesn't show sub_140005ee0

Expected Behavior: sub_140005ee0 should be in decompilation

Binary: frezerovshik.zip

farvend avatar Nov 14 '25 14:11 farvend

This error fixes if I inline sub_140004fb0

farvend avatar Nov 15 '25 01:11 farvend

Here's a minimized sample: missing_func.bndb.zip

sub_0 should be showing the call to sub_20, but it's getting folded incorrectly in HLIL

Interestingly, changing sub_18 from xor eax, eax to xor ebx, ebx results in sub_20 not disappearing

negasora avatar Nov 20 '25 22:11 negasora