Function at 0x408030
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x2064
call fcn.0040cb00
sub esp, eax
mov eax, dword [esp + eax]
mov dword [ebp - 0x204c], edx
mov dword [ebp - 0x2044], ecx
lea ecx, [ebp - 0x2040]
mov dword [ebp - 0x203c], 0
mov dword [ebp - 0x2038], 0xffffffff
mov ebx, eax
mov eax, edx
mov dword [ebp - 0x2034], 0
lea edx, [ebp - 0x2038]
call fcn.00403520
test eax, eax
je 0x408450
mov eax, dword [ebp - 0x2038]
mov dword [ebp - 0x2054], eax
cmp eax, 0x19
ja 0x408420
movzx ecx, byte [ebp - 0x2054]
mov edx, 0xfdbef7ff
movzx eax, byte [0x40d014]
sar edx, cl
and edx, 1
mov dword [ebp - 0x2048], edx
jne 0x408427
mov edi, dword [ebp - 0x2040]
mov dword [ebp - 0x2050], edi
test al, 8
jne 0x4085f0
lea esi, [ebp - 0x180c]
xor eax, eax
mov word [ebp - 0x180c], 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 - 0x1e24]
mov edi, dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
sub esp, 0xc
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], esi
call edi
sub esp, 0xc
test byte [0x40d014], 8
jne 0x408578
xor eax, eax
mov word [ebp - 0x180c], 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 - 0x100c]
sub esp, 0xc
mov dword [esp + 8], 0x400
mov dword [esp + 4], eax
mov dword [esp], esi
call edi
sub esp, 0xc
test byte [0x40d014], 8
jne 0x4087b8
mov edx, esi
mov eax, ebx
lea ecx, [ebp - 0x80c]
call fcn.004043c0
lea eax, [ebp - 0x202c]
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], esi
call edi
sub esp, 0xc
test byte [0x40d014], 8
jne 0x4086d0
xor eax, eax
mov word [ebp - 0x180c], ax
mov eax, dword [ebx]
lea edx, [ebp - 0x203c]
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 - 0x1c1c]
sub esp, 0x10
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], esi
call edi
sub esp, 0xc
test byte [0x40d014], 8
jne 0x408660
xor ecx, ecx
cmp word [ebp - 0x202c], 0
mov word [ebp - 0x1a14], cx
jne 0x408260
mov eax, dword [ebx]
lea edx, [ebp - 0x2030]
mov dword [ebp - 0x2030], 0
mov dword [esp + 4], edx
mov dword [esp], ebx
call dword [eax + 0x10]
mov eax, dword [ebp - 0x2030]
sub esp, 8
test eax, eax
je 0x408260
lea edi, [ebp - 0x202c]
mov dword [esp], eax
mov dword [esp + 4], edi
call dword [sym.imp.shell32.dll_SHGetPathFromIDListW]
sub esp, 8
test eax, eax
je 0x408260
test byte [0x40d014], 8
jne 0x4089a8
nop
mov eax, dword [ebp - 0x2044]
mov ecx, 0
cmp word [ebp - 0x1c1c], 0
mov edx, dword [ebp - 0x203c]
mov dword [esp], eax
je 0x4084c8
lea eax, [ebp - 0x1c1c]
call fcn.00405ae0
mov esi, eax
test esi, esi
je 0x4084dd
cmp word [ebp - 0x202c], 0
jne 0x4088a0
mov eax, dword [section..data]
mov dword [ebp - 0x2048], eax
test eax, eax
jne 0x408830
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 - 0x2034], eax
lea eax, [ebp - 0x2034]
sub esp, 0x10
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 0x4088f0
mov eax, dword [ebp - 0x2054]
cmp eax, 0x10
je 0x408a18
cmp eax, 0x19
jne 0x408910
lea eax, [ebp - 0x1a14]
mov dword [esp + 0x10], esi
xor edx, edx
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x1e24]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x100c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x204c]
mov dword [esp], eax
mov ecx, dword [ebp - 0x2050]
call fcn.00406580
test eax, eax
mov dword [esp + 8], 0
sete al
mov dword [esp + 4], 1
sete bl
movzx eax, al
mov edi, eax
mov eax, dword [ebp - 0x2034]
xor edi, 1
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReleaseSemaphore]
mov dword [ebp - 0x2048], edi
sub esp, 0xc
mov eax, dword [ebp - 0x2034]
test eax, eax
je 0x4083c6
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [esp], esi
mov esi, dword [sym.imp.ucrtbase.dll_free]
call esi
mov eax, dword [ebp - 0x2050]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x2044]
test eax, eax
jne 0x40843a
test bl, bl
je 0x40843a
test byte [0x40d014], 2
je 0x40843a
mov dword [esp + 0xc], str.failed_to_build_the_menu_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40d014
mov dword [esp], 1
call fcn.00402c50
jmp 0x40843a
movzx eax, byte [0x40d014]
test al, 4
jne 0x408958
nop
mov dword [ebp - 0x2048], 1
mov eax, dword [ebp - 0x2048]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x40d014], 4
je 0x408430
mov eax, dword [ebp - 0x204c]
shr eax, 0x10
test eax, eax
je 0x408988
mov dword [esp + 4], 0xffffffff
mov ebx, dword [ebp - 0x204c]
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x408496
mov eax, ebx
call fcn.00402980
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], 0x40d014
mov dword [esp], 2
call fcn.00402c50
jmp 0x408430
lea eax, [ebp - 0x202c]
call fcn.00405ae0
mov esi, eax
test esi, esi
jne 0x408297
mov edx, dword [ebp - 0x2044]
movzx eax, byte [0x40d014]
test edx, edx
jne 0x408b20
test al, 2
je 0x408297
cmp word [ebp - 0x1c1c], 0
lea eax, [ebp - 0x1c1c]
lea edi, [ebp - 0x202c]
cmovne edi, eax
mov eax, edi
shr eax, 0x10
test eax, eax
je 0x408bd8
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 0x408544
mov eax, edi
call fcn.00402980
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], 0x40d014
mov dword [esp], 1
call fcn.00402c50
jmp 0x408297
lea eax, [ebp - 0x1e24]
shr eax, 0x10
test eax, eax
je 0x408aa0
lea eax, [ebp - 0x1e24]
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 0x4085b9
lea eax, [ebp - 0x1e24]
call fcn.00402980
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.workdir____:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40d014
mov dword [esp], 3
call fcn.00402c50
jmp 0x40812d
mov eax, edi
test edi, edi
je 0x408b98
shr eax, 0x10
test eax, eax
je 0x408b50
mov dword [esp + 4], 0xffffffff
mov esi, dword [ebp - 0x2050]
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 0x408631
mov eax, esi
call fcn.00402980
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Link_______:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40d014
mov dword [esp], 3
call fcn.00402c50
jmp 0x4080da
lea eax, [ebp - 0x1c1c]
shr eax, 0x10
test eax, eax
je 0x408a80
lea eax, [ebp - 0x1c1c]
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 0x4086a1
lea eax, [ebp - 0x1c1c]
call fcn.00402980
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.icon_file__:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40d014
mov dword [esp], 3
call fcn.00402c50
jmp 0x4081fb
lea eax, [ebp - 0x202c]
shr eax, 0x10
test eax, eax
je 0x408ae0
lea eax, [ebp - 0x202c]
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 0x408711
lea eax, [ebp - 0x202c]
call fcn.00402980
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.path_______:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40d014
mov dword [esp], 3
call fcn.00402c50
test byte [0x40d014], 8
je 0x4081aa
lea eax, [ebp - 0x80c]
shr eax, 0x10
test eax, eax
je 0x408ac0
lea eax, [ebp - 0x80c]
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 0x408787
lea eax, [ebp - 0x80c]
call fcn.00402980
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.args_______:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40d014
mov dword [esp], 3
call fcn.00402c50
jmp 0x4081aa
lea eax, [ebp - 0x100c]
shr eax, 0x10
test eax, eax
je 0x408b00
lea eax, [ebp - 0x100c]
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 0x4087f9
lea eax, [ebp - 0x100c]
call fcn.00402980
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.description:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40d014
mov dword [esp], 3
call fcn.00402c50
jmp 0x408174
lea eax, [ebp - 0x100c]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x80c]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x202c]
mov dword [esp + 0xc], eax
mov dword [esp + 0x14], esi
mov edi, dword [ebp - 0x2054]
cmp edi, 0x10
mov dword [esp + 8], edi
sete al
cmp edi, 0x19
sete dl
or eax, edx
movzx eax, al
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x204c]
mov dword [esp], eax
call fcn.00401d30
test eax, eax
sete al
setne bl
movzx eax, al
mov dword [ebp - 0x2048], eax
jmp 0x4083b0
lea eax, [ebp - 0x202c]
mov dword [esp], eax
call dword [sym.imp.shlwapi.dll_PathFindFileNameW]
sub esp, 4
mov ecx, eax
test eax, eax
je 0x4082a5
lea edi, [ebp - 0x1a14]
xor eax, eax
lea esi, [esi]
movzx edx, word [ecx + eax]
mov word [edi + eax], dx
add eax, 2
test dx, dx
jne 0x4088c8
mov dword [esp], edi
call dword [sym.imp.user32.dll_CharLowerW]
sub esp, 4
jmp 0x4082a5
test byte [0x40d014], 2
jne 0x408b68
mov ebx, 1
jmp 0x4083b0
lea eax, [ebp - 0x1a14]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x1e24]
mov dword [esp + 8], eax
lea eax, [ebp - 0x100c]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [ebp - 0x204c]
mov edx, dword [ebp - 0x2050]
mov ecx, eax
call fcn.00407a10
jmp 0x408378
mov dword [esp + 0xc], str.Not_under_desktop_or_start_menu._Ignoring._n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40d014
mov dword [esp], 2
call fcn.00402c50
jmp 0x408430
mov eax, dword [ebp - 0x204c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00402b40
jmp 0x408496
mov eax, edi
shr eax, 0x10
test eax, eax
je 0x408bed
lea eax, [ebp - 0x202c]
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 0x4089e5
lea eax, [ebp - 0x202c]
call fcn.00402980
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.pidl_path__:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40d014
mov dword [esp], 3
call fcn.00402c50
jmp 0x408260
cmp dword [ebp - 0x2054], 0x19
je 0x408338
cmp word [ebp - 0x202c], 0
je 0x408338
lea eax, [ebp - 0x1a14]
mov dword [esp + 0x10], esi
xor edx, edx
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x1e24]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x100c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x80c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x202c]
mov dword [esp], eax
mov ecx, dword [ebp - 0x2050]
xor eax, eax
call fcn.00406580
jmp 0x408378
lea eax, [ebp - 0x1c1c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00402b40
jmp 0x4086a1
lea eax, [ebp - 0x1e24]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00402b40
jmp 0x4085b9
lea eax, [ebp - 0x80c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00402b40
jmp 0x408787
lea eax, [ebp - 0x202c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00402b40
jmp 0x408711
lea eax, [ebp - 0x100c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00402b40
jmp 0x4087f9
test al, 4
jne 0x408ba8
mov eax, dword [ebp - 0x2034]
mov ebx, 1
test eax, eax
jne 0x4083ba
mov eax, dword [ebp - 0x2050]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x40843a
mov dword [esp + 4], edi
mov dword [esp], str._04x
call fcn.00402b40
jmp 0x408631
mov dword [esp + 0xc], str.failed_wait_for_semaphore_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40d014
mov dword [esp], 1
call fcn.00402c50
jmp 0x4088fd
mov eax, str._null_
jmp 0x408631
mov dword [esp + 0xc], str.Unable_to_extract_icon__deferring._n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40d014
mov dword [esp], 2
call fcn.00402c50
jmp 0x408b28
mov dword [esp + 4], edi
mov dword [esp], str._04x
call fcn.00402b40
jmp 0x408544
mov dword [esp + 4], edi
mov dword [esp], str._04x
call fcn.00402b40
jmp 0x4089e5