Function at 0x4038c0
Capabilities:
Accept command line arguments
Check if file exists
Get common file path
Get file attributes
Set environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [sym.imp.msvcrt.dll___wargv]
mov ebx, dword [fcn.00405210]
mov eax, dword [eax]
mov dword [esp + 0x28], eax
mov eax, dword [sym.imp.msvcrt.dll___argc]
mov eax, dword [eax]
mov dword [esp], 2
mov dword [esp + 0x20], eax
call ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_setvbuf
mov eax, str.PYLAUNCH_DEBUG
call fcn.00401e50
test eax, eax
je 0x403924
cmp word [eax], 0
jne 0x403c70
mov dword [esp], str.launcher_build:_32bit_n
call fcn.00401620
mov dword [esp], str.launcher_executable:_Windows_n
call fcn.00401620
mov dword [esp + 0x10], 0x44b600
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x1c
mov dword [esp], 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
sub esp, 0x14
test eax, eax
je 0x403c10
mov dword [esp + 4], eax
mov dword [esp], str.SHGetFolderPath_failed:__X_n
call fcn.00401620
xor eax, eax
mov word [0x44b600], ax
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edi, 0x104
jmp 0x4039b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4039ea
mov dword [esp], ebp
mov edi, esi
call sub.msvcrt.dll_free
lea esi, [edi + edi]
mov dword [esp], esi
call sub.msvcrt.dll_malloc
mov ebp, eax
test eax, eax
je 0x403f40
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], 0
call ebx
sub esp, 0xc
test eax, eax
je 0x403f20
cmp edi, eax
je 0x4039a0
mov dword [esp + 8], ebp
mov ebp, dword [sym.imp.msvcrt.dll_wcscpy_s]
mov dword [0x40bc64], 0
mov dword [0x40bc60], 1
mov dword [esp + 4], 0x104
mov dword [esp], 0x44b3e0
call ebp
test eax, eax
jne 0x404008
mov dword [esp + 4], 0x5c
mov dword [esp], 0x44b3e0
call sub.msvcrt.dll_wcsrchr
test eax, eax
je 0x403df0
xor esi, esi
mov word [eax], si
mov dword [esp + 8], str.py.ini
mov dword [esp + 4], 0x104
mov dword [esp], 0x44b3e0
call dword [sym.imp.msvcrt.dll_wcscat_s]
mov dword [esp], 0x44b3e0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
sub esp, 4
mov dword [esp + 4], 0x44b3e0
cmp eax, 0xffffffff
je 0x403e70
mov dword [esp], str.Using_global_configuration_file__ls_n
call fcn.00401620
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edx, 0x20
cmp word [eax], 0x22
jne 0x403aa5
add eax, 2
mov edx, 0x22
mov dword [esp + 4], edx
mov esi, 0x4089b8
mov dword [esp], eax
call sub.msvcrt.dll_wcschr
test eax, eax
je 0x403ae5
lea esi, [eax + 2]
movzx eax, word [eax + 2]
mov edi, dword [sym.imp.msvcrt.dll_isspace]
test ax, ax
jne 0x403adc
jmp 0x403ae5
movzx eax, word [esi + 2]
add esi, 2
test ax, ax
je 0x403ae5
mov dword [esp], eax
call edi
test eax, eax
jne 0x403ad0
mov dword [esp + 4], esi
mov dword [esp], str.Called_with_command_line:__ls_n
call fcn.00401620
mov dword [esp + 4], 0
mov dword [esp], str.__PYVENV_LAUNCHER__
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
sub esp, 8
mov dword [esp + 8], 0x104
mov dword [esp + 4], 0x44b1c0
mov dword [esp], 0
call ebx
sub esp, 0xc
mov dword [esp + 4], 0x2e
mov dword [esp], 0x44b1c0
call sub.msvcrt.dll_wcsrchr
test eax, eax
je 0x40401c
mov edx, eax
mov dword [esp + 0xc], 0xffffffff
sub edx, 0x44b1c0
mov dword [esp + 8], str._script.pyw
sar edx, 1
mov dword [esp], eax
neg edx
add edx, 0x105
mov dword [esp + 4], edx
call dword [sym.imp.msvcrt.dll_wcsncpy_s]
mov eax, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [esp], 0x44b1c0
mov dword [esp + 0x2c], eax
call eax
sub esp, 4
mov dword [esp + 4], 0x44b1c0
cmp eax, 0xffffffff
je 0x403fe0
mov dword [esp], str.Using_wrapped_script_file__ls_n
call fcn.00401620
mov dword [esp + 4], 0x20
mov dword [esp], 0x44b1c0
call sub.msvcrt.dll_wcsrchr
mov dword [esp + 0x24], eax
test eax, eax
je 0x403e18
mov dword [esp], 0x44b1c0
call sub.msvcrt.dll_wcslen
mov dword [esp], esi
mov ebx, eax
call sub.msvcrt.dll_wcslen
lea edi, [ebx + eax + 4]
lea eax, [edi + edi]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov ebx, eax
test eax, eax
jne 0x403c88
mov dword [esp + 4], str.Could_not_allocate_new_command_line
mov dword [esp], 0x68
call fcn.00401d50
lea esi, [esi]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], str.py.ini
mov dword [esp + 4], 0x104
mov dword [esp], 0x44b600
call dword [sym.imp.msvcrt.dll_wcsncat_s]
mov dword [esp], 0x44b600
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
sub esp, 4
mov dword [esp + 4], 0x44b600
cmp eax, 0xffffffff
je 0x403e90
mov dword [esp], str.Using_local_configuration_file__ls_n
call fcn.00401620
jmp 0x40398c
mov dword [esp], 2
call ebx
mov dword [0x4587f0], eax
jmp 0x403924
xor eax, eax
mov word [ebx], ax
mov dword [esp + 8], 0x40904c
mov dword [esp + 4], edi
mov dword [esp], ebx
call ebp
mov dword [esp + 4], edi
mov ebp, dword [sym.imp.msvcrt.dll_wcscat_s]
mov dword [esp + 8], 0x44b1c0
mov dword [esp], ebx
call ebp
mov dword [esp + 8], 0x40904c
mov dword [esp + 4], edi
mov dword [esp], ebx
call ebp
mov dword [esp + 8], 0x408e60
mov dword [esp + 4], edi
mov dword [esp], ebx
call ebp
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], ebx
call ebp
mov dword [esp + 4], ebx
mov dword [esp], 0x408e64
call fcn.00401620
cmp word [0x44b3e0], 0
jne 0x403dc0
cmp word [0x44b600], 0
jne 0x403dd8
mov edx, ebx
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 0x44b1c0
mov dword [esp + 0x3c], 0
call fcn.00402ce0
cmp dword [esp + 0x20], 2
je 0x403eb0
mov eax, str.VIRTUAL_ENV
call fcn.00401e50
mov esi, eax
test eax, eax
je 0x403f70
cmp word [eax], 0
je 0x403f70
mov dword [esp + 4], eax
mov dword [esp], str.Checking_for_Python_executable_in_virtual_env__ls_n
call fcn.00401620
mov dword [esp + 0x14], str.pythonw.exe
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str._lsScripts_ls
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0x104
mov dword [esp], 0x40b840
call dword [sym.imp.msvcrt.dll__snwprintf_s]
mov dword [esp], 0x40b840
mov eax, dword [esp + 0x2c]
call eax
mov edx, eax
sub esp, 4
mov eax, 0x40b840
cmp edx, 0xffffffff
je 0x403f58
mov ecx, ebx
xor edx, edx
call fcn.00402270
nop
mov eax, 0x44b3e0
call fcn.00402ab0
cmp word [0x44b600], 0
je 0x403d10
mov eax, 0x44b600
call fcn.00402ab0
jmp 0x403d10
mov dword [esp + 4], 0x44b3e0
xor edi, edi
mov dword [esp], str.GetModuleFileNameW_returned_value_has_no_backslash:__ls_n
call fcn.00401620
mov word [0x44b3e0], di
jmp 0x403a8c
mov dword [esp], 0x44b1c0
call sub.msvcrt.dll_wcslen
mov dword [esp], esi
mov ebx, eax
call sub.msvcrt.dll_wcslen
lea edi, [ebx + eax + 2]
lea eax, [edi + edi]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov ebx, eax
test eax, eax
je 0x403bf5
xor edx, edx
mov ebp, dword [sym.imp.msvcrt.dll_wcscat_s]
mov word [ebx], dx
mov dword [esp + 8], 0x44b1c0
mov dword [esp + 4], edi
mov dword [esp], ebx
call ebp
jmp 0x403cc6
mov dword [esp], str.File__ls_non_existent_n
call fcn.00401620
xor ecx, ecx
mov word [0x44b3e0], cx
jmp 0x403a8c
mov dword [esp], str.File__ls_non_existent_n
xor ebp, ebp
call fcn.00401620
mov word [0x44b600], bp
jmp 0x40398c
mov eax, dword [esp + 0x24]
mov dword [esp + 4], 0x408edc
mov esi, dword [sym.imp.msvcrt.dll__wcsicmp]
mov dword [esp], eax
call esi
test eax, eax
je 0x403f10
mov eax, dword [esp + 0x24]
mov dword [esp + 4], str.__help
mov dword [esp], eax
call esi
test eax, eax
je 0x403f10
mov eax, dword [esp + 0x24]
mov dword [esp + 4], 0x409046
mov dword [esp], eax
call esi
test eax, eax
jne 0x403f90
add esp, 0x4c
mov eax, 0x67
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov eax, dword [esp + 0x28]
call fcn.00402380
jmp 0x403ee0
mov dword [esp], ebp
call sub.msvcrt.dll_free
mov dword [esp + 4], str.Failed_to_get_module_name
mov dword [esp], 0
call fcn.00401d50
lea esi, [esi]
mov dword [esp + 4], str.out_of_memory
mov dword [esp], 0x68
call fcn.00401d50
lea esi, [esi]
mov dword [esp + 4], eax
mov dword [esp], str.Python_executable__ls_missing_from_virtual_env_n
call fcn.00401620
lea esi, [esi]
nop
xor edx, edx
mov eax, 0x4089b8
call fcn.00402660
test eax, eax
je 0x40404c
add eax, 0xc
jmp 0x403db5
mov eax, dword [esp + 0x24]
mov dword [esp + 4], str.__list
mov dword [esp], eax
call esi
test eax, eax
je 0x403ef9
mov eax, dword [esp + 0x24]
mov dword [esp + 4], 0x408efe
mov dword [esp], eax
call esi
test eax, eax
je 0x403ef9
mov eax, dword [esp + 0x24]
mov dword [esp + 4], str.__list_paths
mov dword [esp], eax
call esi
test eax, eax
je 0x403ef9
jmp 0x403d36
mov dword [esp], str.File__ls_non_existent_n
call fcn.00401620
mov dword [esp + 8], 0x44b1c0
mov dword [esp + 4], str.Script_file__ls_is_not_present.
mov dword [esp], 0x69
call fcn.00401d50
mov dword [esp + 4], str.Failed_to_copy_module_name
mov dword [esp], 0x68
call fcn.00401d50
mov dword [esp + 4], 0x44b1c0
mov dword [esp], str.GetModuleFileNameW_returned_value_has_no_extension:__ls_n
call fcn.00401620
mov dword [esp + 8], 0x44b1c0
mov dword [esp + 4], str.Wrapper_name__ls_is_not_valid.
mov dword [esp], 0x69
call fcn.00401d50
mov dword [esp + 4], str.Cant_find_a_default_Python.
mov dword [esp], 0x67
call fcn.00401d50
mov eax, dword [0x4061e0]
mov eax, dword [eax]
test eax, eax
je 0x404090
sub esp, 0xc
nop
call eax
mov eax, dword [0x4061e0]
lea edx, [eax + 4]
mov eax, dword [eax + 4]
mov dword [0x4061e0], edx
test eax, eax
jne 0x404070
add esp, 0xc
ret
ret