Skip to content

Decompiler: Vararg parameters not always handled #234

Closed
@nezza

Description

@nezza

Describe the bug
In quite some cases the decompiler does not identify parameters to vararg functions such as printf/sprintf correct.y

To Reproduce
Steps to reproduce the behavior:

  1. Get a wannacry sample, for example https://www.virustotal.com/gui/file/24d004a104d4d54034dbcffc2a4b19a11f39008a575aa614ea04703480b1022c
  2. Go to function FUN_00407ce0
  3. Scroll down to the sprintf calls at offset 407e18
  4. See that three arguments are pushed to sprintf but only two are identified.

Expected behavior
The call should look like
sprintf(&local_104,s_C:\%s\qeriuwjhrf_00431344,"WINDOWS")

Screenshots
Screenshot 2019-03-20 at 12 48 09
Screenshot 2019-03-20 at 12 48 19

Environment (please complete the following information):

  • OS: macOS 10.14.3
  • Java Version: 11.0
  • Ghidra Version: 9.0

Metadata

Metadata

Assignees

Labels

Type: BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions