avast / avast/retdec

RetDec Decompiler is Skipping Function Calls

Open
#1,011 1 comment 0 reactions 0 assignees View on GitHub
P-output Q-question
Dominant language
C++
Stars
8.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Hello,

RetDec is only decent decompiler I could find for VB (Visual Basic 5/6) executables. I'm trying to decompile a test executable I've made in VB5. When I decompile it, in some functions it skips calls to other functions entirely thus making decompiler useless.

In Disassembly of the executable

Check function at addr: 402850

You can see references to these functions in msvbvm50.dll
msvbvm50_BASIC_CLASS_AddRef
msvbvm50_BASIC_CLASS_Release

in Disassembly

Addr: Disassembly
40288D: call dword ptr [ecx+4]
4028B7: call dword ptr [ecx+8]

I'm adding the executable as attachment (while it shouldn't contain any malware, do not run it just disassemble)

[TestCalculator.zip](https://github.com/avast/retdec/files/7102519/TestCalculator.zip)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with the attached TestCalculator.zip and inspect function 402850, including the calls at 40288D and 4028B7 to msvbvm50.dll. Done means the decompiled output no longer omits those function calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
visualbasic
Domain
compilers, reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.