Function at 0x406ce0
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
mov dword [esp], eax
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 0x407020
lea eax, [ebp - 0xe48]
mov dword [esp + 0xc], 0x415118
mov dword [esp + 0x10], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], 0x414c48
call sym._CoCreateInstance_20
sub esp, 0x14
test eax, eax
js 0x4070c0
mov eax, dword [ebp - 0xe48]
lea ecx, [ebp - 0xe44]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x416678
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
test eax, eax
js 0x407040
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 0x407100
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 0x406f20
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 0x406f20
lea ecx, [ebp - 0xc28]
mov dword [esp], eax
mov dword [esp + 4], ecx
call sym._SHGetPathFromIDListW_8
sub esp, 8
test eax, eax
je 0x406f20
test byte [0x40d014], 8
je 0x406f20
lea eax, [ebp - 0xc28]
shr eax, 0x10
je 0x40716d
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 0x406eee
lea eax, [ebp - 0xc28]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.pidl_path__:__s_n
mov dword [esp + 8], global___FUNCTION__.0
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
lea esi, [esi]
lea esi, [esi]
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 0x407078
lea eax, [ebp - 0xc28]
call sym._open_icon.constprop.0
test eax, eax
jns 0x40708b
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 0x406fc5
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0xe44]
test eax, eax
je 0x406fda
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0xe3c]
test eax, eax
je 0x406fef
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 [0x40d014], 2
jne 0x407140
mov dword [ebp - 0xe4c], 0
jmp 0x406f6f
test byte [0x40d014], 2
je 0x40702d
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.could_not_query_IPersistFile__error_0x_08lX_n
mov dword [esp + 8], global___FUNCTION__.0
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x40702d
lea eax, [ebp - 0xa20]
call sym._open_icon.constprop.0
test eax, eax
js 0x406f63
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 0x406f6f
test byte [0x40d014], 2
je 0x40702d
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.could_not_create_IShellLinkW__error_0x_08lX_n
mov dword [esp + 8], global___FUNCTION__.0
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x40702d
test byte [0x40d014], 2
je 0x40702d
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.could_not_read_.lnk__error_0x_08lX_n
mov dword [esp + 8], global___FUNCTION__.0
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x40702d
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.could_not_convert__s_to_DOS_path_n
mov dword [esp + 8], global___FUNCTION__.0
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x40702d
lea eax, [ebp - 0xc28]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x406eee