Vector35 / Vector35/binaryninja-api

Support `++` for advancing to next data structure in data structure arrays

Open
#4,164 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

For the example below Section_Header is 0x28 byte in size and at 004141a3 it is actually advances to the next Section_Header (add ebx, 40 in assembly). Even if technically this is correct, I would like to be able to see that advance like pSection++ which is more shorter and easy to understand.

0041417d        struct Section_Header* pSection = &NtHdrs->OptionalHeader + zx.d(NtHdrs->sizeOfOptionalHeader)
00414185        if (0 u< NtHdrs->numberOfSections) {
004141b3          int32_t i
004141b3          do {
00414193            pe_get_section_data(&sdata, DosHdr, pSection, &sdata)
0041419b            pe_append_to_section_list(&stpe->section_list, sdata)
004141a3            pSection = &pSection[1]
004141a9            i = i + 1
004141aa          } while (i s< zx.d(stpe->NtHdr->numberOfSections))
004141a0        }

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

No source file or test is named. Start by locating the decompiler logic that renders pointer advancement through data-structure arrays, then determine how the requested pSection++ form can be represented without changing semantics. Done means the shown pattern can be emitted as pSection++ where appropriate and is covered by a regression test.

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
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.