Function at 0x405380
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.0041b9b0
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x10060], eax
push ebx
push esi
xorps xmm0, xmm0
mov dword [esp + 0xc], 0
push edi
push 0x10000
lea eax, [esp + 0x6c]
movlpd qword [esp + 0x28], xmm0
mov ebx, edx
movlpd qword [esp + 0x30], xmm0
push 0
push eax
mov dword [esp + 0x20], ebx
movlpd qword [esp + 0x40], xmm0
movlpd qword [esp + 0x48], xmm0
movlpd qword [esp + 0x50], xmm0
movlpd qword [esp + 0x58], xmm0
movlpd qword [esp + 0x60], xmm0
movlpd qword [esp + 0x68], xmm0
mov dword [esp + 0x28], 0
call fcn.004070e0
add esp, 0xc
push 0
push 0
push str.PYLAUNCHER_DEBUG
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, 2
jb 0x405448
push 0
push 4
push 0
push 2
call fcn.0040e9cd
add esp, 4
push eax
call fcn.0040f418
push 2
call fcn.0040e9cd
push 0x423e40
push dword [ebx]
mov dword [0x427550], eax
push str.argv0:__s_nversion:__S_n
call fcn.004010f0
add esp, 0x20
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea edx, [esp + 0x10]
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x20]
call fcn.00405260
mov edi, eax
test edi, edi
jne 0x405f5c
cmp byte [esp + 0x5c], al
je 0x405561
push eax
push 1
push 0x421bb8
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov esi, eax
test esi, esi
je 0x405575
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x405575
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x405575
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 + 0x30], eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
test edi, edi
jne 0x4054e4
push str.Unable_to_preprocess_usage_text
push eax
call fcn.004011c0
mov edi, 0x6d
jmp 0x405f59
inc edi
lea eax, [edi + edi]
push eax
call fcn.0040f52e
add esp, 4
mov esi, eax
push edi
push esi
push dword [esp + 0x20]
push ebx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x405529
push str.Unable_to_preprocess_usage_text
push eax
call fcn.004011c0
push esi
call fcn.0040f452
add esp, 0xc
mov edi, 0x6d
jmp 0x405f5c
xor ecx, ecx
mov word [esi + eax*2], cx
mov eax, dword [esp + 0x14]
push dword [eax]
push 0x421c38
push esi
push 1
call fcn.0040e9cd
add esp, 4
push eax
call fcn.00401010
push 1
call fcn.0040e9cd
push eax
call fcn.0040ed61
push esi
call fcn.0040f452
add esp, 0x1c
mov edi, dword [esp + 0x10]
test edi, edi
jne 0x40558b
mov dword [esp + 0x1c], edi
lea ebx, [edi + 0x70]
jmp 0x40571a
push str.Unable_to_load_usage_text
push 0
call fcn.004011c0
mov edi, 0x6d
jmp 0x405f59
cmp dword [edi + 4], 0
jne 0x4055a1
cmp dword [edi], 0
jne 0x4055a1
mov dword [esp + 0x1c], edi
xor ebx, ebx
jmp 0x40571a
mov dword [esp + 0x18], 0
mov esi, edi
nop dword [eax + eax]
mov edx, dword [esi]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
call fcn.00404640
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4055d4
cmp ebx, 0x67
jne 0x405716
jmp 0x4055e0
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x405710
cmp byte [esi + 0x2c], 0
je 0x4055f1
cmp byte [esp + 0x55], 0
jne 0x40570e
cmp byte [esp + 0x54], 0
jne 0x405778
mov edi, dword [esp + 0x44]
test edi, edi
je 0x405668
mov ebx, dword [esp + 0x48]
test ebx, ebx
je 0x405668
mov eax, dword [esi + 0xc]
mov dword [esp + 0x14], eax
test eax, eax
je 0x40565d
push 0
push 0
push 0
push ebx
push edi
push 0xffffffffffffffff
push eax
push 9
push 0x421a90
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x40565d
sub eax, 1
je 0x40576d
sub eax, 1
je 0x405763
push edi
push ebx
push dword [esp + 0x1c]
push 0xffffffffffffffff
push str.Error_comparing__.s_and__.s__compare_
push 0
call fcn.004011c0
add esp, 0x18
or eax, 0xffffffff
test eax, eax
jne 0x405974
mov ebx, dword [esp + 0x4c]
test ebx, ebx
je 0x40570e
mov edi, dword [esp + 0x50]
test edi, edi
je 0x40570e
mov eax, dword [esi + 0x10]
mov dword [esp + 0x14], eax
test eax, eax
je 0x405974
test edi, edi
jns 0x4056a7
push 0x8000
push ebx
call fcn.004095b4
mov edi, eax
add esp, 8
mov eax, dword [esp + 0x14]
push 0x8000
push eax
call fcn.004095b4
add esp, 8
cmp eax, edi
jl 0x405704
test edi, edi
je 0x405774
push 0
push 0
push 0
push edi
push ebx
push edi
push dword [esp + 0x2c]
push 9
push 0x421a90
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405704
sub eax, 1
je 0x405774
sub eax, 1
je 0x405704
push ebx
push edi
push dword [esp + 0x1c]
push edi
push str.Error_comparing__.s_and__.s__compare_
push 0
call fcn.004011c0
add esp, 0x18
xor al, al
test al, al
je 0x405974
mov eax, esi
xor ebx, ebx
mov dword [esp + 0x1c], eax
mov edi, dword [esp + 0x10]
cmp byte [esp + 0x5a], 0
jne 0x405ee1
cmp byte [esp + 0x5b], 0
jne 0x405ee1
mov esi, dword [0x427550]
test esi, esi
je 0x4059da
test edi, edi
jne 0x405987
push str.No_installed_Pythons_found__n
push 1
call fcn.0040e9cd
add esp, 4
push eax
call fcn.00401040
add esp, 8
jmp 0x4059da
mov eax, 1
jmp 0x405660
xor eax, eax
jmp 0x405660
mov al, 1
jmp 0x405706
mov edi, dword [esi + 0xc]
test edi, edi
je 0x405974
push 0
push 0
push 0
push 0xffffffffffffffff
push str.PythonCore
push 0xffffffffffffffff
push edi
push 9
push 0x421a90
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405974
sub eax, 1
je 0x4057d5
sub eax, 1
je 0x405974
push str.PythonCore
push 0xffffffffffffffff
push edi
push 0xffffffffffffffff
push str.Error_comparing__.s_and__.s__compare_
push 0
call fcn.004011c0
add esp, 0x18
jmp 0x405974
mov edi, dword [esp + 0x50]
mov ecx, dword [esp + 0x4c]
mov byte [esp + 0xe], 0
mov byte [esp + 0xf], 0
cmp edi, 3
jle 0x4058a2
lea eax, [edi - 3]
lea ebx, [ecx + eax*2]
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x4058a2
push 0
push 0
push 0
push 3
push 0x423888
push 3
push ebx
push 0
push 0x421a90
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405847
sub eax, 1
je 0x40588e
sub eax, 1
je 0x405847
push 0x423888
push 3
push ebx
push 3
push str.Error_comparing__.s_and__.s__compareArgument_
push 0
call fcn.004011c0
add esp, 0x18
push 0
push 0
push 0
push 3
push 0x423890
push 3
push ebx
push 0
push 0x421a90
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x40589e
sub eax, 1
je 0x405895
sub eax, 1
je 0x40589e
push 0x423890
push 3
push ebx
push 3
push str.Error_comparing__.s_and__.s__compareArgument_
push 0
call fcn.004011c0
add esp, 0x18
jmp 0x40589e
mov byte [esp + 0xe], 1
jmp 0x40589a
mov byte [esp + 0xf], 1
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x4c]
mov ebx, dword [esi + 0x10]
test ebx, ebx
je 0x405974
test ecx, ecx
je 0x405974
test edi, edi
jns 0x4058c9
push 0x8000
push ecx
call fcn.004095b4
add esp, 8
mov edi, eax
push 0x8000
push ebx
call fcn.004095b4
add esp, 8
cmp eax, edi
jl 0x40591e
test edi, edi
je 0x405943
push 0
push 0
push 0
push edi
push dword [esp + 0x5c]
push edi
push ebx
push 9
push 0x421a90
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x40591e
sub eax, 1
je 0x405943
sub eax, 1
je 0x40591e
push dword [esp + 0x4c]
push edi
push ebx
push edi
push str.Error_comparing__.s_and__.s__compare_
push 0
call fcn.004011c0
add esp, 0x18
xor al, al
test al, al
je 0x405974
cmp byte [esp + 0xe], 0
je 0x405947
mov ecx, esi
call fcn.004045d0
test al, al
je 0x405947
push dword [esi + 0x10]
push dword [esi + 0xc]
push str._Excluding__s__s_because_it_looks_like_32bit_n
jmp 0x40596c
mov al, 1
jmp 0x405920
cmp byte [esp + 0xf], 0
je 0x40570e
mov ecx, esi
call fcn.004045d0
test al, al
jne 0x40570e
push dword [esi + 0x10]
push dword [esi + 0xc]
push str._Excluding__s__s_because_it_doesnt_look_32bit_n
call fcn.004010f0
add esp, 0xc
mov esi, dword [esi + 4]
test esi, esi
jne 0x4055b0
lea ebx, [esi + 0x67]
jmp 0x405716
push 0x40000
push esi
call fcn.0040f22d
add esp, 4
push eax
call fcn.0040f03e
push 0
push 1
mov edx, esi
mov dword [esp + 0x28], eax
mov ecx, edi
call fcn.00404a20
push esi
mov edi, eax
call fcn.0040ed61
mov eax, dword [esp + 0x2c]
add esp, 0x14
test eax, eax
js 0x4059d2
push eax
push esi
call fcn.0040f22d
add esp, 4
push eax
call fcn.0040f03e
add esp, 8
test edi, edi
jne 0x405f5c
mov edi, ebx
cmp ebx, 0x67
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jne 0x4059f7
push 0
push 0
push str.PYLAUNCHER_ALLOW_INSTALL
call ebx
cmp eax, 2
jae 0x405a0b
push 0
push 0
push str.PYLAUNCHER_ALWAYS_INSTALL
call ebx
cmp eax, 2
jb 0x405bd1
lea ecx, [esp + 0x20]
call fcn.004042c0
mov edi, eax
test edi, edi
jne 0x405bd1
lea edx, [esp + 0x10]
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x20]
call fcn.00405260
mov edi, eax
test edi, edi
jne 0x405f5c
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x405a49
lea edi, [eax + 0x70]
jmp 0x405e66
cmp dword [ecx + 4], 0
jne 0x405a5b
cmp dword [ecx], 0
jne 0x405a5b
mov ebx, ecx
jmp 0x405e8c
mov dword [esp + 0x18], 0
mov esi, ecx
mov edx, dword [esi]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
call fcn.00404640
mov edi, eax
add esp, 4
test edi, edi
je 0x405a89
cmp edi, 0x67
jne 0x405bcb
jmp 0x405a95
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x405bc5
cmp byte [esi + 0x2c], 0
je 0x405aa6
cmp byte [esp + 0x55], 0
jne 0x405bc3
cmp byte [esp + 0x54], 0
jne 0x405c52
mov edi, dword [esp + 0x44]
test edi, edi
je 0x405b1d
mov ebx, dword [esp + 0x48]
test ebx, ebx
je 0x405b1d
mov eax, dword [esi + 0xc]
mov dword [esp + 0x14], eax
test eax, eax
je 0x405b12
push 0
push 0
push 0
push ebx
push edi
push 0xffffffffffffffff
push eax
push 9
push 0x421a90
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405b12
sub eax, 1
je 0x405c44
sub eax, 1
je 0x405c3a
push edi
push ebx
push dword [esp + 0x1c]
push 0xffffffffffffffff
push str.Error_comparing__.s_and__.s__compare_
push 0
call fcn.004011c0
add esp, 0x18
or eax, 0xffffffff
test eax, eax
jne 0x405e4e
mov ebx, dword [esp + 0x4c]
test ebx, ebx
je 0x405bc3
mov edi, dword [esp + 0x50]
test edi, edi
je 0x405bc3
mov eax, dword [esi + 0x10]
mov dword [esp + 0x14], eax
test eax, eax
je 0x405e4e
test edi, edi
jns 0x405b5c
push 0x8000
push ebx
call fcn.004095b4
mov edi, eax
add esp, 8
mov eax, dword [esp + 0x14]
push 0x8000
push eax
call fcn.004095b4
add esp, 8
cmp eax, edi
jl 0x405bb9
test edi, edi
je 0x405c4b
push 0
push 0
push 0
push edi
push ebx
push edi
push dword [esp + 0x2c]
push 9
push 0x421a90
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405bb9
sub eax, 1
je 0x405c4b
sub eax, 1
je 0x405bb9
push ebx
push edi
push dword [esp + 0x1c]
push edi
push str.Error_comparing__.s_and__.s__compare_
push 0
call fcn.004011c0
add esp, 0x18
xor al, al
test al, al
je 0x405e4e
mov eax, esi
xor edi, edi
mov dword [esp + 0x1c], eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp edi, 0x67
jne 0x405e61
push 2
call fcn.0040e9cd
push eax
push str.No_suitable_Python_runtime_found_n
call fcn.0040ee82
push 2
call fcn.0040e9cd
push eax
push str.Pass___list___0__to_see_all_detected_environments_on_your_machine_n
call fcn.0040ee82
add esp, 0x18
push 0
push 0
push str.PYLAUNCHER_ALLOW_INSTALL
call ebx
cmp eax, 2
jae 0x405f5c
cmp byte [esp + 0x54], 0
je 0x405f5c
push 2
call fcn.0040e9cd
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.0040ee82
add esp, 0xc
jmp 0x405f5c
mov eax, 1
jmp 0x405b15
xor eax, eax
jmp 0x405b15
mov al, 1
jmp 0x405bbb
mov edi, dword [esi + 0xc]
test edi, edi
je 0x405e4e
push 0
push 0
push 0
push 0xffffffffffffffff
push str.PythonCore
push 0xffffffffffffffff
push edi
push 9
push 0x421a90
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405e4e
sub eax, 1
je 0x405caf
sub eax, 1
je 0x405e4e
push str.PythonCore
push 0xffffffffffffffff
push edi
push 0xffffffffffffffff
push str.Error_comparing__.s_and__.s__compare_
push 0
call fcn.004011c0
add esp, 0x18
jmp 0x405e4e
mov edi, dword [esp + 0x50]
mov ecx, dword [esp + 0x4c]
mov byte [esp + 0xf], 0
mov byte [esp + 0xe], 0
cmp edi, 3
jle 0x405d7c
lea eax, [edi - 3]
lea ebx, [ecx + eax*2]
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x405d7c
push 0
push 0
push 0
push 3
push 0x423888
push 3
push ebx
push 0
push 0x421a90
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405d21
sub eax, 1
je 0x405d68
sub eax, 1
je 0x405d21
push 0x423888
push 3
push ebx
push 3
push str.Error_comparing__.s_and__.s__compareArgument_
push 0
call fcn.004011c0
add esp, 0x18
push 0
push 0
push 0
push 3
push 0x423890
push 3
push ebx
push 0
push 0x421a90
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405d78
sub eax, 1
je 0x405d6f
sub eax, 1
je 0x405d78
push 0x423890
push 3
push ebx
push 3
push str.Error_comparing__.s_and__.s__compareArgument_
push 0
call fcn.004011c0
add esp, 0x18
jmp 0x405d78
mov byte [esp + 0xf], 1
jmp 0x405d74
mov byte [esp + 0xe], 1
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x4c]
mov ebx, dword [esi + 0x10]
test ebx, ebx
je 0x405e4e
test ecx, ecx
je 0x405e4e
test edi, edi
jns 0x405da3
push 0x8000
push ecx
call fcn.004095b4
add esp, 8
mov edi, eax
push 0x8000
push ebx
call fcn.004095b4
add esp, 8
cmp eax, edi
jl 0x405df8
test edi, edi
je 0x405e1d
push 0
push 0
push 0
push edi
push dword [esp + 0x5c]
push edi
push ebx
push 9
push 0x421a90
call dword [sym.imp.KERNEL32.dll_CompareStringEx]
sub eax, 1
je 0x405df8
sub eax, 1
je 0x405e1d
sub eax, 1
je 0x405df8
push dword [esp + 0x4c]
push edi
push ebx
push edi
push str.Error_comparing__.s_and__.s__compare_
push 0
call fcn.004011c0
add esp, 0x18
xor al, al
test al, al
je 0x405e4e
cmp byte [esp + 0xf], 0
je 0x405e21
mov ecx, esi
call fcn.004045d0
test al, al
je 0x405e21
push dword [esi + 0x10]
push dword [esi + 0xc]
push str._Excluding__s__s_because_it_looks_like_32bit_n
jmp 0x405e46
mov al, 1
jmp 0x405dfa
cmp byte [esp + 0xe], 0
je 0x405bc3
mov ecx, esi
call fcn.004045d0
test al, al
jne 0x405bc3
push dword [esi + 0x10]
push dword [esi + 0xc]
push str._Excluding__s__s_because_it_doesnt_look_32bit_n
call fcn.004010f0
add esp, 0xc
mov esi, dword [esi + 4]
test esi, esi
jne 0x405a65
lea edi, [esi + 0x67]
jmp 0x405bcb
cmp edi, 0x70
jne 0x405e80
push 2
call fcn.0040e9cd
push eax
push str.No_installed_Python_found__n
call fcn.0040ee82
add esp, 0xc
jmp 0x405f5c
test edi, edi
jne 0x405f5c
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x405ea5
push dword [ebx + 0x10]
push dword [ebx + 0xc]
push str.env.company:__s_nenv.tag:__s_n
call fcn.004010f0
add esp, 0xc
jmp 0x405eb2
push str.env.company:__null__nenv.tag:__null__n
call fcn.004010f0
add esp, 4
push ecx
lea eax, [esp + 0x6c]
mov edx, ebx
push eax
lea ecx, [esp + 0x28]
call fcn.00404bd0
mov edi, eax
add esp, 8
test edi, edi
jne 0x405f5c
lea eax, [esp + 0x68]
push eax
call fcn.00404f20
add esp, 4
mov edi, eax
jmp 0x405f5c
push 1
call fcn.0040e9cd
mov ebx, dword [esp + 0x14]
add esp, 4
mov esi, eax
test ebx, ebx
jne 0x405f11
push str.No_installed_Pythons_found__n
push 1
call fcn.0040e9cd
add esp, 4
push eax
call fcn.00401040
add esp, 8
xor edi, edi
jmp 0x405f60
push 0x40000
push esi
call fcn.0040f22d
add esp, 4
push eax
call fcn.0040f03e
push dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
mov edx, esi
push dword [esp + 0x67]
mov ebx, eax
call fcn.00404a20
push esi
mov edi, eax
call fcn.0040ed61
add esp, 0x14
test ebx, ebx
js 0x405f5c
push ebx
push esi
call fcn.0040f22d
add esp, 4
push eax
call fcn.0040f03e
add esp, 8
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x60]
test eax, eax
je 0x405f79
mov esi, dword [eax]
push eax
call fcn.0040f452
add esp, 4
mov eax, esi
test esi, esi
jne 0x405f68
test ebx, ebx
je 0x405fd2
push dword [ebx + 0xc]
call fcn.0040f452
push dword [ebx + 0x10]
call fcn.0040f452
push dword [ebx + 0x18]
call fcn.0040f452
push dword [ebx + 0x1c]
call fcn.0040f452
push dword [ebx + 0x20]
call fcn.0040f452
push dword [ebx + 0x28]
call fcn.0040f452
mov ecx, dword [ebx]
call fcn.00402fb0
mov ecx, dword [ebx + 4]
mov dword [ebx], 0
call fcn.00402fb0
push ebx
mov dword [ebx + 4], 0
call fcn.0040f452
add esp, 0x1c
mov ecx, dword [esp + 0x1006c]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00406004
mov esp, ebp
pop ebp
ret