uxmal / reko

Reko is a binary decompiler.

Home Page:https://uxmal.github.io/reko

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexpected argument order when decompiling program

uxmal opened this issue · comments

(See #1337 opened by @yangzao for the binary in question, program1)

Original code:

set_var(i_l, s_l, l_l);
str = str_l;
printf("%s", str);

Decompiled code:

set_var(qwLoc18_141, wLoc0E_140, dwLoc0C_144);
str = qwLoc20_142;
printf("%s", str);

The argument order of set_var() is recovered incorrectly.
The order of qwLoc18_141 (corresponds to l_l) and dwLoc0C_144 (corresponds to i_l) gets reversed.