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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xe6c
mov dword [ebp - 0xe50], edx
mov dword [ebp - 0xe48], 0
mov dword [ebp - 0xe44], 0
mov dword [ebp - 0xe3c], 0
mov dword [ebp - 0xe38], 0
call dbg.wchars_to_utf8_chars
mov dword [esp], eax
mov esi, eax
call sym._wine_get_dos_file_name
mov ebx, eax
test eax, eax
je 0x406058
lea eax, [ebp - 0xe48]
mov dword [esp + 0xc], 0x413e38
mov dword [esp + 0x10], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], 0x413968
call sym._CoCreateInstance_20
sub esp, 0x14
test eax, eax
js 0x4060f0
mov eax, dword [ebp - 0xe48]
lea ecx, [ebp - 0xe44]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x4153b8
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
test eax, eax
js 0x406078
mov eax, dword [ebp - 0xe44]
mov edx, dword [eax]
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [edx + 0x14]
sub esp, 0xc
test eax, eax
js 0x406130
lea edi, [ebp - 0xe30]
mov eax, dword [ebp - 0xe48]
lea ecx, [ebp - 0x818]
mov edx, edi
call sym._get_cmdline.constprop.0.isra.0
lea eax, [ebp - 0xc28]
mov dword [esp], edi
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
mov dword [esp + 8], 0x104
mov dword [ebp - 0xe4c], eax
call eax
xor eax, eax
lea ecx, [ebp - 0xe40]
mov word [ebp - 0xe30], ax
mov eax, dword [ebp - 0xe48]
sub esp, 0xc
mov edx, dword [eax]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], edi
mov dword [esp + 8], 0x104
mov dword [esp], eax
call dword [edx + 0x40]
lea ecx, [ebp - 0xa20]
sub esp, 0x10
mov dword [esp], edi
lea edi, [ebp - 0xe34]
mov dword [esp + 8], 0x104
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0xe4c]
call eax
sub esp, 0xc
cmp word [ebp - 0xc28], 0
jne 0x405f58
mov dword [ebp - 0xe34], 0
mov eax, dword [ebp - 0xe48]
mov edx, dword [eax]
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [edx + 0x10]
mov eax, dword [ebp - 0xe34]
sub esp, 8
test eax, eax
je 0x405f58
lea ecx, [ebp - 0xc28]
mov dword [esp], eax
mov dword [esp + 4], ecx
call sym._SHGetPathFromIDListW_8
sub esp, 8
test eax, eax
je 0x405f58
test byte [0x40c000], 8
je 0x405f58
lea eax, [ebp - 0xc28]
shr eax, 0x10
je 0x40619d
lea eax, [ebp - 0xc28]
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 0x405f2b
lea eax, [ebp - 0xc28]
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.pidl_path__:__s_n
mov dword [esp + 8], global___func__.9
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
lea esi, [esi]
nop
lea eax, [ebp - 0xe38]
mov edx, dword [ebp - 0xe40]
mov ecx, 0
cmp word [ebp - 0xa20], 0
mov dword [esp + 4], eax
lea eax, [ebp - 0xe3c]
mov dword [esp + 8], edi
mov dword [esp], eax
jne 0x4060b0
lea eax, [ebp - 0xc28]
call sym._open_icon.constprop.0
test eax, eax
jns 0x4060c3
mov eax, dword [ebp - 0xe38]
mov dword [ebp - 0xe4c], eax
mov dword [esp + 8], esi
mov esi, 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 esi
sub esp, 0xc
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0xe48]
sub esp, 0xc
test eax, eax
je 0x405ffd
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0xe44]
test eax, eax
je 0x406012
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0xe3c]
test eax, eax
je 0x406027
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov ecx, dword [ebp - 0xe4c]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x40c000], 2
jne 0x406170
mov dword [ebp - 0xe4c], 0
jmp 0x405fa7
test byte [0x40c000], 2
je 0x406065
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.could_not_query_IPersistFile__error_0x_08lX_n
mov dword [esp + 8], global___func__.9
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x406065
lea eax, [ebp - 0xa20]
call sym._open_icon.constprop.0
test eax, eax
js 0x405f9b
mov edx, dword [ebp - 0xe38]
mov eax, dword [ebp - 0xe50]
mov dword [ebp - 0xe4c], edx
mov dword [esp], eax
mov ecx, dword [ebp - 0xe34]
mov eax, dword [ebp - 0xe3c]
call sym._write_native_icon.isra.0
jmp 0x405fa7
test byte [0x40c000], 2
je 0x406065
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.could_not_create_IShellLinkW__error_0x_08lX_n
mov dword [esp + 8], global___func__.9
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x406065
test byte [0x40c000], 2
je 0x406065
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.could_not_read_.lnk__error_0x_08lX_n
mov dword [esp + 8], global___func__.9
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x406065
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.could_not_convert__s_to_DOS_path_n
mov dword [esp + 8], global___func__.9
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x406065
lea eax, [ebp - 0xc28]
mov dword [ebp - 0xe4c], eax
movzx eax, word [ebp - 0xe4c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
jmp 0x405f2b