Function at 0x4059c0
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.00421fc0
mov eax, dword [0x42e004]
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.00407540
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.00407540
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 0x405a64
push 0
push 4
push 0
push 2
call fcn.0040ee4d
add esp, 4
push eax
call fcn.00415171
push 2
call fcn.0040ee4d
add esp, 0x14
mov dword [0x42f580], eax
push 0x42b4e0
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 0x405abd
lea ecx, [esi*2 + 4]
push ecx
call fcn.0041528e
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x405a99
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 0x405abd
push str.Failed_to_read_PYLAUNCHER_LIMIT_TO_COMPANY_variable
push eax
lea edi, [eax + 0x6d]
call fcn.00401200
jmp 0x4063e2
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 0x4063e5
lea ecx, [esp + 0x20]
call fcn.00402810
mov edi, eax
sub eax, 0
je 0x405af4
sub eax, 0x71
je 0x405af4
sub eax, 1
jne 0x405b1f
lea ecx, [esp + 0x20]
call fcn.00402e40
mov edi, eax
test edi, edi
jne 0x4063e5
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 0x4063e5
cmp byte [esp + 0x5c], 0
je 0x405c26
push edi
push 1
push 0x428fc0
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov esi, eax
test esi, esi
je 0x405c3a
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x405c3a
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x405c3a
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 0x405ba3
push str.Unable_to_preprocess_usage_text
push eax
call fcn.00401200
mov edi, 0x6d
jmp 0x4063e2
inc edi
lea eax, [edi + edi]
push eax
call fcn.0041528e
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 0x405be8
push str.Unable_to_preprocess_usage_text
push eax
call fcn.00401200
push esi
call fcn.004151ab
add esp, 0xc
mov edi, 0x6d
jmp 0x4063e5
xor ecx, ecx
mov word [esi + eax*2], cx
mov eax, dword [esp + 0x18]
push dword [eax]
push 0x429040
push esi
push 1
call fcn.0040ee4d
add esp, 4
push eax
call fcn.00401020
push 1
call fcn.0040ee4d
add esp, 0x14
push eax
call fcn.0040f1e1
add esp, 4
push esi
call fcn.004151ab
add esp, 4
mov edi, dword [esp + 0x10]
test edi, edi
jne 0x405c50
mov dword [esp + 0x1c], edi
lea ebx, [edi + 0x70]
jmp 0x405d3c
push str.Unable_to_load_usage_text
push 0
call fcn.00401200
mov edi, 0x6d
jmp 0x4063e2
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 0x405c84
cmp ebx, 0x67
jne 0x405d38
jmp 0x405c90
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x405d32
cmp byte [esi + 0x2c], 0
je 0x405ca1
cmp byte [esp + 0x55], 0
jne 0x405d30
cmp byte [esp + 0x54], 0
jne 0x405d90
mov edi, dword [esp + 0x44]
test edi, edi
je 0x405d18
mov ebx, dword [esp + 0x48]
test ebx, ebx
je 0x405d18
mov eax, dword [esi + 0xc]
mov dword [esp + 0x14], eax
test eax, eax
je 0x405d0d
push 0
push 0
push 0
push ebx
push edi
push 0xffffffffffffffff
push eax
push 9
push 0x428e98
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405d0d
sub eax, 1
je 0x405d8c
sub eax, 1
je 0x405d85
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 0x405f15
push 0xffffffffffffffff
mov edx, esi
lea ecx, [esp + 0x24]
call fcn.00404d20
add esp, 4
test al, al
je 0x405f15
mov eax, esi
xor ebx, ebx
mov dword [esp + 0x1c], eax
mov edi, dword [esp + 0x10]
cmp byte [esp + 0x5a], 0
jne 0x40636a
cmp byte [esp + 0x5b], 0
jne 0x40636a
mov esi, dword [0x42f580]
test esi, esi
je 0x405f7b
test edi, edi
jne 0x405f28
push str.No_installed_Pythons_found__n
push 1
call fcn.0040ee4d
add esp, 4
push eax
call fcn.00401050
add esp, 8
jmp 0x405f7b
mov eax, 1
jmp 0x405d10
xor eax, eax
jmp 0x405d10
mov edi, dword [esi + 0xc]
test edi, edi
je 0x405f15
push 0
push 0
push 0
push 0xffffffffffffffff
push str.PythonCore
push 0xffffffffffffffff
push edi
push 9
push 0x428e98
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405f15
sub eax, 1
je 0x405ded
sub eax, 1
je 0x405f15
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 0x405f15
mov ebx, dword [esp + 0x50]
mov byte [esp + 0xe], 0
mov byte [esp + 0xf], 0
cmp ebx, 3
jle 0x405eb6
mov eax, dword [esp + 0x4c]
lea ecx, [ebx - 3]
mov dword [esp + 0x14], ecx
lea edi, [eax + ecx*2]
test edi, edi
je 0x405eb6
push 0
push 0
push 0
push 3
push 0x42af38
push 3
push edi
push 0
push 0x428e98
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405e5f
sub eax, 1
je 0x405ea6
sub eax, 1
je 0x405e5f
push 0x42af38
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 0x429de0
push 3
push edi
push 0
push 0x428e98
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405eb6
sub eax, 1
je 0x405ead
sub eax, 1
je 0x405eb6
push 0x429de0
push 3
push edi
push 3
push str.Error_comparing__.s_and__.s__compareArgument_
push 0
call fcn.00401200
add esp, 0x18
jmp 0x405eb6
mov byte [esp + 0xe], 1
jmp 0x405eb2
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 0x405f15
cmp byte [esp + 0xe], 0
je 0x405ee8
mov ecx, esi
call fcn.00404e60
test al, al
je 0x405ee8
push dword [esi + 0x10]
push dword [esi + 0xc]
push str._Excluding__s__s_because_it_looks_like_32bit_n
jmp 0x405f0d
cmp byte [esp + 0xf], 0
je 0x405d30
mov ecx, esi
call fcn.00404e60
test al, al
jne 0x405d30
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 0x405c60
lea ebx, [esi + 0x67]
jmp 0x405d38
push 0x40000
push esi
call fcn.00414f86
add esp, 4
push eax
call fcn.00414d97
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.0040f1e1
mov eax, dword [esp + 0x28]
add esp, 0x14
test eax, eax
js 0x405f73
push eax
push esi
call fcn.00414f86
add esp, 4
push eax
call fcn.00414d97
add esp, 8
test edi, edi
jne 0x4063e5
mov edi, ebx
cmp ebx, 0x67
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jne 0x405f98
push 0
push 0
push str.PYLAUNCHER_ALLOW_INSTALL
call ebx
cmp eax, 2
jae 0x405fac
push 0
push 0
push str.PYLAUNCHER_ALWAYS_INSTALL
call ebx
cmp eax, 2
jb 0x4060d2
lea ecx, [esp + 0x20]
call fcn.00404a10
mov edi, eax
test edi, edi
jne 0x4060d2
lea edx, [esp + 0x10]
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x20]
call fcn.00405970
mov edi, eax
test edi, edi
jne 0x4063e5
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x405fea
lea edi, [eax + 0x70]
jmp 0x4062ef
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 0x406018
cmp edi, 0x67
jne 0x4060cc
jmp 0x406024
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4060c6
cmp byte [esi + 0x2c], 0
je 0x406035
cmp byte [esp + 0x55], 0
jne 0x4060c4
cmp byte [esp + 0x54], 0
jne 0x406152
mov edi, dword [esp + 0x44]
test edi, edi
je 0x4060ac
mov ebx, dword [esp + 0x48]
test ebx, ebx
je 0x4060ac
mov eax, dword [esi + 0xc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x4060a1
push 0
push 0
push 0
push ebx
push edi
push 0xffffffffffffffff
push eax
push 9
push 0x428e98
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x4060a1
sub eax, 1
je 0x40614b
sub eax, 1
je 0x406141
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 0x4062d7
push 0xffffffffffffffff
mov edx, esi
lea ecx, [esp + 0x24]
call fcn.00404d20
add esp, 4
test al, al
je 0x4062d7
mov eax, esi
xor edi, edi
mov dword [esp + 0x1c], eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp edi, 0x67
jne 0x4062ea
push 2
call fcn.0040ee4d
add esp, 4
push eax
push str.No_suitable_Python_runtime_found_n
call fcn.00414c03
push 2
call fcn.0040ee4d
add esp, 0xc
push eax
push str.Pass___list___0__to_see_all_detected_environments_on_your_machine_n
call fcn.00414c03
add esp, 8
push 0
push 0
push str.PYLAUNCHER_ALLOW_INSTALL
call ebx
cmp eax, 2
jae 0x4063e5
cmp byte [esp + 0x54], 0
je 0x4063e5
push 2
call fcn.0040ee4d
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.00414c03
jmp 0x4063e2
mov eax, 1
jmp 0x4060a4
xor eax, eax
jmp 0x4060a4
mov edi, dword [esi + 0xc]
test edi, edi
je 0x4062d7
push 0
push 0
push 0
push 0xffffffffffffffff
push str.PythonCore
push 0xffffffffffffffff
push edi
push 9
push 0x428e98
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x4062d7
sub eax, 1
je 0x4061af
sub eax, 1
je 0x4062d7
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 0x4062d7
mov ebx, dword [esp + 0x50]
mov byte [esp + 0xf], 0
mov byte [esp + 0xe], 0
cmp ebx, 3
jle 0x406278
mov eax, dword [esp + 0x4c]
lea ecx, [ebx - 3]
mov dword [esp + 0x18], ecx
lea edi, [eax + ecx*2]
test edi, edi
je 0x406278
push 0
push 0
push 0
push 3
push 0x42af38
push 3
push edi
push 0
push 0x428e98
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x406221
sub eax, 1
je 0x406268
sub eax, 1
je 0x406221
push 0x42af38
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 0x429de0
push 3
push edi
push 0
push 0x428e98
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x406278
sub eax, 1
je 0x40626f
sub eax, 1
je 0x406278
push 0x429de0
push 3
push edi
push 3
push str.Error_comparing__.s_and__.s__compareArgument_
push 0
call fcn.00401200
add esp, 0x18
jmp 0x406278
mov byte [esp + 0xf], 1
jmp 0x406274
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 0x4062d7
cmp byte [esp + 0xf], 0
je 0x4062aa
mov ecx, esi
call fcn.00404e60
test al, al
je 0x4062aa
push dword [esi + 0x10]
push dword [esi + 0xc]
push str._Excluding__s__s_because_it_looks_like_32bit_n
jmp 0x4062cf
cmp byte [esp + 0xe], 0
je 0x4060c4
mov ecx, esi
call fcn.00404e60
test al, al
jne 0x4060c4
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 0x405ff4
lea edi, [esi + 0x67]
jmp 0x4060cc
cmp edi, 0x70
jne 0x406309
push 2
call fcn.0040ee4d
add esp, 4
push eax
push str.No_installed_Python_found__n
call fcn.00414c03
jmp 0x4063e2
test edi, edi
jne 0x4063e5
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x40632e
push dword [ebx + 0x10]
push dword [ebx + 0xc]
push str.env.company:__s_nenv.tag:__s_n
call fcn.00401130
add esp, 0xc
jmp 0x40633b
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 0x4063e5
lea eax, [esp + 0x68]
push eax
call fcn.00405670
add esp, 4
mov edi, eax
jmp 0x4063e5
push 1
call fcn.0040ee4d
mov ebx, dword [esp + 0x14]
add esp, 4
mov esi, eax
test ebx, ebx
jne 0x40639a
push str.No_installed_Pythons_found__n
push 1
call fcn.0040ee4d
add esp, 4
push eax
call fcn.00401050
add esp, 8
xor edi, edi
jmp 0x4063e9
push 0x40000
push esi
call fcn.00414f86
add esp, 4
push eax
call fcn.00414d97
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.0040f1e1
add esp, 0x14
test ebx, ebx
js 0x4063e5
push ebx
push esi
call fcn.00414f86
add esp, 4
push eax
call fcn.00414d97
add esp, 8
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x64]
test eax, eax
je 0x406402
mov esi, dword [eax]
push eax
call fcn.004151ab
add esp, 4
mov eax, esi
test esi, esi
jne 0x4063f1
test ebx, ebx
je 0x40646d
push dword [ebx + 0xc]
call fcn.004151ab
add esp, 4
push dword [ebx + 0x10]
call fcn.004151ab
add esp, 4
push dword [ebx + 0x18]
call fcn.004151ab
add esp, 4
push dword [ebx + 0x1c]
call fcn.004151ab
add esp, 4
push dword [ebx + 0x20]
call fcn.004151ab
add esp, 4
push dword [ebx + 0x28]
call fcn.004151ab
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.004151ab
add esp, 4
mov ecx, dword [esp + 0x1006c]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040649c
mov esp, ebp
pop ebp
ret