Function at 0x4047f0
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
push ebx
sub esp, 0x4c
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], 0
mov eax, dword fs:[0x18]
mov dword [ebp - 0x2c], eax
nop
mov eax, dword [edi + 4]
cmp eax, 4
je 0x404830
ja 0x404980
cmp eax, 1
je 0x404985
cmp eax, 2
jne 0x4049b8
mov ecx, dword [edi + 8]
mov eax, dword [ebp - 0x20]
lea edx, [edi + 0xc]
shr ecx, 1
call dbg.append_path
mov ebx, eax
test eax, eax
je 0x404970
mov eax, dword [0x41b25c]
test eax, eax
je 0x4049f3
xor esi, esi
mov dword [ebp - 0x24], edi
mov edi, esi
jmp 0x40486f
add edi, 1
cmp edi, dword [0x41b25c]
jae 0x4049f0
mov eax, dword [0x41b260]
mov dword [esp + 4], ebx
lea esi, [edi*4]
mov eax, dword [eax + edi*4]
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsicmp]
test eax, eax
jne 0x404860
mov eax, dword [0x41b260]
mov edx, esi
mov dword [ebp - 0x30], esi
mov esi, edi
mov edi, dword [ebp - 0x24]
mov edx, dword [eax + edx]
mov eax, dword [edx + 4]
mov dword [ebp - 0x1c], edx
mov dword [esp], eax
call sym._DestroyIcon_4
mov edx, dword [ebp - 0x1c]
sub esp, 4
mov eax, dword [edx]
mov dword [esp + 4], 0
mov ecx, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [ecx + 0x30]
mov dword [ebp - 0x28], edx
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x24], ecx
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x1c], eax
call eax
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
sub esp, 0xc
mov eax, dword [edx + 8]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x1c]
call eax
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
sub esp, 0xc
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x1c]
call eax
mov eax, dword [0x41b25c]
sub esp, 0xc
sub eax, 1
mov dword [0x41b25c], eax
jne 0x404a20
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x1c]
call eax
mov dword [ebp - 0x1c], 1
sub esp, 0xc
nop
mov eax, dword [edi]
test eax, eax
je 0x4049a9
add edi, eax
jmp 0x404810
cmp eax, 5
jne 0x4049b8
mov ecx, dword [edi + 8]
mov eax, dword [ebp - 0x20]
lea edx, [edi + 0xc]
shr ecx, 1
call dbg.add_launcher
test eax, eax
mov eax, 1
cmove eax, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
mov eax, dword [edi]
test eax, eax
jne 0x404976
mov eax, dword [ebp - 0x1c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x411020], 4
je 0x404970
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.unexpected_action__u_n
mov dword [esp + 8], global___FUNCTION__.15
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
jmp 0x404970
mov edi, dword [ebp - 0x24]
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
jmp 0x404970
mov ecx, dword [0x41b260]
sub eax, esi
shl eax, 2
mov dword [esp + 8], eax
lea eax, [ecx + esi*4 + 4]
add ecx, dword [ebp - 0x30]
mov dword [esp + 4], eax
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll_memmove]
jmp 0x404944