Function at 0x405ef0
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 fcn.00401690
mov dword [esp], eax
mov edi, eax
call sub.kernel32.dll_wine_get_dos_file_name
mov ebx, eax
test eax, eax
je 0x40633e
lea eax, [ebp - 0xe48]
mov dword [esp + 0xc], 0x414598
mov dword [esp + 0x10], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], 0x4140c8
call dword [sym.imp.ole32.dll_CoCreateInstance]
sub esp, 0x14
test eax, eax
js 0x406260
mov eax, dword [ebp - 0xe48]
lea ecx, [ebp - 0xe44]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x415b68
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
test eax, eax
js 0x4062e0
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 0x406228
lea esi, [ebp - 0xe30]
mov eax, dword [ebp - 0xe48]
lea ecx, [ebp - 0x818]
mov edx, esi
call fcn.00404630
lea eax, [ebp - 0xc28]
mov dword [esp], esi
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], esi
mov dword [esp + 8], 0x104
mov dword [esp], eax
call dword [edx + 0x40]
lea ecx, [ebp - 0xa20]
sub esp, 0x10
mov dword [esp], esi
lea esi, [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 0x406128
mov dword [ebp - 0xe34], 0
mov eax, dword [ebp - 0xe48]
mov edx, dword [eax]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [edx + 0x10]
mov eax, dword [ebp - 0xe34]
sub esp, 8
test eax, eax
je 0x406128
lea ecx, [ebp - 0xc28]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [sym.imp.shell32.dll_SHGetPathFromIDListW]
sub esp, 8
test eax, eax
je 0x406128
test byte [section..data], 8
je 0x406128
lea eax, [ebp - 0xc28]
shr eax, 0x10
je 0x406316
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 0x4060fd
lea eax, [ebp - 0xc28]
call fcn.00401250
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.pidl_path__:__s_n
mov dword [esp + 8], str.thumbnail_lnk
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401540
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], esi
mov dword [esp], eax
jne 0x4062a0
lea eax, [ebp - 0xc28]
call fcn.00405c40
test eax, eax
jns 0x4062b3
mov eax, dword [ebp - 0xe38]
mov dword [ebp - 0xe4c], eax
mov dword [esp + 8], edi
mov edi, 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 edi
sub esp, 0xc
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0xe48]
sub esp, 0xc
test eax, eax
je 0x4061cd
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0xe44]
test eax, eax
je 0x4061e2
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0xe3c]
test eax, eax
je 0x4061f7
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 edi
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [section..data], 2
je 0x406291
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.could_not_read_.lnk__error_0x_08lX_n
mov dword [esp + 8], str.thumbnail_lnk
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401540
jmp 0x406291
test byte [section..data], 2
je 0x406291
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.could_not_create_IShellLinkW__error_0x_08lX_n
mov dword [esp + 8], str.thumbnail_lnk
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401540
xor edx, edx
mov dword [ebp - 0xe4c], edx
jmp 0x406177
lea eax, [ebp - 0xa20]
call fcn.00405c40
test eax, eax
js 0x40616b
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 fcn.00405210
jmp 0x406177
test byte [section..data], 2
je 0x406291
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.could_not_query_IPersistFile__error_0x_08lX_n
mov dword [esp + 8], str.thumbnail_lnk
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401540
jmp 0x406291
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 fcn.00401430
jmp 0x4060fd
test byte [section..data], 2
je 0x406291
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str.could_not_convert__s_to_DOS_path_n
mov dword [esp + 8], str.thumbnail_lnk
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401540
jmp 0x406291