Function at 0x401fa0
Capabilities:
Check if file exists
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x30a98
call fcn.004220f0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push 0
push 0
push str.PYLAUNCHER_NO_SEARCH_PATH
mov ebx, edx
mov dword [ebp - 0x30a98], ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, 2
jae 0x402272
push 0x8000
push str._usr_bin_env
call fcn.00409b44
mov edi, eax
add esp, 8
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30a94], edi
cmp eax, edi
jl 0x402272
mov esi, edi
mov ecx, eax
test ebx, ebx
je 0x402272
test edi, edi
jns 0x402028
push 0x8000
push str._usr_bin_env
call fcn.00409b44
mov esi, eax
add esp, 8
mov eax, dword [ebp + 8]
mov ecx, eax
test eax, eax
jns 0x40203c
push 0x8000
push ebx
call fcn.00409b44
add esp, 8
mov ecx, eax
cmp ecx, esi
jl 0x40208d
test esi, esi
je 0x4021df
push 0
push 0
push 0
push esi
push str._usr_bin_env
push esi
push ebx
push 0
push 0x428ea8
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x40208d
sub eax, 1
je 0x4021df
sub eax, 1
je 0x40208d
push str._usr_bin_env
push esi
push ebx
push esi
push str.Error_comparing__.s_and__.s__compareArgument_
push 0
call fcn.00401200
add esp, 0x18
xor al, al
test al, al
je 0x402272
mov esi, edi
lea ecx, [ebx + edi*2]
mov dword [ebp - 0x30a90], ecx
cmp esi, dword [ebp + 8]
jge 0x4020d2
mov esi, dword [ebp + 8]
nop word [eax + eax]
movzx eax, word [ebx + edi*2]
push eax
call fcn.004152f0
add esp, 4
test eax, eax
jne 0x4020c6
inc edi
cmp edi, esi
jl 0x4020b0
mov esi, dword [ebp - 0x30a94]
mov ecx, dword [ebp - 0x30a90]
sub edi, esi
je 0x402230
cmp edi, 0x8000
je 0x402230
mov esi, edi
test edi, edi
jle 0x402103
nop dword [eax]
cmp word [ecx + esi*2], 0x2e
je 0x402103
dec esi
mov eax, esi
test esi, esi
jg 0x4020f0
test eax, eax
cmove esi, edi
push esi
push ecx
lea eax, [ebp - 0x1000c]
push 0x8000
push eax
call fcn.00415487
add esp, 0x10
test eax, eax
jne 0x402230
lea esi, [ebp + esi*2 - 0x1000c]
test esi, esi
je 0x402166
push 1
push 0xffffffffffffffff
push str..exe
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_CompareStringOrdinal]
sub eax, 1
je 0x402166
sub eax, 1
je 0x402187
sub eax, 1
je 0x402166
push str..exe
push 0xffffffffffffffff
push esi
push 0xffffffffffffffff
push str.Error_comparing__.s_and__.s__comparePath_
push 0
call fcn.00401200
add esp, 0x18
push str..exe
lea eax, [ebp - 0x1000c]
push 0x8000
push eax
call fcn.00414e0b
add esp, 0xc
test eax, eax
jne 0x402230
push 0x8000
lea eax, [ebp - 0x3000c]
push eax
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x4021e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x402272
lea eax, [ebp - 0x1000c]
push eax
push str.Failed_to_read_PATH_n
push 0
call fcn.00401200
add esp, 0xc
mov eax, 0x6d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004065bc
mov esp, ebp
pop ebp
ret
mov al, 1
jmp 0x40208f
push 0
lea eax, [ebp - 0x2000c]
push eax
push 0x8000
push 0
lea eax, [ebp - 0x1000c]
push eax
lea eax, [ebp - 0x3000c]
push eax
call dword [sym.imp.KERNEL32.dll_SearchPathW]
mov ebx, eax
test ebx, ebx
jne 0x402246
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
lea eax, [ebp - 0x1000c]
push eax
je 0x402265
push str.Failed_to_find__s_on_PATH_n
push ebx
call fcn.00401200
add esp, 0xc
mov eax, 0x66
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004065bc
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x3025c]
push eax
lea eax, [ebp - 0x2000c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
test eax, eax
jne 0x402288
lea eax, [ebp - 0x1000c]
push eax
push str._Did_not_find__s_on_PATH_n
call fcn.00401130
add esp, 8
mov eax, 0x71
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004065bc
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test dword [ebp - 0x3025c], 0x400
je 0x402368
test dword [ebp - 0x30238], 0x8000001b
je 0x402368
push 0
push 0x200000
push 3
push 0
push 1
push 0
lea eax, [ebp - 0x2000c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
test esi, esi
je 0x40225e
push 0
push 0
push 0x82c
lea eax, [ebp - 0x30a8c]
push eax
push 0
push 0
push 0x900a8
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x402315
lea eax, [ebp - 0x1000c]
push eax
push str._Did_not_find__s_on_PATH_n
call fcn.00401130
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402272
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, str.Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
lea eax, [ebp - 0x30a80]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40234d
test dx, dx
je 0x402349
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40234d
add eax, 4
add ecx, 4
test dx, dx
jne 0x402327
xor eax, eax
jmp 0x402352
sbb eax, eax
or eax, 1
test eax, eax
jne 0x402368
push str._ignoring_redirector_that_would_launch_store_n
call fcn.00401130
add esp, 4
jmp 0x402272
push 0x8000
lea eax, [ebp - 0x1000c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4023ce
push 1
push 0xffffffffffffffff
lea eax, [ebp - 0x2000c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x1000c]
push eax
call dword [sym.imp.KERNEL32.dll_CompareStringOrdinal]
sub eax, 1
je 0x4023ce
sub eax, 1
je 0x402435
sub eax, 1
je 0x4023ce
lea eax, [ebp - 0x2000c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x1000c]
push eax
push 0xffffffffffffffff
push str.Error_comparing__.s_and__.s__comparePath_
push 0
call fcn.00401200
add esp, 0x18
mov ecx, dword [ebp - 0x30a98]
inc ebx
mov edx, ebx
call fcn.00401420
mov esi, eax
test esi, esi
je 0x402458
lea eax, [ebp - 0x2000c]
push eax
push ebx
push esi
call fcn.00414da7
add esp, 0xc
test eax, eax
jne 0x402458
mov ecx, dword [ebp - 0x30a98]
mov eax, dword [ebp - 0x30a90]
push esi
push str._Found__s_on_PATH_n
mov dword [ecx + 8], esi
lea eax, [eax + edi*2]
mov dword [ecx + 0x1c], eax
mov eax, dword [ebp + 8]
sub eax, edi
mov dword [ecx + 0x20], eax
call fcn.00401130
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004065bc
mov esp, ebp
pop ebp
ret
push str._ignoring_recursive_shebang_command_n
call fcn.00401130
add esp, 4
mov eax, 0x72
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004065bc
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
mov eax, 0x68
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004065bc
mov esp, ebp
pop ebp
ret