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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1858
call fcn.004017ee
mov eax, dword [0x47f030]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x1850], 0
push 0
push 4
push 0
push 2
call fcn.004027de
add esp, 4
push eax
call fcn.00401e92
add esp, 0x10
push str.PYLAUNCH_DEBUG
call fcn.00408940
add esp, 4
mov dword [ebp - 0x1830], eax
cmp dword [ebp - 0x1830], 0
je 0x4093a2
mov eax, dword [ebp - 0x1830]
movzx ecx, word [eax]
test ecx, ecx
je 0x4093a2
push 2
call fcn.004027de
add esp, 4
mov dword [0x47ff38], eax
push str.launcher_build:_32bit_n
call fcn.00408160
add esp, 4
push str.launcher_executable:_Console_n
call fcn.00408160
add esp, 4
call fcn.004089e0
mov dword [ebp - 0x1828], eax
lea edx, [ebp - 0x1820]
push edx
mov eax, dword [ebp - 0x1828]
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov dword [ebp - 0x1820], eax
cmp dword [ebp - 0x1820], 0
jne 0x40941d
push 0x400
lea ecx, [ebp - 0x804]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040a470
add esp, 0xc
lea edx, [ebp - 0x804]
push edx
push str.GetFileVersionInfoSize_failed:__ls_n
call fcn.00408160
add esp, 8
jmp 0x4094f1
mov eax, dword [ebp - 0x1820]
push eax
call fcn.0040133e
add esp, 4
mov dword [ebp - 0x1824], eax
cmp dword [ebp - 0x1824], 0
je 0x4094f1
mov ecx, dword [ebp - 0x1824]
push ecx
mov edx, dword [ebp - 0x1820]
push edx
push 0
mov eax, dword [ebp - 0x1828]
push eax
call sub.VERSION.dll_GetFileVersionInfoW
mov dword [ebp - 0x181c], eax
cmp dword [ebp - 0x181c], 0
jne 0x409480
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetFileVersionInfo_failed:__X_n
call fcn.00408160
add esp, 8
jmp 0x4094e2
lea ecx, [ebp - 0x1854]
push ecx
lea edx, [ebp - 0x1834]
push edx
push 0x470e50
mov eax, dword [ebp - 0x1824]
push eax
call sub.VERSION.dll_VerQueryValueW
mov dword [ebp - 0x181c], eax
cmp dword [ebp - 0x181c], 0
jne 0x4094c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.VerQueryValue_failed:__X_n
call fcn.00408160
add esp, 8
jmp 0x4094e2
mov ecx, dword [ebp - 0x1834]
mov edx, dword [ecx + 8]
mov dword [0x49ad68], edx
mov eax, dword [ebp - 0x1834]
mov ecx, dword [eax + 0xc]
mov dword [0x49ad6c], ecx
mov edx, dword [ebp - 0x1824]
push edx
call fcn.00402c48
add esp, 4
lea eax, [ebp - 0x1838]
push eax
push 0x20
mov ecx, dword [ebp - 0x1828]
push ecx
call fcn.0040a390
add esp, 0xc
mov dword [ebp - 0x1808], eax
cmp dword [ebp - 0x1808], 0
jne 0x409527
push str.Failed_to_copy_module_name
push 0x68
call fcn.004081d0
add esp, 8
push 0x5c
mov edx, dword [ebp - 0x1808]
push edx
call fcn.00401ea1
add esp, 8
mov dword [ebp - 0x1810], eax
cmp dword [ebp - 0x1810], 0
jne 0x409556
push str.No_pyvenv.cfg_file
push 0x6a
call fcn.004081d0
add esp, 8
mov eax, 2
imul ecx, eax, 0
xor edx, edx
mov eax, dword [ebp - 0x1810]
mov word [eax + ecx], dx
push str.pyvenv.cfg
mov ecx, dword [ebp - 0x1838]
push ecx
mov edx, dword [ebp - 0x1808]
push edx
call fcn.00402013
add esp, 0xc
mov eax, dword [ebp - 0x1808]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x182c], eax
cmp dword [ebp - 0x182c], 0xffffffff
jne 0x40965b
mov ecx, dword [ebp - 0x1808]
push ecx
push str.File__ls_non_existent_n
call fcn.00408160
add esp, 8
mov edx, 2
imul eax, edx, 0
xor ecx, ecx
mov edx, dword [ebp - 0x1810]
mov word [edx + eax], cx
push 0x5c
mov eax, dword [ebp - 0x1808]
push eax
call fcn.00401ea1
add esp, 8
mov dword [ebp - 0x1810], eax
cmp dword [ebp - 0x1810], 0
je 0x40965b
mov ecx, 2
imul edx, ecx, 0
xor eax, eax
mov ecx, dword [ebp - 0x1810]
mov word [ecx + edx], ax
push str.pyvenv.cfg
mov edx, dword [ebp - 0x1838]
push edx
mov eax, dword [ebp - 0x1808]
push eax
call fcn.00402013
add esp, 0xc
mov ecx, dword [ebp - 0x1808]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x182c], eax
cmp dword [ebp - 0x182c], 0xffffffff
jne 0x40965b
mov edx, dword [ebp - 0x1808]
push edx
push str.File__ls_non_existent_n
call fcn.00408160
add esp, 8
push str.No_pyvenv.cfg_file
push 0x6a
call fcn.004081d0
add esp, 8
mov eax, dword [ebp - 0x1808]
push eax
push str.Using_venv_configuration_file__ls_n
call fcn.00408160
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call fcn.0040a280
add esp, 4
mov dword [ebp - 0x184c], eax
mov ecx, dword [ebp - 0x184c]
push ecx
push str.Called_with_command_line:__ls_n
call fcn.00408160
add esp, 8
push 0x472dcc
mov edx, dword [ebp - 0x1808]
push edx
lea eax, [ebp - 0x183c]
push eax
call fcn.00402e4b
add esp, 0xc
test eax, eax
je 0x4096cd
mov ecx, dword [ebp - 0x1808]
push ecx
push 0x472dd0
push 0x6b
call fcn.004081d0
add esp, 0xc
mov edx, dword [ebp - 0x183c]
push edx
push 0x1000
push 1
push 0x1000
lea eax, [ebp - 0x1804]
push eax
call fcn.0040146a
add esp, 0x14
mov dword [ebp - 0x1858], eax
mov ecx, dword [ebp - 0x183c]
push ecx
call fcn.00401f00
add esp, 4
lea edx, [ebp - 0x1840]
push edx
lea eax, [ebp - 0x1844]
push eax
lea ecx, [ebp - 0x1804]
push ecx
call fcn.00408400
add esp, 0xc
test eax, eax
jne 0x40973b
mov edx, dword [ebp - 0x1808]
push edx
push str.Cannot_find_home_in__ls
push 0x6b
call fcn.004081d0
add esp, 0xc
push 0
push 0
mov eax, dword [ebp - 0x1840]
push eax
mov ecx, dword [ebp - 0x1844]
push ecx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x1818], eax
cmp dword [ebp - 0x1818], 0
jne 0x409778
push str.Cannot_determine_memory_for_home_path
push 0
call fcn.004081d0
add esp, 8
mov edx, 4
add edx, 0xc
add edx, dword [ebp - 0x1818]
mov dword [ebp - 0x1818], edx
mov eax, dword [ebp - 0x1818]
shl eax, 1
push eax
call fcn.0040133e
add esp, 4
mov dword [ebp - 0x180c], eax
cmp dword [ebp - 0x180c], 0
jne 0x4097bb
push str.A_memory_allocation_failed
push 0x68
call fcn.004081d0
add esp, 8
mov ecx, 2
imul edx, ecx, 0
mov eax, 0x22
mov ecx, dword [ebp - 0x180c]
mov word [ecx + edx], ax
mov edx, dword [ebp - 0x1818]
sub edx, 1
push edx
mov eax, 2
shl eax, 0
add eax, dword [ebp - 0x180c]
push eax
mov ecx, dword [ebp - 0x1840]
push ecx
mov edx, dword [ebp - 0x1844]
push edx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x1814], eax
cmp dword [ebp - 0x1814], 0
jne 0x40982b
mov eax, dword [ebp - 0x1808]
push eax
push str.Cannot_decode_home_path_in__ls
push 0x6b
call fcn.004081d0
add esp, 0xc
mov ecx, dword [ebp - 0x1814]
add ecx, 1
mov dword [ebp - 0x1814], ecx
xor edx, edx
mov eax, dword [ebp - 0x1814]
mov ecx, dword [ebp - 0x180c]
mov word [ecx + eax*2], dx
mov edx, dword [ebp - 0x1814]
mov eax, dword [ebp - 0x180c]
movzx ecx, word [eax + edx*2 - 2]
cmp ecx, 0x5c
je 0x409898
mov edx, 0x5c
mov eax, dword [ebp - 0x1814]
mov ecx, dword [ebp - 0x180c]
mov word [ecx + eax*2], dx
mov edx, dword [ebp - 0x1814]
add edx, 1
mov dword [ebp - 0x1814], edx
xor eax, eax
mov ecx, dword [ebp - 0x1814]
mov edx, dword [ebp - 0x180c]
mov word [edx + ecx*2], ax
push str.python_d.exe
mov eax, dword [ebp - 0x1818]
sub eax, 1
push eax
mov ecx, 2
shl ecx, 0
add ecx, dword [ebp - 0x180c]
push ecx
call fcn.00402013
add esp, 0xc
test eax, eax
je 0x4098d8
mov edx, dword [ebp - 0x1808]
push edx
push str.Cannot_create_executable_path_from__ls
push 0x6b
call fcn.004081d0
add esp, 0xc
mov eax, 2
shl eax, 0
add eax, dword [ebp - 0x180c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x409908
mov ecx, dword [ebp - 0x180c]
push ecx
push str.No_Python_at__ls
push 0x67
call fcn.004081d0
add esp, 0xc
push 0x472fc4
mov edx, dword [ebp - 0x1818]
push edx
mov eax, dword [ebp - 0x180c]
push eax
call fcn.00402013
add esp, 0xc
mov ecx, dword [ebp - 0x1828]
push ecx
push 0x472fc8
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x409948
push str.Failed_to_set_launcher_environment
push 0
call fcn.004081d0
add esp, 8
mov dword [ebp - 0x181c], 1
cmp dword [ebp - 0x181c], 0
jne 0x409a4f
cmp dword [ebp + 8], 2
jne 0x4099a1
push 0x47304c
mov edx, dword [ebp - 0x1810]
push edx
call fcn.00402662
add esp, 8
test eax, eax
je 0x409995
push str.__help
mov eax, dword [ebp - 0x1810]
push eax
call fcn.00402662
add esp, 8
test eax, eax
jne 0x4099a1
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00409ff0
add esp, 4
cmp dword [ebp + 8], 2
jne 0x409a13
push 0x473064
mov edx, dword [ebp - 0x1810]
push edx
call fcn.00402662
add esp, 8
test eax, eax
je 0x409a07
push str.__list
mov eax, dword [ebp - 0x1810]
push eax
call fcn.00402662
add esp, 8
test eax, eax
je 0x409a07
push 0x472a34
mov ecx, dword [ebp - 0x1810]
push ecx
call fcn.00402662
add esp, 8
test eax, eax
je 0x409a07
push str.__list_paths
mov edx, dword [ebp - 0x1810]
push edx
call fcn.00402662
add esp, 8
test eax, eax
jne 0x409a13
mov dword [ebp - 0x180c], 0
jmp 0x409a4f
push 0
push 0x471ec4
call fcn.00408f40
add esp, 8
mov dword [ebp - 0x1848], eax
cmp dword [ebp - 0x1848], 0
jne 0x409a40
push str.Cant_find_a_default_Python.
push 0x67
call fcn.004081d0
add esp, 8
mov eax, dword [ebp - 0x1848]
add eax, 0x14
mov dword [ebp - 0x180c], eax
cmp dword [ebp - 0x180c], 0
je 0x409a72
mov ecx, dword [ebp - 0x184c]
push ecx
push 0
mov edx, dword [ebp - 0x180c]
push edx
call fcn.00408bb0
add esp, 0xc
jmp 0x409a7c
mov dword [ebp - 0x1850], 0x67
mov eax, dword [ebp - 0x1850]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004022ca
mov esp, ebp
pop ebp
ret