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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1824
call fcn.00441dd0
mov eax, dword [0x44f004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 4
push 0
push 2
call fcn.0041f500
add esp, 4
push eax
call fcn.00420fc2
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
add esp, 0x10
push pe_nt_image_headers32
push 0x46acc0
push str.PYLAUNCH_DEBUG
call ebx
mov edi, eax
cmp edi, 0x100
jb 0x4028a1
lea ecx, [edi*2 + 2]
push ecx
call fcn.004216e3
mov esi, eax
add esp, 4
test esi, esi
jne 0x402896
push str.Could_not_allocate_environment_buffer
push 0x68
call fcn.00401210
push edi
push esi
push str.PYLAUNCH_DEBUG
call ebx
jmp 0x4028aa
test edi, edi
je 0x4028bf
mov esi, 0x46acc0
cmp word [esi], 0
je 0x4028bf
push 2
call fcn.0041f500
add esp, 4
mov dword [0x450ca4], eax
push str.launcher_build:_32bit_n
call fcn.004011c0
push str.launcher_executable:_Windows_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.004216e3
add esp, 4
mov dword [ebp - 0x1808], eax
test eax, eax
je 0x402da6
push esi
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x402d8c
cmp eax, esi
jne 0x40292a
call ebx
cmp eax, 0x7a
jne 0x40292a
push dword [ebp - 0x1808]
call fcn.00421046
add esp, 4
mov esi, edi
jmp 0x4028e1
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 0x402984
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 0x402a08
push eax
call fcn.004216e3
mov esi, eax
add esp, 4
test esi, esi
je 0x402a08
push esi
push dword [ebp - 0x1810]
push 0
push edi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
jne 0x4029b9
call ebx
push eax
push str.GetFileVersionInfo_failed:__X_n
call fcn.004011c0
add esp, 8
jmp 0x4029ff
lea eax, [ebp - 0x1824]
push eax
lea eax, [ebp - 0x1820]
push eax
push 0x44b244
push esi
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
jne 0x4029e9
call ebx
push eax
push str.VerQueryValue_failed:__X_n
call fcn.004011c0
add esp, 8
jmp 0x4029ff
mov ecx, dword [ebp - 0x1820]
mov eax, dword [ecx + 8]
mov dword [0x46aec4], eax
mov eax, dword [ecx + 0xc]
mov dword [0x46bad8], eax
push esi
call fcn.00421046
add esp, 4
mov esi, edi
lea ecx, [esi + 2]
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x402a10
sub esi, ecx
sar esi, 1
add esi, 0x21
lea eax, [esi + esi]
push eax
call fcn.004216e3
mov ebx, eax
add esp, 4
mov dword [ebp - 0x181c], ebx
test ebx, ebx
je 0x402a52
push edi
push esi
push ebx
call fcn.004203c4
add esp, 0xc
test eax, eax
je 0x402a5e
push ebx
call fcn.00421046
add esp, 4
push str.Failed_to_copy_module_name
push 0x68
call fcn.00401210
mov edi, 0x7fffffff
cmp esi, edi
push 0x5c
push ebx
cmovb edi, esi
call fcn.004044eb
mov esi, eax
add esp, 8
test esi, esi
jne 0x402a85
push str.No_pyvenv.cfg_file
push 0x6a
call fcn.00401210
push str.pyvenv.cfg
xor eax, eax
push edi
push ebx
mov word [esi], ax
call fcn.0042049a
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x402afe
push ebx
push str.File__ls_non_existent_n
call fcn.004011c0
xor eax, eax
push 0x5c
push ebx
mov word [esi], ax
call fcn.004044eb
add esp, 0x10
test eax, eax
je 0x402afe
push str.pyvenv.cfg
xor ecx, ecx
push edi
push ebx
mov word [eax], cx
call fcn.0042049a
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x402afe
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 0x402b1f
add ecx, 2
xor eax, eax
cmp edx, 0x22
sete al
lea eax, [eax*2 + 0x20]
push eax
push ecx
call fcn.00403e05
add esp, 8
test eax, eax
jne 0x402b43
mov esi, 0x44bfc4
jmp 0x402b74
lea esi, [eax + 2]
movzx eax, word [esi]
mov dword [ebp - 0x180c], esi
test ax, ax
je 0x402b7a
mov ecx, eax
movzx eax, cx
push eax
call fcn.00421613
add esp, 4
test eax, eax
je 0x402b74
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x402b56
mov dword [ebp - 0x180c], esi
push esi
push str.Called_with_command_line:__ls_n
call fcn.004011c0
push 0x44cc4c
lea eax, [ebp - 0x1814]
push ebx
push eax
call fcn.0041ffb9
add esp, 0x14
test eax, eax
je 0x402bab
push ebx
push 0x44cc50
push 0x6b
call fcn.00401210
push dword [ebp - 0x1814]
lea eax, [ebp - 0x1804]
push 0x1000
push 1
push 0x1000
push eax
call fcn.00420d0a
push dword [ebp - 0x1814]
call fcn.004200ec
lea eax, [ebp - 0x1804]
push str.home
push eax
call fcn.00404150
add esp, 0x20
test eax, eax
je 0x402c47
nop dword [eax]
cmp byte [eax], 0xa
lea esi, [eax + 1]
mov ecx, 4
cmovne esi, eax
nop
cmp byte [esi], 0
je 0x402c2d
dec ecx
inc esi
test ecx, ecx
jg 0x402c00
mov al, byte [esi]
test al, al
je 0x402c2d
cbw
push 8
movzx eax, ax
push eax
call fcn.0042017a
add esp, 8
test eax, eax
je 0x402c2d
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x402c11
cmp byte [esi], 0x3d
je 0x402c54
lea eax, [esi + 1]
push str._nhome
push eax
call fcn.00404150
add esp, 8
test eax, eax
jne 0x402bf0
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 0x402c70
cbw
push 8
movzx eax, ax
push eax
call fcn.0042017a
add esp, 8
test eax, eax
jne 0x402c54
push 0xa
push esi
call fcn.004043c0
mov edi, eax
add esp, 8
test edi, edi
je 0x402c85
sub edi, esi
jmp 0x402c99
mov edi, esi
lea ecx, [edi + 1]
nop word [eax + eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x402c90
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 0x402cbb
push str.Cannot_determine_memory_for_home_path
push eax
call fcn.00401210
add eax, 0xd
mov dword [ebp - 0x1818], eax
add eax, eax
push eax
call fcn.004216e3
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x402ce1
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 0x402d0d
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 0x402d1c
mov dword [ebx + eax*2], 0x5c
push str.pythonw.exe
push dword [ebp - 0x1818]
push ebx
call fcn.0042049a
add esp, 0xc
test eax, eax
je 0x402d46
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 0x402d5f
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 0x402d7f
push str.Failed_to_set_launcher_environment
push eax
call fcn.00401210
push dword [ebp - 0x180c]
mov ecx, ebx
call fcn.004022f0
push dword [ebp - 0x1808]
call fcn.00421046
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