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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x30018
call fcn.00421fc0
mov eax, dword [0x42e004]
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 - 0x30014], ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, 2
jae 0x40222b
push 0x8000
push str._usr_bin_env
call fcn.00409a24
mov edi, dword [ebp + 8]
add esp, 8
mov dword [ebp - 0x30010], eax
cmp edi, eax
jl 0x40222b
mov esi, eax
mov ecx, edi
test ebx, ebx
je 0x40222b
test eax, eax
jns 0x402023
push 0x8000
push str._usr_bin_env
call fcn.00409a24
add esp, 8
mov esi, eax
mov ecx, edi
test edi, edi
jns 0x402037
push 0x8000
push ebx
call fcn.00409a24
add esp, 8
mov ecx, eax
cmp ecx, esi
jl 0x402088
test esi, esi
je 0x4021db
push 0
push 0
push 0
push esi
push str._usr_bin_env
push esi
push ebx
push 0
push 0x428e98
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x402088
sub eax, 1
je 0x4021db
sub eax, 1
je 0x402088
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 0x40222b
mov eax, dword [ebp - 0x30010]
mov edi, eax
mov esi, dword [ebp + 8]
lea ecx, [ebx + eax*2]
mov dword [ebp - 0x30018], ecx
cmp eax, esi
jge 0x4020d2
nop word [eax + eax]
movzx eax, word [ebx + edi*2]
push eax
call fcn.004151d0
add esp, 4
test eax, eax
jne 0x4020c6
inc edi
cmp edi, esi
jl 0x4020b0
mov eax, dword [ebp - 0x30010]
mov ecx, dword [ebp - 0x30018]
sub edi, eax
je 0x402250
cmp edi, 0x8000
je 0x402250
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.00415367
add esp, 0x10
test eax, eax
jne 0x402250
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.00414ceb
add esp, 0xc
test eax, eax
jne 0x402250
push 0x8000
lea eax, [ebp - 0x3000c]
push eax
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x4021e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x40222b
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.0040649c
mov esp, ebp
pop ebp
ret
mov al, 1
jmp 0x40208a
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 0x402266
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
lea eax, [ebp - 0x1000c]
push eax
jne 0x402241
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.0040649c
mov esp, ebp
pop ebp
ret
push str.Failed_to_find__s_on_PATH_n
push 0
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.0040649c
mov esp, ebp
pop ebp
ret
push 0x8000
lea eax, [ebp - 0x1000c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4022cc
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 0x4022cc
sub eax, 1
je 0x402333
sub eax, 1
je 0x4022cc
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 - 0x30014]
inc ebx
mov edx, ebx
call fcn.00401420
mov esi, eax
test esi, esi
je 0x402356
lea eax, [ebp - 0x2000c]
push eax
push ebx
push esi
call fcn.00414c87
add esp, 0xc
test eax, eax
jne 0x402356
mov ecx, dword [ebp - 0x30014]
mov eax, dword [ebp - 0x30018]
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.0040649c
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.0040649c
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.0040649c
mov esp, ebp
pop ebp
ret