Function at 0x140009380
Capabilities:
Create directory
Get common file path
Get disk information
Query environment variable

Disassembly:
push r15
mov eax, 0x4038
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.14000f510
sub rsp, rax
mov r14, qword [rcx + 0x3068]
mov rsi, rcx
lea r13, [rsp + 0x30]
test r14, r14
je 0x14000946b
lea rcx, [0x14002503a]
call fcn.140009250
mov rcx, qword [rsi + 0x3068]
xor r8d, r8d
xor edx, edx
mov r14, rax
call fcn.140009f60
mov r12, rax
test rax, rax
je 0x1400096b8
lea r13, [rsp + 0x30]
mov rcx, rax
mov r8d, 0x1000
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rcx, r12
mov ebx, eax
call sub.msvcrt.dll_free
test ebx, ebx
je 0x140009680
mov rcx, r13
call fcn.14000a120
test eax, eax
je 0x140009590
cmp word [rsp + 0x34], 0x5c
jne 0x140009668
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jle 0x1400096a0
mov rcx, r13
call qword [sym.imp.msvcrt.dll__wcsdup]
mov r12, rax
test rax, rax
je 0x14000968c
lea rcx, [0x1400252f8]
mov rdx, r12
call qword [sym.imp.msvcrt.dll__wputenv_s]
mov rcx, r12
mov ebx, eax
call sub.msvcrt.dll_free
test ebx, ebx
jne 0x1400096dd
lea rdi, [rsp + 0x2030]
mov ecx, 0x1000
mov ebx, 5
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
call qword [sym.imp.msvcrt.dll__getpid]
lea r8, str._MEI_d
mov edx, 0x10
mov rcx, r13
mov r9d, eax
call fcn.140009220
mov rbp, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov r15, qword [sym.imp.msvcrt.dll__wtempnam]
mov rdx, r13
mov rcx, rdi
call r15
mov rdx, qword [rsi + 0x3038]
mov r12, rax
mov rcx, rax
call rbp
test eax, eax
jne 0x140009560
mov rcx, r12
call sub.msvcrt.dll_free
sub ebx, 1
jne 0x1400094b1
mov r13d, 0xffffffff
cmp qword [rsi + 0x3068], 0
je 0x14000950a
test r14, r14
je 0x140009528
lea rcx, [0x14002503a]
mov rdx, r14
call fcn.1400092e0
mov rcx, r14
call sub.msvcrt.dll_free
mov eax, r13d
add rsp, 0x4038
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
xor r8d, r8d
xor edx, edx
lea rcx, [0x14002503a]
call fcn.140009f60
lea rdx, [0x140025038]
mov r12, rax
mov rcx, rax
call qword [sym.imp.msvcrt.dll__wputenv_s]
mov rcx, r12
call sub.msvcrt.dll_free
jmp 0x14000950a
lea rdx, [rsi + 0x2022]
mov r8d, 0x1000
mov rcx, r12
xor r13d, r13d
call fcn.140009e70
test rax, rax
je 0x1400096c6
mov rcx, r12
call sub.msvcrt.dll_free
jmp 0x1400094e4
mov r8d, 0x1000
mov rdx, r13
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__wfullpath]
mov r12, rax
test rax, rax
je 0x1400096eb
mov edx, 0x5c
mov rcx, rax
call sub.msvcrt.dll_wcschr
mov rbp, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rbx, rax
test rax, rax
je 0x14000961c
mov rbp, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea rdi, [rsp + 0x2030]
lea r15, [0x140025266]
nop
mov r9, rbx
mov r8, r15
mov edx, 0x1000
mov rcx, rdi
sub r9, r12
mov qword [rsp + 0x20], r12
sar r9, 1
call qword [sym.imp.msvcrt.dll__snwprintf]
xor edx, edx
mov rcx, rdi
call rbp
lea rcx, [rbx + 2]
mov edx, 0x5c
call sub.msvcrt.dll_wcschr
mov rbx, rax
test rax, rax
jne 0x1400095e0
xor edx, edx
mov rcx, r12
call rbp
test eax, eax
jne 0x140009449
mov rbx, qword [sym.imp.KERNEL32.dll_GetLastError]
call rbx
cmp eax, 0xb7
je 0x140009449
call rbx
mov r9, r12
lea r8, str.LOADER:_failed_to_create_runtime_tmpdir_path__ls__n
lea rcx, str.CreateDirectory
mov edx, eax
call fcn.1400030c0
mov rcx, r12
call sub.msvcrt.dll_free
jmp 0x14000968c
lea rdx, [0x140025146]
mov rcx, r13
call sub.msvcrt.dll_wcscat
jmp 0x140009422
lea rcx, str.LOADER:_failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
call fcn.140002ef0
mov rcx, r14
mov r13d, 0xffffffff
call sub.msvcrt.dll_free
jmp 0x14000950a
mov r8d, eax
mov rdx, r13
lea rcx, str.LOADER:_runtime_tmpdir_points_to_non_existent_drive__ls__type:__d___n
call fcn.140002ef0
jmp 0x14000968c
lea rcx, [0x140025040]
call fcn.140002ef0
jmp 0x14000968c
lea rcx, str.LOADER:_length_of_teporary_directory_path_exceeds_maximum_path_length__n
mov r13d, 0xffffffff
call fcn.140002ef0
jmp 0x140009581
lea rcx, str.LOADER:_failed_to_set_the_TMP_environment_variable._n
call fcn.140002ef0
jmp 0x14000968c
lea rcx, str.LOADER:_failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
call fcn.140002ef0
jmp 0x14000968c