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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1824
call fcn.00444050
mov eax, dword [0x452004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 4
push 0
push 2
call fcn.004202f5
add esp, 4
push eax
call fcn.00421e6f
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
add esp, 0x10
push 0x100
push 0x46dcc0
push str.PYLAUNCH_DEBUG
call ebx
mov edi, eax
cmp edi, 0x100
jb 0x4027a1
lea ecx, [edi*2 + 2]
push ecx
call fcn.004233b5
mov esi, eax
add esp, 4
test esi, esi
jne 0x402796
push str.Could_not_allocate_environment_buffer
push 0x68
call fcn.00401210
push edi
push esi
push str.PYLAUNCH_DEBUG
call ebx
jmp 0x4027aa
test edi, edi
je 0x4027bf
mov esi, 0x46dcc0
cmp word [esi], 0
je 0x4027bf
push 2
call fcn.004202f5
add esp, 4
mov dword [0x453ca4], eax
push str.launcher_build:_32bit_n
call fcn.004011c0
push str.launcher_executable:_Console_n
call fcn.004011c0
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 8
mov esi, 0x104
lea edi, [esi + esi]
push edi
call fcn.004233b5
add esp, 4
mov dword [ebp - 0x1808], eax
test eax, eax
je 0x402ca6
push esi
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x402c8c
cmp eax, esi
jne 0x40282a
call ebx
cmp eax, 0x7a
jne 0x40282a
push dword [ebp - 0x1808]
call fcn.00421ef1
add esp, 4
mov esi, edi
jmp 0x4027e1
mov edi, dword [ebp - 0x1808]
lea eax, [ebp - 0x1810]
push eax
push edi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov dword [ebp - 0x1810], eax
test eax, eax
jne 0x402884
call ebx
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.004011c0
add esp, 8
jmp 0x402908
push eax
call fcn.004233b5
mov esi, eax
add esp, 4
test esi, esi
je 0x402908
push esi
push dword [ebp - 0x1810]
push 0
push edi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
jne 0x4028b9
call ebx
push eax
push str.GetFileVersionInfo_failed:__X_n
call fcn.004011c0
add esp, 8
jmp 0x4028ff
lea eax, [ebp - 0x1824]
push eax
lea eax, [ebp - 0x1820]
push eax
push 0x44ebb4
push esi
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
jne 0x4028e9
call ebx
push eax
push str.VerQueryValue_failed:__X_n
call fcn.004011c0
add esp, 8
jmp 0x4028ff
mov ecx, dword [ebp - 0x1820]
mov eax, dword [ecx + 8]
mov dword [0x46dec4], eax
mov eax, dword [ecx + 0xc]
mov dword [0x46ead8], eax
push esi
call fcn.00421ef1
add esp, 4
mov esi, edi
lea ecx, [esi + 2]
lea ecx, [ecx]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x402910
sub esi, ecx
sar esi, 1
add esi, 0x21
lea eax, [esi + esi]
push eax
call fcn.004233b5
mov ebx, eax
add esp, 4
mov dword [ebp - 0x181c], ebx
test ebx, ebx
je 0x402952
push edi
push esi
push ebx
call fcn.00421256
add esp, 0xc
test eax, eax
je 0x40295e
push ebx
call fcn.00421ef1
add esp, 4
push str.Failed_to_copy_module_name
push 0x68
call fcn.00401210
cmp esi, 0x7fffffff
jb 0x40296b
mov esi, 0x7fffffff
push 0x5c
push ebx
call fcn.0040450b
mov edi, eax
add esp, 8
test edi, edi
jne 0x402988
push str.No_pyvenv.cfg_file
push 0x6a
call fcn.00401210
push str.pyvenv.cfg
xor eax, eax
push esi
push ebx
mov word [edi], ax
call fcn.0042132c
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x402a01
push ebx
push str.File__ls_non_existent_n
call fcn.004011c0
xor eax, eax
push 0x5c
push ebx
mov word [edi], ax
call fcn.0040450b
add esp, 0x10
test eax, eax
je 0x402a01
push str.pyvenv.cfg
xor ecx, ecx
push esi
push ebx
mov word [eax], cx
call fcn.0042132c
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x402a01
push ebx
push str.File__ls_non_existent_n
call fcn.004011c0
add esp, 8
push str.No_pyvenv.cfg_file
push 0x6a
call fcn.00401210
push ebx
push str.Using_venv_configuration_file__ls_n
call fcn.004011c0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ecx, eax
movzx edx, word [ecx]
cmp edx, 0x22
jne 0x402a22
add ecx, 2
xor eax, eax
cmp edx, 0x22
sete al
lea eax, [eax*2 + 0x20]
push eax
push ecx
call fcn.00403e33
add esp, 8
test eax, eax
jne 0x402a46
mov esi, 0x44f924
jmp 0x402a73
lea esi, [eax + 2]
movzx eax, word [esi]
mov dword [ebp - 0x180c], esi
test ax, ax
je 0x402a79
movzx eax, ax
push eax
call fcn.004231d0
add esp, 4
test eax, eax
je 0x402a73
movzx eax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x402a57
mov dword [ebp - 0x180c], esi
push esi
push str.Called_with_command_line:__ls_n
call fcn.004011c0
push 0x450194
lea eax, [ebp - 0x1814]
push ebx
push eax
call fcn.00420e3f
add esp, 0x14
test eax, eax
je 0x402aaa
push ebx
push 0x450198
push 0x6b
call fcn.00401210
push dword [ebp - 0x1814]
lea eax, [ebp - 0x1804]
push 0x1000
push 1
push 0x1000
push eax
call fcn.00421ba2
push dword [ebp - 0x1814]
call fcn.00420f72
lea eax, [ebp - 0x1804]
push str.home
push eax
call fcn.00404170
mov esi, eax
add esp, 0x20
test esi, esi
je 0x402b49
lea ecx, [ecx]
cmp byte [esi], 0xa
jne 0x402af6
inc esi
mov eax, 4
jmp 0x402b00
cmp byte [esi], 0
je 0x402b2d
dec eax
inc esi
test eax, eax
jg 0x402b00
mov al, byte [esi]
test al, al
je 0x402b2d
cbw
push 8
movzx eax, ax
push eax
call fcn.0042100a
add esp, 8
test eax, eax
je 0x402b2d
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x402b11
cmp byte [esi], 0x3d
je 0x402b56
lea eax, [esi + 1]
push str._nhome
push eax
call fcn.00404170
mov esi, eax
add esp, 8
test esi, esi
jne 0x402af0
push ebx
push str.Cannot_find_home_in__ls
push 0x6b
call fcn.00401210
mov al, byte [esi + 1]
inc esi
test al, al
je 0x402b72
cbw
push 8
movzx eax, ax
push eax
call fcn.0042100a
add esp, 8
test eax, eax
jne 0x402b56
push 0xa
push esi
call fcn.004043e0
mov edi, eax
add esp, 8
test edi, edi
je 0x402b87
sub edi, esi
jmp 0x402b99
mov edi, esi
lea ecx, [edi + 1]
lea esp, [esp]
mov al, byte [edi]
inc edi
test al, al
jne 0x402b90
sub edi, ecx
push 0
push 0
push edi
push esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x402bbb
push str.Cannot_determine_memory_for_home_path
push eax
call fcn.00401210
add eax, 0xc
mov dword [ebp - 0x1818], eax
add eax, eax
push eax
call fcn.004233b5
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x402be1
push str.A_memory_allocation_failed
push 0x68
call fcn.00401210
push dword [ebp - 0x1818]
push ebx
push edi
push esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x402c0d
push dword [ebp - 0x181c]
push str.Cannot_decode_home_path_in__ls
push 0x6b
call fcn.00401210
cmp word [ebx + eax*2 - 2], 0x5c
je 0x402c1c
mov dword [ebx + eax*2], 0x5c
push str.python.exe
push dword [ebp - 0x1818]
push ebx
call fcn.0042132c
add esp, 0xc
test eax, eax
je 0x402c46
push dword [ebp - 0x181c]
push str.Cannot_create_executable_path_from__ls
push 0x6b
call fcn.00401210
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x402c5f
push ebx
push str.No_Python_at__ls
push 0x67
call fcn.00401210
push dword [ebp - 0x1808]
push str.__PYVENV_LAUNCHER__
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x402c7f
push str.Failed_to_set_launcher_environment
push eax
call fcn.00401210
push dword [ebp - 0x180c]
mov ecx, ebx
call fcn.00402290
push dword [ebp - 0x1808]
call fcn.00421ef1
add esp, 4
push str.Failed_to_get_module_name
push 0
call fcn.00401210
push str.out_of_memory
push 0x68
call fcn.00401210
int3