Function at 0x40a650
Capabilities:
Check if file exists
Get file attributes
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x283c]
mov eax, 0x283c
call fcn.0041a940
push 0xffffffffffffffff
push 0x41bb58
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x427038]
xor eax, ebp
mov dword [ebp + 0x2838], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 0x2000
lea eax, [ebp + 0x630]
mov dword [ebp - 0x10], 0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, 0x22
mov word [ebp + 0x630], ax
test esi, esi
je 0x40a8c5
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
call edi
cmp eax, 1
jl 0x40a8c5
push esi
call edi
cmp eax, 0xffa
jge 0x40a8c5
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp + 0x630]
push eax
call esi
push 0x4226d0
lea eax, [ebp + 0x630]
push eax
call esi
push 0xb
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 0x28]
push str.Shell32.dll
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call fcn.00402bd0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x28]
push eax
call fcn.0040f590
mov ecx, eax
call fcn.0040f650
mov esi, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x40a78b
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40a781
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40a781
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0041948d
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
test esi, esi
je 0x40a8c5
push str.ShellExecuteW
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x40a8c5
lea ecx, [ebp]
call fcn.0040a030
xor edi, edi
lea esi, [ebp]
nop word [eax + eax]
cmp word [esi], 0
je 0x40a7f0
push 1
push 0
lea eax, [ebp + 0x630]
push eax
push esi
push 0x4226d4
push 0
call ebx
cmp eax, 0x20
ja 0x40a7fe
inc edi
add esi, 0x210
cmp edi, 3
jl 0x40a7d0
jmp 0x40a823
imul eax, edi, 0x210
cmp dword [ebp + eax + 0x208], 0
mov eax, dword [ebp + eax + 0x20c]
jne 0x40a818
add eax, 0x10
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x40a8c7
push 1
push 0
push 0
lea eax, [ebp + 0x630]
push eax
push 0x4226d4
push 0
call ebx
cmp eax, 0x20
jbe 0x40a848
mov eax, 0x10
jmp 0x40a8c7
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor esi, esi
mov dword [ebp - 0x30], str._programfiles_x86__Internet_Exploreriexplore.exe
mov dword [ebp - 0x2c], str._programfiles_Internet_Exploreriexplore.exe
nop
push 0x208
lea eax, [ebp + 0x2630]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp + 0x2630]
push 0x103
push eax
push dword [ebp + esi*4 - 0x30]
call edi
lea eax, [ebp + 0x2630]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40a8ba
push 1
push 0
lea eax, [ebp + 0x630]
push eax
lea eax, [ebp + 0x2630]
push eax
push 0x4226d4
push 0
call ebx
cmp eax, 0x20
ja 0x40a83e
inc esi
cmp esi, 2
jb 0x40a860
mov eax, dword [ebp - 0x10]
jmp 0x40a8c7
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x2838]
xor ecx, ebp
call fcn.0041944c
lea esp, [ebp + 0x283c]
pop ebp
ret