Function at 0x403140
Capabilities:
Accept command line arguments
Check if file exists
Get common file path
Get file version info
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x81c
mov eax, dword [0x427004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 4
push 0
push 2
mov dword [ebp - 0x808], edx
mov dword [ebp - 0x810], ecx
call fcn.0040c5f8
add esp, 4
push eax
call fcn.0040dbec
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
add esp, 0x10
push 0x100
push 0x4426b0
push str.PYLAUNCH_DEBUG
call ebx
mov edi, eax
cmp edi, 0x100
jb 0x4031c1
lea ecx, [edi*2 + 2]
push ecx
call fcn.0040e190
mov esi, eax
add esp, 4
test esi, esi
je 0x4036b6
push edi
push esi
push str.PYLAUNCH_DEBUG
call ebx
jmp 0x4031ca
test edi, edi
je 0x4031df
mov esi, 0x4426b0
cmp word [esi], 0
je 0x4031df
push 2
call fcn.0040c5f8
add esp, 4
mov dword [0x428898], eax
push str.launcher_build:_32bit_n
call fcn.00401130
push str.launcher_executable:_Console_n
call fcn.00401130
add esp, 8
push 0x4428b0
push 0
push 0
push 0x1c
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x403215
push eax
push str.SHGetFolderPath_failed:__X_n
jmp 0x403248
push 0xffffffffffffffff
push str.py.ini
push 0x104
push 0x4428b0
call fcn.0040cf81
add esp, 0x10
push 0x4428b0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x4428b0
cmp eax, 0xffffffff
jne 0x40325a
push str.File__ls_non_existent_n
call fcn.00401130
add esp, 8
xor eax, eax
mov word [0x4428b0], ax
jmp 0x403267
push str.Using_local_configuration_file__ls_n
call fcn.00401130
add esp, 8
mov edi, 0x104
nop dword [eax]
lea ebx, [edi + edi]
push ebx
call fcn.0040e190
mov esi, eax
add esp, 4
test esi, esi
je 0x4036aa
push edi
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x403713
cmp eax, edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x4032b6
call edi
cmp eax, 0x7a
jne 0x4032b6
push esi
call fcn.0040dc26
add esp, 4
mov edi, ebx
jmp 0x403270
lea eax, [ebp - 0x818]
push eax
push esi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov dword [ebp - 0x818], eax
test eax, eax
jne 0x40332b
call edi
push 0
push 0x400
lea ecx, [ebp - 0x804]
push ecx
push 0x400
push eax
push 0
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
lea eax, [ebp - 0x804]
push eax
push str.GetFileVersionInfoSize_failed:__ls_n
call fcn.00401130
add esp, 8
mov ebx, dword [ebp - 0x814]
push esi
push 0x104
push 0x428690
call fcn.0040d0de
add esp, 0xc
test eax, eax
jne 0x4036c2
jmp 0x4033e7
push eax
call fcn.0040e190
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x403305
push ebx
push dword [ebp - 0x818]
push 0
push esi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
mov dword [ebp - 0x80c], eax
test eax, eax
jne 0x403375
call edi
push eax
push str.GetFileVersionInfo_failed:__X_n
call fcn.00401130
add esp, 8
push ebx
call fcn.0040dc26
mov ebx, dword [ebp - 0x80c]
add esp, 4
jmp 0x40330b
lea eax, [ebp - 0x81c]
push eax
lea eax, [ebp - 0x814]
push eax
push 0x422c74
push ebx
call dword [sym.imp.VERSION.dll_VerQueryValueW]
mov dword [ebp - 0x80c], eax
test eax, eax
jne 0x4033bd
call edi
push eax
push str.VerQueryValue_failed:__X_n
call fcn.00401130
add esp, 8
push ebx
call fcn.0040dc26
mov ebx, dword [ebp - 0x80c]
add esp, 4
jmp 0x40330b
mov ecx, dword [ebp - 0x814]
push ebx
mov eax, dword [ecx + 8]
mov dword [0x442ab8], eax
mov eax, dword [ecx + 0xc]
mov dword [0x442abc], eax
call fcn.0040dc26
mov ebx, dword [ebp - 0x80c]
add esp, 4
jmp 0x40330b
push 0x5c
push 0x428690
call fcn.00404697
add esp, 8
test eax, eax
jne 0x403406
push 0x428690
push str.GetModuleFileNameW_returned_value_has_no_backslash:__ls_n
jmp 0x40343c
push str.py.ini
xor ecx, ecx
push 0x104
push 0x428690
mov word [eax], cx
call fcn.0040d142
add esp, 0xc
push 0x428690
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x428690
cmp eax, 0xffffffff
jne 0x40344e
push str.File__ls_non_existent_n
call fcn.00401130
add esp, 8
xor eax, eax
mov word [0x428690], ax
jmp 0x40345b
push str.Using_global_configuration_file__ls_n
call fcn.00401130
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ecx, eax
movzx edx, word [ecx]
cmp edx, 0x22
jne 0x40346e
add ecx, 2
xor eax, eax
cmp edx, 0x22
sete al
lea eax, [eax*2 + 0x20]
push eax
push ecx
call fcn.00404365
add esp, 8
test eax, eax
jne 0x403492
mov edi, 0x424178
jmp 0x4034be
lea edi, [eax + 2]
movzx eax, word [edi]
test ax, ax
je 0x4034be
mov ecx, eax
nop
movzx eax, cx
push eax
call fcn.0040dc50
add esp, 4
test eax, eax
je 0x4034be
movzx eax, word [edi + 2]
add edi, 2
mov ecx, eax
test ax, ax
jne 0x4034a0
push edi
push str.Called_with_command_line:__ls_n
call fcn.00401130
add esp, 8
push 0
push str.__PYVENV_LAUNCHER__
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [ebp - 0x810]
cmp eax, 1
jle 0x40367f
mov esi, dword [ebp - 0x808]
mov esi, dword [esi + 4]
cmp eax, 2
jne 0x40353b
push eax
push 0x425038
push esi
call fcn.0040e156
add esp, 0xc
test eax, eax
je 0x40351d
push 6
push str.__list
push esi
call fcn.0040e156
add esp, 0xc
test eax, eax
jne 0x40353b
mov ecx, dword [ebp - 0x808]
call fcn.00402f60
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040373f
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x40359f
cmp word [esi], 0x2d
jne 0x40359f
lea ebx, [esi + 2]
mov ecx, ebx
call fcn.00402730
test eax, eax
je 0x40359f
xor edx, edx
mov ecx, ebx
call fcn.00401cd0
mov dword [ebp - 0x80c], eax
test eax, eax
je 0x4036ce
lea ecx, [esi + 2]
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x403570
sub esi, ecx
sar esi, 1
lea ecx, [edi + esi*2]
call fcn.004010f0
mov edi, eax
mov eax, dword [ebp - 0x80c]
lea ecx, [eax + 0x14]
test ecx, ecx
jne 0x4036ff
jmp 0x403694
mov edx, dword [ebp - 0x810]
mov ecx, 1
nop word [eax + eax]
mov eax, dword [ebp - 0x808]
lea ebx, [eax + ecx*4]
mov eax, dword [ebx]
cmp word [eax], 0x2d
jne 0x4035c8
inc ecx
cmp ecx, edx
jl 0x4035b0
jmp 0x403603
cmp ecx, edx
jge 0x403603
cmp word [0x428690], 0
je 0x4035e0
mov ecx, 0x428690
call fcn.004023b0
cmp word [0x4428b0], 0
je 0x4035f4
mov ecx, 0x4428b0
call fcn.004023b0
mov edx, edi
mov ecx, ebx
call fcn.004027e0
mov edx, dword [ebp - 0x810]
cmp edx, 2
jne 0x40367f
push 0x425118
push esi
call fcn.0040c77a
add esp, 8
test eax, eax
je 0x40362c
push str.__help
push esi
call fcn.0040c77a
add esp, 8
test eax, eax
jne 0x403637
mov ecx, dword [ebp - 0x808]
call fcn.00402d50
push 0x425038
push esi
call fcn.0040c77a
add esp, 8
test eax, eax
je 0x403694
push str.__list
push esi
call fcn.0040c77a
add esp, 8
test eax, eax
je 0x403694
push 0x424b90
push esi
call fcn.0040c77a
add esp, 8
test eax, eax
je 0x403694
push str.__list_paths
push esi
call fcn.0040c77a
add esp, 8
test eax, eax
je 0x403694
xor edx, edx
mov ecx, 0x424178
call fcn.00401cd0
test eax, eax
je 0x403707
jmp 0x40358f
mov ecx, dword [ebp - 4]
mov eax, 0x67
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040373f
mov esp, ebp
pop ebp
ret
push str.out_of_memory
push 0x68
call fcn.00401180
push str.Could_not_allocate_environment_buffer
push 0x68
call fcn.00401180
push str.Failed_to_copy_module_name
push 0x68
call fcn.00401180
push ebx
push str.Python__ls_not_found__n
push 1
call fcn.0040c5f8
add esp, 4
push eax
call fcn.00401010
mov ecx, dword [ebp - 0x808]
add esp, 0xc
call fcn.00402f60
push ebx
push str.Requested_Python_version___ls__not_installed__use__0_for_available_pythons
push 0x67
call fcn.00401180
push edi
xor edx, edx
call fcn.00402070
push str.Cant_find_a_default_Python.
push 0x67
call fcn.00401180
push esi
call fcn.0040dc26
add esp, 4
push str.Failed_to_get_module_name
push 0
call fcn.00401180
int3