Function at 0x408680
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x4c
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], 0
mov eax, dword fs:[0x18]
mov dword [ebp - 0x30], eax
nop
mov eax, dword [esi + 4]
cmp eax, 4
je 0x4086c0
ja 0x408818
cmp eax, 1
je 0x40881d
cmp eax, 2
jne 0x408850
mov ecx, dword [esi + 8]
mov eax, dword [ebp - 0x20]
lea edx, [esi + 0xc]
shr ecx, 1
call sym._append_path
mov dword [ebp - 0x24], eax
mov edi, eax
test eax, eax
je 0x408808
mov eax, dword [0x4124b0]
test eax, eax
je 0x40888b
xor ebx, ebx
mov dword [ebp - 0x28], esi
mov esi, ebx
jmp 0x408705
inc esi
cmp esi, dword [0x4124b0]
jae 0x408888
mov eax, dword [0x4123fc]
mov dword [esp + 4], edi
lea ebx, [esi*4]
mov eax, dword [eax + esi*4]
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsicmp]
test eax, eax
jne 0x4086f8
mov eax, dword [0x4123fc]
mov edi, ebx
mov ebx, esi
mov esi, dword [ebp - 0x28]
mov edx, dword [eax + edi]
mov eax, dword [edx + 4]
mov dword [ebp - 0x1c], edx
mov dword [esp], eax
call dword [sym.imp.user32.dll_DestroyIcon]
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 - 0x2c], edx
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x28], ecx
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x1c], eax
call eax
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
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 - 0x2c]
mov ecx, dword [ebp - 0x28]
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 [0x4124b0]
sub esp, 0xc
dec eax
mov dword [0x4124b0], eax
jne 0x4088b8
mov edx, dword [ebp - 0x24]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], edx
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
lea esi, [esi]
nop
mov eax, dword [esi]
test eax, eax
je 0x408841
add esi, eax
jmp 0x4086a0
cmp eax, 5
jne 0x408850
mov ecx, dword [esi + 8]
mov eax, dword [ebp - 0x20]
lea edx, [esi + 0xc]
shr ecx, 1
call sym._add_launcher
test eax, eax
mov eax, 1
cmove eax, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi]
test eax, eax
jne 0x40880e
mov eax, dword [ebp - 0x1c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x4120c4], 4
je 0x408808
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.unexpected_action__lu_n
mov dword [esp + 8], str.process_changes
mov dword [esp + 4], 0x4120c4
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
jmp 0x408808
mov esi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x30]
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 0x408808
mov ecx, dword [0x4123fc]
sub eax, ebx
shl eax, 2
mov dword [esp + 8], eax
lea eax, [ecx + ebx*4 + 4]
add ecx, edi
mov dword [esp + 4], eax
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll_memmove]
jmp 0x4087d6