Function arguments wrong
- Dominant language
- C++
- Stars
- 8.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Am I doing something wrong here? I get a file.exe.c but the function arguments look wrong - they are all the same. I've tried retdec-v3.3-windows-64b.zip, retdec-v3.3-windows-32b.zip and retdec-v3.3-ubuntu-64b.zip with the same results
I run the following which completes with a couple of warnings about `break` outside of a loop or a switch statement.
py -3 retdec-decompiler.py file.exe
Here's some output: all function arguments are &g16
` int32_t v36 = function_402bb0((int32_t)&g16, (int32_t)&g16, (int32_t)&g16); // 0x4032e9
if (v36 == 0) {
// 0x403317
*(int32_t *)(g9 - 4) = *(int32_t *)(g9 + 56);
*(int32_t *)(g9 - 8) = *(int32_t *)(g9 + 52);
*(int32_t *)(g9 - 12) = *(int32_t *)(g9 + 48);
*(int32_t *)(g9 - 16) = *(int32_t *)(g9 + 44);
*(int32_t *)(g9 - 20) = *(int32_t *)(g9 + 40);
*(int32_t *)(g9 - 24) = (int32_t)"activation-key 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x";
*(int32_t *)(g9 - 28) = g9 + 60;
wsprintfA((char *)&g16, (char *)&g16);
*(int32_t *)(g9 + 24) = g9 + 88;
*(int32_t *)(g9 + 20) = 0;
*(int32_t *)(g9 + 16) = g6;
SetDlgItemTextA(&g16, (int32_t)&g16, (char *)&g16);
`
Here's some of the dissassembly after function_402bb0() and before wsprintfA():
` call MD5_sub_402BB0 ; Get ready to print key
test eax, eax
jz short loc_403317
push 30h ; uType
push offset Caption ; "ERROR"
push offset Text ; "Invalid combination of paramaters"
push edi ; hWnd
call MessageBoxA
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0D0h
retn 10h
; ---------------------------------------------------------------------------
loc_403317: ; CODE XREF: DialogFunc+5B0↑j
mov edx, [esp+0E0h+var_A8]
mov eax, [esp+0E0h+var_AC]
mov ecx, [esp+0E0h+var_B0]
push edx ; part 5?
mov edx, [esp+0E4h+var_B4]
push eax ; part 4?
mov eax, [esp+0E8h+var_B8]
push ecx ; part 3
push edx ; part 2
push eax ; part 1
lea ecx, [esp+0F4h+String]
push offset aActivationKey0 ; "activation-key 0x%08x 0x%08x 0x%08x 0x%"...
push ecx ; LPSTR
call wsprintfA ; Print the key
`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.