Function at 0x4059f0
Capabilities:
Accept command line arguments
Extract resource via kernel32 functions
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x10064
call fcn.004219e0
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x10060], eax
push ebx
push esi
push edi
push 0x48
lea eax, [esp + 0x24]
mov ebx, edx
push 0
push eax
mov dword [esp + 0x24], ebx
call fcn.004075a0
add esp, 0xc
lea eax, [esp + 0x68]
xor ecx, ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], ecx
push 0x10000
push ecx
push eax
call fcn.004075a0
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
add esp, 0xc
push 0
push 0
push str.PYLAUNCHER_DEBUG
call edi
cmp eax, 2
jb 0x405a94
push 0
push 4
push 0
push 2
call fcn.0040eead
add esp, 4
push eax
call fcn.004151fa
push 2
call fcn.0040eead
add esp, 0x14
mov dword [0x42e588], eax
push 0x42a530
push dword [ebx]
push str.argv0:__s_nversion:__S_n
call fcn.00401130
add esp, 0xc
push 0
push 0
push str.PYLAUNCHER_LIMIT_TO_COMPANY
call edi
mov esi, eax
cmp esi, 1
jbe 0x405aed
lea ecx, [esi*2 + 4]
push ecx
call fcn.0041530e
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x405ac9
mov eax, dword [esp + 0x64]
mov dword [ecx], eax
mov dword [esp + 0x64], ecx
add ecx, 4
push esi
push ecx
push str.PYLAUNCHER_LIMIT_TO_COMPANY
mov dword [esp + 0x6c], ecx
call edi
test eax, eax
jne 0x405aed
push str.Failed_to_read_PYLAUNCHER_LIMIT_TO_COMPANY_variable
push eax
lea edi, [eax + 0x6d]
call fcn.00401200
jmp 0x406412
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], eax
call fcn.00401770
mov edi, eax
test edi, edi
jne 0x406415
lea ecx, [esp + 0x20]
call fcn.00402810
mov edi, eax
sub eax, 0
je 0x405b24
sub eax, 0x71
je 0x405b24
sub eax, 1
jne 0x405b4f
lea ecx, [esp + 0x20]
call fcn.00402e40
mov edi, eax
test edi, edi
jne 0x406415
lea ecx, [esp + 0x20]
call fcn.00401450
lea edx, [esp + 0x10]
lea ecx, [esp + 0x20]
call fcn.004045d0
mov edi, eax
test edi, edi
jne 0x406415
cmp byte [esp + 0x5c], 0
je 0x405c56
push edi
push 1
push 0x428008
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov esi, eax
test esi, esi
je 0x405c6a
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x405c6a
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x405c6a
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
push edi
push eax
push ebx
push edi
push 0xfde9
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
test edi, edi
jne 0x405bd3
push str.Unable_to_preprocess_usage_text
push eax
call fcn.00401200
mov edi, 0x6d
jmp 0x406412
inc edi
lea eax, [edi + edi]
push eax
call fcn.0041530e
add esp, 4
mov esi, eax
push edi
push esi
push dword [esp + 0x1c]
push ebx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x405c18
push str.Unable_to_preprocess_usage_text
push eax
call fcn.00401200
push esi
call fcn.00415234
add esp, 0xc
mov edi, 0x6d
jmp 0x406415
xor ecx, ecx
mov word [esi + eax*2], cx
mov eax, dword [esp + 0x18]
push dword [eax]
push 0x428088
push esi
push 1
call fcn.0040eead
add esp, 4
push eax
call fcn.00401020
push 1
call fcn.0040eead
add esp, 0x14
push eax
call fcn.0040f241
add esp, 4
push esi
call fcn.00415234
add esp, 4
mov edi, dword [esp + 0x10]
test edi, edi
jne 0x405c80
mov dword [esp + 0x1c], edi
lea ebx, [edi + 0x70]
jmp 0x405d6c
push str.Unable_to_load_usage_text
push 0
call fcn.00401200
mov edi, 0x6d
jmp 0x406412
mov dword [esp + 0x18], 0
mov esi, edi
nop word [eax + eax]
mov edx, dword [esi]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
call fcn.00404ed0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x405cb4
cmp ebx, 0x67
jne 0x405d68
jmp 0x405cc0
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x405d62
cmp byte [esi + 0x2c], 0
je 0x405cd1
cmp byte [esp + 0x55], 0
jne 0x405d60
cmp byte [esp + 0x54], 0
jne 0x405dc0
mov edi, dword [esp + 0x44]
test edi, edi
je 0x405d48
mov ebx, dword [esp + 0x48]
test ebx, ebx
je 0x405d48
mov eax, dword [esi + 0xc]
mov dword [esp + 0x14], eax
test eax, eax
je 0x405d3d
push 0
push 0
push 0
push ebx
push edi
push 0xffffffffffffffff
push eax
push 9
push 0x427ee0
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405d3d
sub eax, 1
je 0x405dbc
sub eax, 1
je 0x405db5
push edi
push ebx
push dword [esp + 0x1c]
push 0xffffffffffffffff
push str.Error_comparing__.s_and__.s__compare_
push 0
call fcn.00401200
add esp, 0x18
or eax, 0xffffffff
test eax, eax
jne 0x405f45
push 0xffffffffffffffff
mov edx, esi
lea ecx, [esp + 0x24]
call fcn.00404d20
add esp, 4
test al, al
je 0x405f45
mov eax, esi
xor ebx, ebx
mov dword [esp + 0x1c], eax
mov edi, dword [esp + 0x10]
cmp byte [esp + 0x5a], 0
jne 0x40639a
cmp byte [esp + 0x5b], 0
jne 0x40639a
mov esi, dword [0x42e588]
test esi, esi
je 0x405fab
test edi, edi
jne 0x405f58
push str.No_installed_Pythons_found__n
push 1
call fcn.0040eead
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405fab
mov eax, 1
jmp 0x405d40
xor eax, eax
jmp 0x405d40
mov edi, dword [esi + 0xc]
test edi, edi
je 0x405f45
push 0
push 0
push 0
push 0xffffffffffffffff
push str.PythonCore
push 0xffffffffffffffff
push edi
push 9
push 0x427ee0
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405f45
sub eax, 1
je 0x405e1d
sub eax, 1
je 0x405f45
push str.PythonCore
push 0xffffffffffffffff
push edi
push 0xffffffffffffffff
push str.Error_comparing__.s_and__.s__compare_
push 0
call fcn.00401200
add esp, 0x18
jmp 0x405f45
mov ebx, dword [esp + 0x50]
mov byte [esp + 0xe], 0
mov byte [esp + 0xf], 0
cmp ebx, 3
jle 0x405ee6
mov eax, dword [esp + 0x4c]
lea ecx, [ebx - 3]
mov dword [esp + 0x14], ecx
lea edi, [eax + ecx*2]
test edi, edi
je 0x405ee6
push 0
push 0
push 0
push 3
push 0x429f80
push 3
push edi
push 0
push 0x427ee0
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405e8f
sub eax, 1
je 0x405ed6
sub eax, 1
je 0x405e8f
push 0x429f80
push 3
push edi
push 3
push str.Error_comparing__.s_and__.s__compareArgument_
push 0
call fcn.00401200
add esp, 0x18
push 0
push 0
push 0
push 3
push 0x428e28
push 3
push edi
push 0
push 0x427ee0
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405ee6
sub eax, 1
je 0x405edd
sub eax, 1
je 0x405ee6
push 0x428e28
push 3
push edi
push 3
push str.Error_comparing__.s_and__.s__compareArgument_
push 0
call fcn.00401200
add esp, 0x18
jmp 0x405ee6
mov byte [esp + 0xe], 1
jmp 0x405ee2
mov byte [esp + 0xf], 1
mov ebx, dword [esp + 0x14]
push ebx
mov edx, esi
lea ecx, [esp + 0x24]
call fcn.00404d20
add esp, 4
test al, al
je 0x405f45
cmp byte [esp + 0xe], 0
je 0x405f18
mov ecx, esi
call fcn.00404e60
test al, al
je 0x405f18
push dword [esi + 0x10]
push dword [esi + 0xc]
push str._Excluding__s__s_because_it_looks_like_32bit_n
jmp 0x405f3d
cmp byte [esp + 0xf], 0
je 0x405d60
mov ecx, esi
call fcn.00404e60
test al, al
jne 0x405d60
push dword [esi + 0x10]
push dword [esi + 0xc]
push str._Excluding__s__s_because_it_doesnt_look_32bit_n
call fcn.00401130
add esp, 0xc
mov esi, dword [esi + 4]
test esi, esi
jne 0x405c90
lea ebx, [esi + 0x67]
jmp 0x405d68
push 0x40000
push esi
call fcn.0041500f
add esp, 4
push eax
call fcn.00414e20
push 0
push 1
mov edx, esi
mov dword [esp + 0x24], eax
mov ecx, edi
call fcn.00405160
push esi
mov edi, eax
call fcn.0040f241
mov eax, dword [esp + 0x28]
add esp, 0x14
test eax, eax
js 0x405fa3
push eax
push esi
call fcn.0041500f
add esp, 4
push eax
call fcn.00414e20
add esp, 8
test edi, edi
jne 0x406415
mov edi, ebx
cmp ebx, 0x67
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jne 0x405fc8
push 0
push 0
push str.PYLAUNCHER_ALLOW_INSTALL
call ebx
cmp eax, 2
jae 0x405fdc
push 0
push 0
push str.PYLAUNCHER_ALWAYS_INSTALL
call ebx
cmp eax, 2
jb 0x406102
lea ecx, [esp + 0x20]
call fcn.00404a10
mov edi, eax
test edi, edi
jne 0x406102
lea edx, [esp + 0x10]
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x20]
call fcn.004059a0
mov edi, eax
test edi, edi
jne 0x406415
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x40601a
lea edi, [eax + 0x70]
jmp 0x40631f
mov dword [esp + 0x14], 0
mov esi, ecx
mov edx, dword [esi]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x24]
call fcn.00404ed0
mov edi, eax
add esp, 4
test edi, edi
je 0x406048
cmp edi, 0x67
jne 0x4060fc
jmp 0x406054
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4060f6
cmp byte [esi + 0x2c], 0
je 0x406065
cmp byte [esp + 0x55], 0
jne 0x4060f4
cmp byte [esp + 0x54], 0
jne 0x406182
mov edi, dword [esp + 0x44]
test edi, edi
je 0x4060dc
mov ebx, dword [esp + 0x48]
test ebx, ebx
je 0x4060dc
mov eax, dword [esi + 0xc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x4060d1
push 0
push 0
push 0
push ebx
push edi
push 0xffffffffffffffff
push eax
push 9
push 0x427ee0
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x4060d1
sub eax, 1
je 0x40617b
sub eax, 1
je 0x406171
push edi
push ebx
push dword [esp + 0x20]
push 0xffffffffffffffff
push str.Error_comparing__.s_and__.s__compare_
push 0
call fcn.00401200
add esp, 0x18
or eax, 0xffffffff
test eax, eax
jne 0x406307
push 0xffffffffffffffff
mov edx, esi
lea ecx, [esp + 0x24]
call fcn.00404d20
add esp, 4
test al, al
je 0x406307
mov eax, esi
xor edi, edi
mov dword [esp + 0x1c], eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp edi, 0x67
jne 0x40631a
push 2
call fcn.0040eead
add esp, 4
push eax
push str.No_suitable_Python_runtime_found_n
call fcn.00414c64
push 2
call fcn.0040eead
add esp, 0xc
push eax
push str.Pass___list___0__to_see_all_detected_environments_on_your_machine_n
call fcn.00414c64
add esp, 8
push 0
push 0
push str.PYLAUNCHER_ALLOW_INSTALL
call ebx
cmp eax, 2
jae 0x406415
cmp byte [esp + 0x54], 0
je 0x406415
push 2
call fcn.0040eead
add esp, 4
push eax
push str.or_set_environment_variable_PYLAUNCHER_ALLOW_INSTALL_to_use_winget_nor_open_the_Microsoft_Store_to_the_requested_version._n
call fcn.00414c64
jmp 0x406412
mov eax, 1
jmp 0x4060d4
xor eax, eax
jmp 0x4060d4
mov edi, dword [esi + 0xc]
test edi, edi
je 0x406307
push 0
push 0
push 0
push 0xffffffffffffffff
push str.PythonCore
push 0xffffffffffffffff
push edi
push 9
push 0x427ee0
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x406307
sub eax, 1
je 0x4061df
sub eax, 1
je 0x406307
push str.PythonCore
push 0xffffffffffffffff
push edi
push 0xffffffffffffffff
push str.Error_comparing__.s_and__.s__compare_
push 0
call fcn.00401200
add esp, 0x18
jmp 0x406307
mov ebx, dword [esp + 0x50]
mov byte [esp + 0xf], 0
mov byte [esp + 0xe], 0
cmp ebx, 3
jle 0x4062a8
mov eax, dword [esp + 0x4c]
lea ecx, [ebx - 3]
mov dword [esp + 0x18], ecx
lea edi, [eax + ecx*2]
test edi, edi
je 0x4062a8
push 0
push 0
push 0
push 3
push 0x429f80
push 3
push edi
push 0
push 0x427ee0
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x406251
sub eax, 1
je 0x406298
sub eax, 1
je 0x406251
push 0x429f80
push 3
push edi
push 3
push str.Error_comparing__.s_and__.s__compareArgument_
push 0
call fcn.00401200
add esp, 0x18
push 0
push 0
push 0
push 3
push 0x428e28
push 3
push edi
push 0
push 0x427ee0
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x4062a8
sub eax, 1
je 0x40629f
sub eax, 1
je 0x4062a8
push 0x428e28
push 3
push edi
push 3
push str.Error_comparing__.s_and__.s__compareArgument_
push 0
call fcn.00401200
add esp, 0x18
jmp 0x4062a8
mov byte [esp + 0xf], 1
jmp 0x4062a4
mov byte [esp + 0xe], 1
mov ebx, dword [esp + 0x18]
push ebx
mov edx, esi
lea ecx, [esp + 0x24]
call fcn.00404d20
add esp, 4
test al, al
je 0x406307
cmp byte [esp + 0xf], 0
je 0x4062da
mov ecx, esi
call fcn.00404e60
test al, al
je 0x4062da
push dword [esi + 0x10]
push dword [esi + 0xc]
push str._Excluding__s__s_because_it_looks_like_32bit_n
jmp 0x4062ff
cmp byte [esp + 0xe], 0
je 0x4060f4
mov ecx, esi
call fcn.00404e60
test al, al
jne 0x4060f4
push dword [esi + 0x10]
push dword [esi + 0xc]
push str._Excluding__s__s_because_it_doesnt_look_32bit_n
call fcn.00401130
add esp, 0xc
mov esi, dword [esi + 4]
test esi, esi
jne 0x406024
lea edi, [esi + 0x67]
jmp 0x4060fc
cmp edi, 0x70
jne 0x406339
push 2
call fcn.0040eead
add esp, 4
push eax
push str.No_installed_Python_found__n
call fcn.00414c64
jmp 0x406412
test edi, edi
jne 0x406415
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x40635e
push dword [ebx + 0x10]
push dword [ebx + 0xc]
push str.env.company:__s_nenv.tag:__s_n
call fcn.00401130
add esp, 0xc
jmp 0x40636b
push str.env.company:__null__nenv.tag:__null__n
call fcn.00401130
add esp, 4
push ecx
lea eax, [esp + 0x6c]
mov edx, ebx
push eax
lea ecx, [esp + 0x28]
call fcn.00405320
mov edi, eax
add esp, 8
test edi, edi
jne 0x406415
lea eax, [esp + 0x68]
push eax
call fcn.00405670
add esp, 4
mov edi, eax
jmp 0x406415
push 1
call fcn.0040eead
mov ebx, dword [esp + 0x14]
add esp, 4
mov esi, eax
test ebx, ebx
jne 0x4063ca
push str.No_installed_Pythons_found__n
push 1
call fcn.0040eead
add esp, 4
push eax
call fcn.00401050
add esp, 8
xor edi, edi
jmp 0x406419
push 0x40000
push esi
call fcn.0041500f
add esp, 4
push eax
call fcn.00414e20
push dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
mov edx, esi
push dword [esp + 0x67]
mov ebx, eax
call fcn.00405160
push esi
mov edi, eax
call fcn.0040f241
add esp, 0x14
test ebx, ebx
js 0x406415
push ebx
push esi
call fcn.0041500f
add esp, 4
push eax
call fcn.00414e20
add esp, 8
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x64]
test eax, eax
je 0x406432
mov esi, dword [eax]
push eax
call fcn.00415234
add esp, 4
mov eax, esi
test esi, esi
jne 0x406421
test ebx, ebx
je 0x40649d
push dword [ebx + 0xc]
call fcn.00415234
add esp, 4
push dword [ebx + 0x10]
call fcn.00415234
add esp, 4
push dword [ebx + 0x18]
call fcn.00415234
add esp, 4
push dword [ebx + 0x1c]
call fcn.00415234
add esp, 4
push dword [ebx + 0x20]
call fcn.00415234
add esp, 4
push dword [ebx + 0x28]
call fcn.00415234
mov ecx, dword [ebx]
add esp, 4
call fcn.00403120
mov ecx, dword [ebx + 4]
mov dword [ebx], 0
call fcn.00403120
push ebx
mov dword [ebx + 4], 0
call fcn.00415234
add esp, 4
mov ecx, dword [esp + 0x1006c]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004064d4
mov esp, ebp
pop ebp
ret