avast / avast/retdec

Detect idiom: deserializing 32 and 64-bit integers

Open
#1,024 2 comments 0 reactions 0 assignees View on GitHub
C-bin2llvmir enhancement
Dominant language
C++
Stars
8.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

```c++
NumericT<32> int32FromLEOffset(NumericT<8> * start){
return int32From2Int16(int16FromLEOffset(start), int16FromLEOffset(start + 2));
}
```
and generally

```c++
NumericT intNLEFromOffset(NumericT<8> * start){
return intNFrom2HalfIntNs(intNLEFromOffset(start), intNLEFromOffset(start + N/2/8));
}
```

Analogiously for big endian.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start from the shown int32FromLEOffset and intNLEFromOffset patterns, then trace the corresponding big-endian deserialization logic. Determine where idiom detection belongs and verify that 32- and 64-bit little- and big-endian integer patterns are recognized as intended.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.