Function at 0x406990
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x205c
call fcn.0040b230
sub esp, eax
mov eax, dword [esp + eax]
mov dword [ebp - 0x2044], ecx
mov dword [ebp - 0x203c], 0
mov dword [ebp - 0x2038], 0xffffffff
mov dword [ebp - 0x2034], 0
test edx, edx
je 0x406a98
lea ecx, [ebp - 0x2040]
mov edi, edx
mov ebx, eax
lea edx, [ebp - 0x2038]
mov eax, edi
call fcn.00401f30
movzx edx, byte [section..data]
test eax, eax
je 0x406a30
mov esi, dword [ebp - 0x2038]
mov dword [ebp - 0x2054], esi
cmp esi, 0x19
jbe 0x406ac0
and edx, 4
jne 0x407300
lea esi, [esi]
mov dword [ebp - 0x2048], 1
mov eax, dword [ebp - 0x2048]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
and edx, 4
je 0x406a18
mov eax, edi
shr eax, 0x10
test eax, eax
je 0x407330
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 0x406a68
mov eax, edi
call fcn.00401280
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], 0x40c000
mov dword [esp], 2
call fcn.00401550
jmp 0x406a18
test byte [section..data], 2
jne 0x407278
mov dword [ebp - 0x2048], 0
mov eax, dword [ebp - 0x2048]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0xfdbef7ff
mov ecx, esi
sar eax, cl
and eax, 1
mov dword [ebp - 0x2048], eax
jne 0x406a09
mov eax, dword [ebp - 0x2040]
and edx, 8
mov dword [ebp - 0x2050], eax
jne 0x407130
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]
sub esp, 0xc
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
mov dword [esp + 8], 0x104
mov dword [esp], esi
mov dword [ebp - 0x204c], eax
call eax
sub esp, 0xc
test byte [section..data], 8
jne 0x4070c0
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
mov eax, dword [ebp - 0x204c]
call eax
sub esp, 0xc
test byte [section..data], 8
jne 0x407048
mov edx, esi
mov eax, ebx
lea ecx, [ebp - 0x80c]
call fcn.00404600
lea eax, [ebp - 0x202c]
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], esi
mov eax, dword [ebp - 0x204c]
call eax
sub esp, 0xc
test byte [section..data], 8
jne 0x406f60
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
mov eax, dword [ebp - 0x204c]
call eax
sub esp, 0xc
test byte [section..data], 8
jne 0x406ef0
xor ecx, ecx
cmp word [ebp - 0x202c], 0
mov word [ebp - 0x1a14], cx
jne 0x406c90
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 0x406c90
lea ebx, [ebp - 0x202c]
mov dword [esp], eax
mov dword [esp + 4], ebx
call dword [sym.imp.shell32.dll_SHGetPathFromIDListW]
sub esp, 8
test eax, eax
je 0x406c90
test byte [section..data], 8
jne 0x407348
lea esi, cs:[esi]
mov eax, dword [ebp - 0x2044]
mov ecx, 0
cmp word [ebp - 0x1c1c], 0
mov edx, dword [ebp - 0x203c]
mov dword [esp], eax
je 0x406e40
lea eax, [ebp - 0x1c1c]
call fcn.00406180
mov ebx, eax
test ebx, ebx
je 0x406e55
cmp word [ebp - 0x202c], 0
jne 0x4071c0
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]
sub esp, 0x10
mov dword [ebp - 0x2034], eax
lea eax, [ebp - 0x2034]
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 0x4071a0
mov eax, dword [ebp - 0x2054]
cmp eax, 0x10
je 0x407218
cmp eax, 0x19
je 0x40722b
lea eax, [ebp - 0x1a14]
mov dword [esp + 0xc], ebx
mov ecx, edi
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x1e24]
mov dword [esp + 8], eax
lea eax, [ebp - 0x100c]
mov dword [esp + 4], eax
mov eax, edi
mov dword [esp], 0
mov edx, dword [ebp - 0x2050]
call fcn.00403e90
xor eax, 1
mov edi, eax
mov dword [esp + 8], 0
mov esi, edi
xor edi, 1
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x2034]
and esi, 1
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReleaseSemaphore]
sub esp, 0xc
mov dword [ebp - 0x2048], edi
mov eax, dword [ebp - 0x2034]
test eax, eax
je 0x406dd8
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [esp], ebx
mov ebx, dword [sym.imp.ucrtbase.dll_free]
call ebx
mov eax, dword [ebp - 0x2050]
mov dword [esp], eax
call ebx
test byte [ebp - 0x2044], 1
jne 0x406a22
mov eax, esi
test al, al
je 0x406a22
test byte [section..data], 2
je 0x406a22
mov dword [esp + 0xc], str.failed_to_build_the_menu_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401550
jmp 0x406a22
lea eax, [ebp - 0x202c]
call fcn.00406180
mov ebx, eax
test ebx, ebx
jne 0x406cc7
mov edx, dword [ebp - 0x2044]
movzx eax, byte [section..data]
test edx, edx
jne 0x407458
test al, 2
je 0x406cc7
cmp word [ebp - 0x1c1c], 0
lea eax, [ebp - 0x202c]
lea esi, [ebp - 0x1c1c]
cmove esi, eax
mov eax, esi
shr eax, 0x10
test eax, eax
je 0x407520
mov dword [esp + 4], 0xffffffff
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 0x406ebc
mov eax, esi
call fcn.00401280
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], 0x40c000
mov dword [esp], 1
call fcn.00401550
jmp 0x406cc7
lea eax, [ebp - 0x1c1c]
shr eax, 0x10
test eax, eax
je 0x407418
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 0x406f31
lea eax, [ebp - 0x1c1c]
call fcn.00401280
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.icon_file__:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401550
jmp 0x406c25
lea eax, [ebp - 0x202c]
shr eax, 0x10
test eax, eax
je 0x4073f8
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 0x406fa1
lea eax, [ebp - 0x202c]
call fcn.00401280
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.path_______:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401550
test byte [section..data], 8
je 0x406bce
lea eax, [ebp - 0x80c]
shr eax, 0x10
test eax, eax
je 0x4073d8
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 0x407017
lea eax, [ebp - 0x80c]
call fcn.00401280
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.args_______:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401550
jmp 0x406bce
lea eax, [ebp - 0x100c]
shr eax, 0x10
test eax, eax
je 0x4073b8
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 0x407089
lea eax, [ebp - 0x100c]
call fcn.00401280
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.description:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401550
jmp 0x406b92
lea eax, [ebp - 0x1e24]
shr eax, 0x10
test eax, eax
je 0x407438
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 0x407101
lea eax, [ebp - 0x1e24]
call fcn.00401280
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.workdir____:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401550
jmp 0x406b45
test eax, eax
je 0x4074e0
shr eax, 0x10
test eax, eax
je 0x4074c0
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 0x40716f
mov eax, esi
call fcn.00401280
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Link_______:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401550
jmp 0x406aed
test byte [section..data], 2
jne 0x407490
mov esi, 1
jmp 0x406dc2
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 0x406cd5
lea esi, [ebp - 0x1a14]
xor eax, eax
lea esi, cs:[esi]
lea esi, [esi]
movzx edx, word [ecx + eax]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x4071f0
mov dword [esp], esi
call dword [sym.imp.user32.dll_CharLowerW]
sub esp, 4
jmp 0x406cd5
cmp dword [ebp - 0x2054], 0x19
je 0x40722b
cmp word [ebp - 0x202c], 0
jne 0x4072a8
lea eax, [ebp - 0x1a14]
mov dword [esp], edi
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 eax, edi
mov dword [esp + 0x10], ebx
mov dword [esp + 4], 0
mov ecx, dword [ebp - 0x2050]
call fcn.004028b0
xor eax, 1
mov edi, eax
jmp 0x406d92
mov dword [esp + 0xc], str.Link_name_is_null_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401550
jmp 0x406aa5
lea eax, [ebp - 0x1a14]
mov dword [esp + 0x10], ebx
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.004028b0
xor eax, 1
mov edi, eax
jmp 0x406d92
mov dword [esp + 0xc], str.Not_under_desktop_or_start_menu._Ignoring._n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
call fcn.00401550
jmp 0x406a18
mov dword [esp + 4], edi
mov dword [esp], str._04x
call fcn.00401440
jmp 0x406a68
mov eax, ebx
shr eax, 0x10
test eax, eax
je 0x407535
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 0x407385
lea eax, [ebp - 0x202c]
call fcn.00401280
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.pidl_path__:__s_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401550
jmp 0x406c90
lea eax, [ebp - 0x100c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401440
jmp 0x407089
lea eax, [ebp - 0x80c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401440
jmp 0x407017
lea eax, [ebp - 0x202c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401440
jmp 0x406fa1
lea eax, [ebp - 0x1c1c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401440
jmp 0x406f31
lea eax, [ebp - 0x1e24]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401440
jmp 0x407101
test al, 4
jne 0x4074f0
mov eax, dword [ebp - 0x2034]
mov esi, 1
test eax, eax
jne 0x406dcc
mov eax, dword [ebp - 0x2050]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x406a22
mov dword [esp + 0xc], str.failed_wait_for_semaphore_n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401550
jmp 0x4071ad
mov eax, dword [ebp - 0x2050]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401440
jmp 0x40716f
mov eax, str._null_
jmp 0x40716f
mov dword [esp + 0xc], str.Unable_to_extract_icon__deferring._n
mov dword [esp + 8], str.InvokeShellLinker
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
call fcn.00401550
jmp 0x407460
mov dword [esp + 4], esi
mov dword [esp], str._04x
call fcn.00401440
jmp 0x406ebc
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call fcn.00401440
jmp 0x407385