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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rbx, qword [fcn.004053d0]
mov qword [rsp + 0x98], rdx
mov esi, ecx
mov ecx, 2
call rbx
xor r9d, r9d
xor edx, edx
mov r8d, 4
mov rcx, rax
call sub.msvcrt.dll_setvbuf
lea rcx, str.PYLAUNCH_DEBUG
call fcn.00401d90
test rax, rax
je 0x403666
cmp word [rax], 0
jne 0x403a50
lea rcx, str.launcher_build:_64bit_n
lea r12, [0x0044c600]
call fcn.004015a0
lea rcx, str.launcher_executable:_Console_n
call fcn.004015a0
mov edx, 0x1c
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], r12
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov edx, eax
test eax, eax
je 0x403a08
lea rcx, str.SHGetFolderPath_failed:__X_n
call fcn.004015a0
xor r10d, r10d
mov word [0x0044c600], r10w
mov rbx, qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov rbp, qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 0x104
jmp 0x4036e9
call rbp
cmp eax, 0x7a
jne 0x403715
mov rcx, r12
add edi, edi
call sub.msvcrt.dll_free
mov ecx, edi
add rcx, rcx
call sub.msvcrt.dll_malloc
mov r12, rax
test rax, rax
je 0x403ba0
xor ecx, ecx
mov r8d, edi
mov rdx, rax
call rbx
test eax, eax
je 0x403bb8
cmp edi, eax
je 0x4036d8
mov rdi, qword [sym.imp.msvcrt.dll_wcscpy_s]
mov r8, r12
mov edx, 0x104
mov dword [0x0040cc64], 0
mov dword [0x0040cc60], 1
lea rcx, [0x0044c3e0]
call rdi
test eax, eax
jne 0x403c9d
mov edx, 0x5c
lea rcx, [0x0044c3e0]
call sub.msvcrt.dll_wcsrchr
test rax, rax
je 0x403ad0
xor ecx, ecx
mov edx, 0x104
lea r8, str.py.ini
mov word [rax], cx
lea rcx, [0x0044c3e0]
call qword [sym.imp.msvcrt.dll_wcscat_s]
lea rcx, [0x0044c3e0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea rdx, [0x0044c3e0]
cmp eax, 0xffffffff
je 0x403af8
lea rcx, str.Using_global_configuration_file__ls_n
call fcn.004015a0
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edx, 0x20
cmp word [rax], 0x22
mov rcx, rax
jne 0x4037c7
add rcx, 2
mov edx, 0x22
call sub.msvcrt.dll_wcschr
lea r12, [0x004089c0]
test rax, rax
je 0x403805
movzx ecx, word [rax + 2]
mov rbp, qword [sym.imp.msvcrt.dll_isspace]
lea r12, [rax + 2]
test cx, cx
jne 0x4037ff
jmp 0x403805
movzx ecx, word [r12 + 2]
add r12, 2
test cx, cx
je 0x403805
call rbp
test eax, eax
jne 0x4037f0
mov rdx, r12
lea rcx, str.Called_with_command_line:__ls_n
call fcn.004015a0
xor edx, edx
lea rcx, str.__PYVENV_LAUNCHER__
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov r8d, 0x104
lea rdx, [0x0044c1c0]
xor ecx, ecx
call rbx
lea rcx, [0x0044c1c0]
mov edx, 0x2e
call sub.msvcrt.dll_wcsrchr
mov rcx, rax
test rax, rax
je 0x403c52
lea rbp, [0x0044c1c0]
mov rdx, rax
mov r9, 0xffffffffffffffff
sub rdx, rbp
lea r8, str._script.py
sar rdx, 1
neg rdx
add rdx, 0x105
call qword [sym.imp.msvcrt.dll_wcsncpy_s]
mov r15, qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov rcx, rbp
call r15
mov rdx, rbp
cmp eax, 0xffffffff
je 0x403c7d
lea rcx, str.Using_wrapped_script_file__ls_n
call fcn.004015a0
mov edx, 0x20
mov rcx, rbp
call sub.msvcrt.dll_wcsrchr
mov rcx, rbp
mov r14, rax
call sub.msvcrt.dll_wcslen
mov rcx, r12
mov rbx, rax
call sub.msvcrt.dll_wcslen
xor edx, edx
test r14, r14
lea eax, [rbx + rax + 2]
setne dl
lea edx, [rax + rdx*2]
movsxd r13, edx
lea rcx, [r13 + r13]
call sub.msvcrt.dll_malloc
mov rbx, rax
test rax, rax
je 0x403c41
xor eax, eax
mov word [rbx], ax
test r14, r14
jne 0x403a98
mov rdi, qword [sym.imp.msvcrt.dll_wcscat_s]
mov r8, rbp
mov rdx, r13
mov rcx, rbx
call rdi
lea r8, [0x00408e84]
mov rdx, r13
mov rcx, rbx
call rdi
mov r8, r12
mov rdx, r13
mov rcx, rbx
call rdi
mov rdx, rbx
lea rcx, [0x00408e88]
call fcn.004015a0
cmp word [0x0044c3e0], 0
jne 0x403a80
cmp word [0x0044c600], 0
jne 0x403a68
lea rcx, [rsp + 0x30]
mov rdx, rbx
mov qword [rsp + 0x30], rbp
mov qword [rsp + 0x38], 0
call fcn.00402ad0
cmp esi, 2
je 0x403b38
lea rcx, str.VIRTUAL_ENV
call fcn.00401d90
mov rsi, rax
test rax, rax
je 0x403be0
cmp word [rax], 0
je 0x403be0
mov rdx, rax
lea rcx, str.Checking_for_Python_executable_in_virtual_env__ls_n
call fcn.004015a0
mov edx, 0x104
mov qword [rsp + 0x20], rsi
lea rax, str.python.exe
lea r9, str._lsScripts_ls
mov r8, 0xffffffffffffffff
mov qword [rsp + 0x28], rax
lea rcx, [0x0040c840]
call qword [sym.imp.msvcrt.dll__snwprintf_s]
lea rcx, [0x0040c840]
call r15
lea r9, [0x0040c840]
cmp eax, 0xffffffff
je 0x403bd0
mov r8, rbx
xor edx, edx
mov rcx, r9
call fcn.00402100
nop dword [rax]
mov edx, 0x104
mov r9, 0xffffffffffffffff
lea r8, str.py.ini
mov rcx, r12
call qword [sym.imp.msvcrt.dll_wcsncat_s]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov rdx, r12
cmp eax, 0xffffffff
je 0x403b18
lea rcx, str.Using_local_configuration_file__ls_n
call fcn.004015a0
jmp 0x4036be
mov ecx, 2
call rbx
mov qword [0x004597f0], rax
jmp 0x403666
lea rcx, [0x0044c600]
call fcn.004028e0
jmp 0x403954
lea rcx, [0x0044c3e0]
call fcn.004028e0
jmp 0x403946
mov rdx, r13
mov rcx, rbx
lea r8, [0x00408e80]
call rdi
mov r8, rbp
mov rdx, r13
mov rcx, rbx
mov rdi, qword [sym.imp.msvcrt.dll_wcscat_s]
call rdi
lea r8, [0x00408e80]
mov rdx, r13
mov rcx, rbx
call rdi
jmp 0x40390f
lea rdx, [0x0044c3e0]
lea rcx, str.GetModuleFileNameW_returned_value_has_no_backslash:__ls_n
call fcn.004015a0
xor r8d, r8d
mov word [0x0044c3e0], r8w
jmp 0x4037aa
lea rcx, str.File__ls_non_existent_n
call fcn.004015a0
xor edx, edx
mov word [0x0044c3e0], dx
jmp 0x4037aa
lea rcx, str.File__ls_non_existent_n
call fcn.004015a0
xor r9d, r9d
mov word [0x0044c600], r9w
jmp 0x4036be
mov rsi, qword [sym.imp.msvcrt.dll__wcsicmp]
lea rdx, [0x00408f00]
mov rcx, r14
call rsi
test eax, eax
je 0x403b90
lea rdx, str.__help
mov rcx, r14
call rsi
test eax, eax
je 0x403b90
lea rdx, [0x00409072]
mov rcx, r14
call rsi
test eax, eax
jne 0x403c00
mov eax, 0x67
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [rsp + 0x98]
call fcn.00402200
jmp 0x403b5f
lea rdx, str.out_of_memory
mov ecx, 0x68
call fcn.00401ca0
nop dword [rax]
mov rcx, r12
call sub.msvcrt.dll_free
lea rdx, str.Failed_to_get_module_name
xor ecx, ecx
call fcn.00401ca0
nop
mov rdx, r9
lea rcx, str.Python_executable__ls_missing_from_virtual_env_n
call fcn.004015a0
nop
xor edx, edx
lea rcx, [0x004089c0]
call fcn.00402480
test rax, rax
je 0x403cae
lea r9, [rax + 0xc]
jmp 0x4039f4
lea rdx, str.__list
mov rcx, r14
call rsi
test eax, eax
je 0x403b73
lea rdx, [0x00408f22]
mov rcx, r14
call rsi
test eax, eax
je 0x403b73
lea rdx, str.__list_paths
mov rcx, r14
call rsi
test eax, eax
je 0x403b73
jmp 0x403978
lea rdx, str.Could_not_allocate_new_command_line
mov ecx, 0x68
call fcn.00401ca0
lea rdx, [0x0044c1c0]
lea rcx, str.GetModuleFileNameW_returned_value_has_no_extension:__ls_n
call fcn.004015a0
lea r8, [0x0044c1c0]
mov ecx, 0x69
lea rdx, str.Wrapper_name__ls_is_not_valid.
call fcn.00401ca0
lea rcx, str.File__ls_non_existent_n
call fcn.004015a0
mov r8, rbp
mov ecx, 0x69
lea rdx, str.Script_file__ls_is_not_present.
call fcn.00401ca0
lea rdx, str.Failed_to_copy_module_name
mov ecx, 0x68
call fcn.00401ca0
lea rdx, str.Cant_find_a_default_Python.
mov ecx, 0x67
call fcn.00401ca0
nop
sub rsp, 0x28
mov rax, qword [0x00406240]
mov rax, qword [rax]
test rax, rax
je 0x403cf5
nop dword [rax + rax]
call rax
mov rax, qword [0x00406240]
lea rdx, [rax + 8]
mov rax, qword [rax + 8]
mov qword [0x00406240], rdx
test rax, rax
jne 0x403cd8
add rsp, 0x28
ret