Function at 0x401480
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.004182d0
mov eax, dword [0x421004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 4
push 0
push 2
call fcn.00409303
add esp, 4
push eax
call fcn.0040a459
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
add esp, 0x10
push 0x100
push 0x43c4a0
push str.PYLAUNCH_DEBUG
call ebx
mov edi, eax
cmp edi, 0x100
jb 0x401501
lea ecx, [edi*2 + 2]
push ecx
call fcn.0040a56e
mov esi, eax
add esp, 4
test esi, esi
jne 0x4014f6
push str.Could_not_allocate_environment_buffer
push 0x68
call fcn.004010e0
push edi
push esi
push str.PYLAUNCH_DEBUG
call ebx
jmp 0x40150a
test edi, edi
je 0x40151f
mov esi, 0x43c4a0
cmp word [esi], 0
je 0x40151f
push 2
call fcn.00409303
add esp, 4
mov dword [0x422688], eax
push str.launcher_build:_32bit_n
call fcn.00401090
push str.launcher_executable:_Windows_n
call fcn.00401090
add esp, 8
mov esi, 0x104
nop dword [eax + eax]
lea edi, [esi + esi]
push edi
call fcn.0040a56e
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x401a33
push esi
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x401a1e
cmp eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x401586
call esi
cmp eax, 0x7a
jne 0x401586
push ebx
call fcn.0040a493
add esp, 4
mov esi, edi
jmp 0x401540
lea eax, [ebp - 0x1814]
push eax
push ebx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov dword [ebp - 0x1814], eax
test eax, eax
jne 0x4015da
call esi
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.00401090
add esp, 8
jmp 0x40165e
push eax
call fcn.0040a56e
mov edi, eax
add esp, 4
test edi, edi
je 0x40165e
push edi
push dword [ebp - 0x1814]
push 0
push ebx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
jne 0x40160f
call esi
push eax
push str.GetFileVersionInfo_failed:__X_n
call fcn.00401090
add esp, 8
jmp 0x401655
lea eax, [ebp - 0x1824]
push eax
lea eax, [ebp - 0x181c]
push eax
push 0x41eb6c
push edi
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
jne 0x40163f
call esi
push eax
push str.VerQueryValue_failed:__X_n
call fcn.00401090
add esp, 8
jmp 0x401655
mov ecx, dword [ebp - 0x181c]
mov eax, dword [ecx + 8]
mov dword [0x43c8a8], eax
mov eax, dword [ecx + 0xc]
mov dword [0x43c8ac], eax
push edi
call fcn.0040a493
add esp, 4
mov esi, ebx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x401663
sub esi, ecx
sar esi, 1
add esi, 0x21
lea eax, [esi + esi]
push eax
call fcn.0040a56e
mov edi, eax
add esp, 4
mov dword [ebp - 0x1818], edi
test edi, edi
je 0x4016a5
push ebx
push esi
push edi
call fcn.004099b3
add esp, 0xc
test eax, eax
je 0x4016b1
push edi
call fcn.0040a493
add esp, 4
push str.Failed_to_copy_module_name
push 0x68
call fcn.004010e0
mov eax, 0x7fffffff
cmp esi, eax
push 0x5c
cmovb eax, esi
push edi
mov dword [ebp - 0x180c], eax
call fcn.00402a2b
add esp, 8
mov dword [ebp - 0x1808], eax
test eax, eax
jne 0x4016e2
push str.No_pyvenv.cfg_file
push 0x6a
call fcn.004010e0
mov esi, dword [ebp - 0x180c]
xor ecx, ecx
push str.pyvenv.cfg
push esi
push edi
mov word [eax], cx
call fcn.00409a17
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x401767
push edi
push str.File__ls_non_existent_n
call fcn.00401090
mov eax, dword [ebp - 0x1808]
xor ecx, ecx
push 0x5c
push edi
mov word [eax], cx
call fcn.00402a2b
add esp, 0x10
test eax, eax
je 0x401767
push str.pyvenv.cfg
xor ecx, ecx
push esi
push edi
mov word [eax], cx
call fcn.00409a17
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x401767
push edi
push str.File__ls_non_existent_n
call fcn.00401090
add esp, 8
push str.No_pyvenv.cfg_file
push 0x6a
call fcn.004010e0
push edi
push str.Using_venv_configuration_file__ls_n
call fcn.00401090
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov ecx, eax
movzx edx, word [ecx]
cmp edx, 0x22
jne 0x401788
add ecx, 2
xor eax, eax
cmp edx, 0x22
sete al
lea eax, [eax*2 + 0x20]
push eax
push ecx
call fcn.004025c5
add esp, 8
test eax, eax
jne 0x4017ac
mov esi, 0x41ef68
jmp 0x4017de
lea esi, [eax + 2]
movzx eax, word [esi]
mov dword [ebp - 0x1810], esi
test ax, ax
je 0x4017e4
mov ecx, eax
nop
movzx eax, cx
push eax
call fcn.0040a4b0
add esp, 4
test eax, eax
je 0x4017de
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x4017c0
mov dword [ebp - 0x1810], esi
push esi
push str.Called_with_command_line:__ls_n
call fcn.00401090
push 0x41f24c
lea eax, [ebp - 0x1808]
push edi
push eax
call fcn.004097ae
add esp, 0x14
test eax, eax
je 0x401815
push edi
push 0x41f250
push 0x6b
call fcn.004010e0
push dword [ebp - 0x1808]
lea eax, [ebp - 0x1804]
push 0x1000
push 1
push 0x1000
push eax
call fcn.0040a177
push dword [ebp - 0x1808]
call fcn.0040991a
lea eax, [ebp - 0x1804]
push str.home
push eax
call fcn.00402690
mov esi, eax
add esp, 0x20
test esi, esi
je 0x4018aa
cmp byte [esi], 0xa
jne 0x40185e
inc esi
mov eax, 4
cmp byte [esi], 0
je 0x401890
dec eax
inc esi
test eax, eax
jg 0x401863
mov al, byte [esi]
test al, al
je 0x401890
cbw
push 8
movzx eax, ax
push eax
call fcn.0040994a
add esp, 8
test eax, eax
je 0x401890
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x401874
cmp byte [esi], 0x3d
je 0x4018b7
push str._nhome
inc esi
push esi
call fcn.00402690
mov esi, eax
add esp, 8
test esi, esi
jne 0x401858
push edi
push str.Cannot_find_home_in__ls
push 0x6b
call fcn.004010e0
mov al, byte [esi + 1]
inc esi
test al, al
je 0x4018d3
cbw
push 8
movzx eax, ax
push eax
call fcn.0040994a
add esp, 8
test eax, eax
jne 0x4018b7
push 0xa
push esi
call fcn.00402900
mov edi, eax
add esp, 8
test edi, edi
je 0x4018e8
sub edi, esi
jmp 0x4018f9
mov edi, esi
lea ecx, [edi + 1]
nop dword [eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x4018f0
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 0x40191b
push str.Cannot_determine_memory_for_home_path
push eax
call fcn.004010e0
add eax, 0xf
mov dword [ebp - 0x180c], eax
add eax, eax
push eax
call fcn.0040a56e
add esp, 4
mov dword [ebp - 0x1820], eax
test eax, eax
jne 0x401945
push str.A_memory_allocation_failed
push 0x68
call fcn.004010e0
mov ecx, 0x22
mov word [eax], cx
lea ecx, [eax + 2]
mov eax, dword [ebp - 0x180c]
dec eax
push eax
push ecx
push edi
push esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x40197e
push dword [ebp - 0x1818]
push str.Cannot_decode_home_path_in__ls
push 0x6b
call fcn.004010e0
mov esi, dword [ebp - 0x1820]
xor ecx, ecx
cmp word [esi + eax*2], 0x5c
mov word [esi + eax*2 + 2], cx
je 0x40199a
mov dword [esi + eax*2 + 2], 0x5c
mov edi, dword [ebp - 0x180c]
push str.pythonw.exe
lea eax, [edi - 1]
push eax
lea eax, [esi + 2]
push eax
call fcn.00409a17
add esp, 0xc
test eax, eax
je 0x4019cb
push dword [ebp - 0x1818]
push str.Cannot_create_executable_path_from__ls
push 0x6b
call fcn.004010e0
lea eax, [esi + 2]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4019e7
push esi
push str.No_Python_at__ls
push 0x67
call fcn.004010e0
push 0x41f3f4
push edi
push esi
call fcn.00409a17
add esp, 0xc
push ebx
push 0x41f3f8
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x401a11
push str.Failed_to_set_launcher_environment
push eax
call fcn.004010e0
push dword [ebp - 0x1810]
mov ecx, esi
call fcn.004013f0
push ebx
call fcn.0040a493
add esp, 4
push str.Failed_to_get_module_name
push 0
call fcn.004010e0
push str.out_of_memory
push 0x68
call fcn.004010e0
int3