Function at 0x406be0
Capabilities:
Get process heap flags
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x2088
call fcn.0040b848
sub esp, eax
mov edi, edx
lea edx, [ebp - 0x2044]
mov eax, dword [esp + eax]
mov dword [ebp - 0x205c], ecx
lea ecx, [ebp - 0x204c]
mov dword [ebp - 0x2048], 0
mov ebx, eax
mov eax, edi
mov dword [ebp - 0x2044], 0xffffffff
mov dword [ebp - 0x2040], 0
call fcn.00402c60
test eax, eax
je 0x407030
mov eax, dword [ebp - 0x2044]
mov dword [ebp - 0x206c], eax
cmp eax, 0x19
ja 0x407000
movzx ecx, byte [ebp - 0x206c]
mov edx, 0xfdbef7ff
movzx eax, byte [section..data]
sar edx, cl
and edx, 1
mov dword [ebp - 0x2064], edx
jne 0x407007
mov esi, dword [ebp - 0x204c]
mov dword [ebp - 0x2068], esi
test al, 8
jne 0x407380
xor eax, eax
lea esi, [ebp - 0x1818]
mov word [ebp - 0x1818], ax
mov eax, dword [ebx]
mov dword [esp + 8], 0x104
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [eax + 0x20]
lea eax, [ebp - 0x1e30]
sub esp, 0xc
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
mov dword [esp + 8], 0x104
mov dword [esp], esi
mov dword [ebp - 0x2060], eax
call eax
sub esp, 0xc
test byte [section..data], 8
jne 0x407310
xor eax, eax
mov word [ebp - 0x1818], ax
mov eax, dword [ebx]
mov dword [esp + 8], 0x400
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [eax + 0x18]
lea eax, [ebp - 0x1018]
sub esp, 0xc
mov dword [esp + 8], 0x400
mov dword [esp + 4], eax
mov dword [esp], esi
mov eax, dword [ebp - 0x2060]
call eax
sub esp, 0xc
test byte [section..data], 8
jne 0x407230
lea ecx, [ebp - 0x818]
mov edx, esi
mov eax, ebx
call fcn.00404630
lea eax, [ebp - 0x2038]
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], esi
mov eax, dword [ebp - 0x2060]
call eax
sub esp, 0xc
test byte [section..data], 8
jne 0x407150
xor eax, eax
lea edx, [ebp - 0x2048]
mov word [ebp - 0x1818], ax
mov eax, dword [ebx]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x104
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [eax + 0x40]
lea eax, [ebp - 0x1c28]
sub esp, 0x10
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], esi
mov eax, dword [ebp - 0x2060]
call eax
sub esp, 0xc
test byte [section..data], 8
jne 0x4072a0
xor ecx, ecx
cmp word [ebp - 0x2038], 0
mov word [ebp - 0x1a20], cx
jne 0x406e28
mov eax, dword [ebx]
lea edx, [ebp - 0x203c]
mov dword [ebp - 0x203c], 0
mov dword [esp + 4], edx
mov dword [esp], ebx
call dword [eax + 0x10]
mov eax, dword [ebp - 0x203c]
sub esp, 8
test eax, eax
je 0x406e28
lea esi, [ebp - 0x2038]
mov dword [esp], eax
mov dword [esp + 4], esi
call dword [sym.imp.shell32.dll_SHGetPathFromIDListW]
sub esp, 8
test eax, eax
je 0x406e28
test byte [section..data], 8
jne 0x407550
lea esi, [esi]
mov eax, dword [ebp - 0x205c]
mov edx, dword [ebp - 0x2048]
mov ecx, 0
cmp word [ebp - 0x1c28], 0
mov dword [esp], eax
je 0x4070a0
lea eax, [ebp - 0x1c28]
call fcn.00406380
mov ebx, eax
test ebx, ebx
je 0x4070b5
cmp word [ebp - 0x2038], 0
jne 0x407410
mov dword [esp + 0xc], str.winemenubuilder_semaphore
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateSemaphoreA]
mov dword [ebp - 0x2040], eax
sub esp, 0x10
lea eax, [ebp - 0x2040]
mov dword [esp + 0x10], 0x1cff
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 1
call dword [sym.imp.user32.dll_MsgWaitForMultipleObjects]
sub esp, 0x14
test eax, eax
jne 0x4073f0
mov eax, dword [ebp - 0x206c]
cmp eax, 0x10
je 0x407460
cmp eax, 0x19
je 0x407473
lea eax, [ebp - 0x1a20]
mov dword [esp + 0xc], ebx
mov ecx, edi
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x1e30]
mov dword [esp + 8], eax
lea eax, [ebp - 0x1018]
mov dword [esp + 4], eax
mov eax, edi
mov dword [esp], 0
mov edx, dword [ebp - 0x2068]
call fcn.00403fd0
test eax, eax
mov dword [esp + 8], 0
sete al
mov dword [esp + 4], 1
mov esi, eax
sete al
movzx eax, al
mov edi, eax
mov eax, dword [ebp - 0x2040]
xor edi, 1
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReleaseSemaphore]
mov dword [ebp - 0x2064], edi
sub esp, 0xc
mov eax, dword [ebp - 0x2040]
test eax, eax
je 0x406f75
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [esp + 8], ebx
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 4], 0
mov edi, dword fs:[0x18]
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x2068]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x205c]
sub esp, 0xc
test eax, eax
jne 0x40701a
mov eax, esi
test al, al
je 0x40701a
test byte [section..data], 2
je 0x40701a
mov dword [esp + 0xc], str.failed_to_build_the_menu_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401540
jmp 0x40701a
movzx eax, byte [section..data]
test al, 4
jne 0x407508
nop
mov dword [ebp - 0x2064], 1
mov eax, dword [ebp - 0x2064]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [section..data], 4
je 0x407010
mov eax, edi
shr eax, 0x10
je 0x407538
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x40706a
mov eax, edi
call fcn.00401250
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unknown_link_location__s._Ignoring._n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
call fcn.00401540
jmp 0x407010
lea eax, [ebp - 0x2038]
call fcn.00406380
mov ebx, eax
test ebx, ebx
jne 0x406e5f
mov edx, dword [ebp - 0x205c]
movzx eax, byte [section..data]
test edx, edx
jne 0x4076b0
test al, 2
je 0x406e5f
cmp word [ebp - 0x1c28], 0
lea eax, [ebp - 0x2038]
lea esi, [ebp - 0x1c28]
cmove esi, eax
mov eax, esi
shr eax, 0x10
je 0x4077b0
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x40711a
mov eax, esi
call fcn.00401250
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.failed_to_extract_icon_from__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401540
jmp 0x406e5f
lea eax, [ebp - 0x2038]
shr eax, 0x10
je 0x407650
lea eax, [ebp - 0x2038]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x40718f
lea eax, [ebp - 0x2038]
call fcn.00401250
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.path_______:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401540
test byte [section..data], 8
je 0x406d67
lea eax, [ebp - 0x818]
shr eax, 0x10
je 0x407620
lea eax, [ebp - 0x818]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x407203
lea eax, [ebp - 0x818]
call fcn.00401250
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.args_______:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401540
jmp 0x406d67
lea eax, [ebp - 0x1018]
shr eax, 0x10
je 0x4075f0
lea eax, [ebp - 0x1018]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x40726f
lea eax, [ebp - 0x1018]
call fcn.00401250
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.description:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401540
jmp 0x406d2b
lea eax, [ebp - 0x1c28]
shr eax, 0x10
je 0x4075c0
lea eax, [ebp - 0x1c28]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x4072df
lea eax, [ebp - 0x1c28]
call fcn.00401250
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.icon_file__:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401540
jmp 0x406dbe
lea eax, [ebp - 0x1e30]
shr eax, 0x10
je 0x407680
lea eax, [ebp - 0x1e30]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x40734f
lea eax, [ebp - 0x1e30]
call fcn.00401250
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.workdir____:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401540
jmp 0x406cde
mov eax, esi
test esi, esi
je 0x407770
shr eax, 0x10
je 0x407750
mov dword [esp + 4], 0xffffffff
mov esi, dword [ebp - 0x2068]
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x4073bf
mov eax, esi
call fcn.00401250
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Link_______:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401540
jmp 0x406c86
test byte [section..data], 2
jne 0x407720
mov esi, 1
jmp 0x406f5f
lea eax, [ebp - 0x2038]
mov dword [esp], eax
call dword [sym.imp.shlwapi.dll_PathFindFileNameW]
sub esp, 4
mov ecx, eax
test eax, eax
je 0x406e6d
xor eax, eax
lea esi, [ebp - 0x1a20]
lea esi, [esi]
movzx edx, word [ecx + eax]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x407438
mov dword [esp], esi
call dword [sym.imp.user32.dll_CharLowerW]
sub esp, 4
jmp 0x406e6d
cmp dword [ebp - 0x206c], 0x19
je 0x407473
cmp word [ebp - 0x2038], 0
jne 0x4074b8
lea eax, [ebp - 0x1a20]
mov dword [esp + 0x10], ebx
xor edx, edx
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x1e30]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1018]
mov dword [esp + 8], eax
mov eax, edi
mov dword [esp + 4], 0
mov dword [esp], edi
mov ecx, dword [ebp - 0x2068]
call fcn.00403860
jmp 0x406f25
lea eax, [ebp - 0x1a20]
mov dword [esp + 0x10], ebx
xor edx, edx
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x1e30]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1018]
mov dword [esp + 8], eax
lea eax, [ebp - 0x818]
mov dword [esp + 4], eax
lea eax, [ebp - 0x2038]
mov dword [esp], eax
mov ecx, dword [ebp - 0x2068]
xor eax, eax
call fcn.00403860
jmp 0x406f25
mov dword [esp + 0xc], str.Not_under_desktop_or_start_menu._Ignoring._n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
call fcn.00401540
jmp 0x407010
movzx eax, di
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
jmp 0x40706a
mov eax, esi
shr eax, 0x10
je 0x4077c8
lea eax, [ebp - 0x2038]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x40758b
lea eax, [ebp - 0x2038]
call fcn.00401250
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.pidl_path__:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401540
jmp 0x406e28
lea eax, [ebp - 0x1c28]
mov dword [ebp - 0x2060], eax
movzx eax, word [ebp - 0x2060]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
jmp 0x4072df
lea eax, [ebp - 0x1018]
mov dword [ebp - 0x2070], eax
movzx eax, word [ebp - 0x2070]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
jmp 0x40726f
lea eax, [ebp - 0x818]
mov dword [ebp - 0x2070], eax
movzx eax, word [ebp - 0x2070]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
jmp 0x407203
lea eax, [ebp - 0x2038]
mov dword [ebp - 0x2070], eax
movzx eax, word [ebp - 0x2070]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
jmp 0x40718f
lea eax, [ebp - 0x1e30]
mov dword [ebp - 0x2070], eax
movzx eax, word [ebp - 0x2070]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
jmp 0x40734f
test al, 4
jne 0x407780
mov eax, dword [ebp - 0x2040]
mov esi, 1
test eax, eax
jne 0x406f69
mov dword [esp + 8], 0
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 4], 0
mov esi, dword fs:[0x18]
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x2068]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
sub esp, 0xc
jmp 0x40701a
mov dword [esp + 0xc], str.failed_wait_for_semaphore_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401540
jmp 0x4073fd
movzx eax, word [ebp - 0x2068]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
jmp 0x4073bf
mov eax, str._null_
jmp 0x4073bf
mov dword [esp + 0xc], str.Unable_to_extract_icon__deferring._n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
call fcn.00401540
jmp 0x4076b8
movzx esi, si
mov dword [esp], str._04x
mov dword [esp + 4], esi
call fcn.00401430
jmp 0x40711a
mov dword [ebp - 0x2060], esi
movzx eax, word [ebp - 0x2060]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
jmp 0x40758b