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, 0xe4c
mov dword [ebp - 0xe40], edx
mov dword [ebp - 0xe3c], 0
mov dword [ebp - 0xe38], 0
mov dword [ebp - 0xe30], 0
mov dword [ebp - 0xe2c], 0
call fcn.00401d40
mov dword [esp], eax
mov edi, eax
call sub.kernel32.dll_wine_get_dos_file_name
mov ebx, eax
test eax, eax
je 0x406145
lea eax, [ebp - 0xe3c]
mov dword [esp + 0xc], 0x4156e8
mov dword [esp + 0x10], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], 0x4151f8
call dword [sym.imp.ole32.dll_CoCreateInstance]
sub esp, 0x14
test eax, eax
js 0x406058
mov eax, dword [ebp - 0xe3c]
lea ecx, [ebp - 0xe38]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x416cb8
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
test eax, eax
js 0x4060f0
mov eax, dword [ebp - 0xe38]
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 0x405fc8
mov eax, dword [ebp - 0xe3c]
lea esi, [ebp - 0xe24]
lea ecx, [ebp - 0x80c]
mov edx, esi
call fcn.00404600
lea eax, [ebp - 0xc1c]
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 - 0xe44], eax
call eax
lea ecx, [ebp - 0xe34]
xor eax, eax
sub esp, 0xc
mov word [ebp - 0xe24], ax
mov eax, dword [ebp - 0xe3c]
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 - 0xa14]
sub esp, 0x10
mov dword [esp], esi
lea esi, [ebp - 0xe28]
mov dword [esp + 8], 0x104
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0xe44]
call eax
sub esp, 0xc
cmp word [ebp - 0xc1c], 0
jne 0x405f60
mov dword [ebp - 0xe28], 0
mov eax, dword [ebp - 0xe3c]
mov edx, dword [eax]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [edx + 0x10]
mov eax, dword [ebp - 0xe28]
sub esp, 8
test eax, eax
je 0x405f60
lea ecx, [ebp - 0xc1c]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [sym.imp.shell32.dll_SHGetPathFromIDListW]
sub esp, 8
test eax, eax
je 0x405f60
test byte [section..data], 8
je 0x405f60
lea eax, [ebp - 0xc1c]
shr eax, 0x10
test eax, eax
je 0x40612a
lea eax, [ebp - 0xc1c]
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 0x405f2f
lea eax, [ebp - 0xc1c]
call fcn.00401280
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.00401550
lea esi, cs:[esi]
nop
cmp word [ebp - 0xa14], 0
lea eax, [ebp - 0xe2c]
mov ecx, 0
mov edx, dword [ebp - 0xe34]
mov dword [esp + 4], eax
lea eax, [ebp - 0xe30]
mov dword [esp + 8], esi
mov dword [esp], eax
jne 0x406098
lea eax, [ebp - 0xc1c]
call fcn.00405b00
mov esi, dword [ebp - 0xe2c]
test eax, eax
js 0x405fd7
mov eax, dword [ebp - 0xe40]
mov edx, esi
mov dword [esp], eax
mov ecx, dword [ebp - 0xe28]
mov eax, dword [ebp - 0xe30]
call fcn.004050c0
jmp 0x405fd7
test byte [section..data], 2
jne 0x4060c0
xor esi, esi
mov dword [esp], edi
mov edi, dword [sym.imp.ucrtbase.dll_free]
call edi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [ebp - 0xe3c]
sub esp, 0xc
test eax, eax
je 0x40601b
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0xe38]
test eax, eax
je 0x406030
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0xe30]
test eax, eax
je 0x406045
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov dword [esp], esi
call edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [section..data], 2
je 0x405fd5
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.00401550
jmp 0x405fd5
lea eax, [ebp - 0xa14]
call fcn.00405b00
mov esi, dword [ebp - 0xe2c]
test eax, eax
js 0x405fd7
jmp 0x405fa5
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.00401550
jmp 0x405fd5
test byte [section..data], 2
je 0x405fd5
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.00401550
jmp 0x405fd5
lea eax, [ebp - 0xc1c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401440
jmp 0x405f2f
test byte [section..data], 2
je 0x405fd5
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.00401550
jmp 0x405fd5