Function at 0x140007ae0
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.14000de60
sub rsp, rax
mov r14, qword [rcx + 0x3040]
lea r12, [rsp + 0x30]
test r14, r14
mov rdi, rcx
je 0x140007bcb
lea rcx, [0x140019c2a]
call fcn.1400079c0
mov rcx, qword [rdi + 0x3040]
xor r8d, r8d
xor edx, edx
mov r14, rax
call fcn.140008490
test rax, rax
mov rbx, rax
je 0x140007e08
lea r12, [rsp + 0x30]
mov r8d, 0x1000
mov rcx, rax
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_free
test esi, esi
je 0x140007dc8
mov rcx, r12
call fcn.140008660
test eax, eax
je 0x140007ce0
cmp word [rsp + 0x34], 0x5c
jne 0x140007db0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jle 0x140007df0
mov rcx, r12
call qword [sym.imp.msvcrt.dll__wcsdup_1]
test rax, rax
mov rbx, rax
je 0x140007dd4
lea rcx, [0x140019ee8]
mov rdx, rbx
call qword [sym.imp.msvcrt.dll__wputenv_s]
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_free
test esi, esi
jne 0x140007e2c
lea rbp, [rsp + 0x2030]
mov ecx, 0x1000
mov esi, 5
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
call qword [sym.imp.msvcrt.dll__getpid]
lea r8, str._MEI_d
mov edx, 0x10
mov rcx, r12
mov r9d, eax
call fcn.140007990
mov r13, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov r15, qword [sym.imp.msvcrt.dll__wtempnam]
mov rdx, r12
mov rcx, rbp
call r15
mov rdx, qword [rdi + 0x3038]
mov rbx, rax
mov rcx, rax
call r13
test eax, eax
jne 0x140007cb0
mov rcx, rbx
call sub.msvcrt.dll_free
sub esi, 1
jne 0x140007c11
mov esi, 0xffffffff
cmp qword [rdi + 0x3040], 0
je 0x140007c6a
test r14, r14
je 0x140007c80
lea rcx, [0x140019c2a]
mov rdx, r14
call fcn.140007a50
mov rcx, r14
call sub.msvcrt.dll_free
mov eax, esi
add rsp, 0x4038
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [0x140019c2a]
xor r8d, r8d
xor edx, edx
call fcn.140008490
lea rdx, [0x140019c28]
mov rbx, rax
mov rcx, rax
call qword [sym.imp.msvcrt.dll__wputenv_s]
mov rcx, rbx
call sub.msvcrt.dll_free
jmp 0x140007c6a
lea rdx, [rdi + 0x2022]
mov r8d, 0x1000
mov rcx, rbx
call fcn.140008390
xor esi, esi
test rax, rax
je 0x140007e16
mov rcx, rbx
call sub.msvcrt.dll_free
jmp 0x140007c44
xor ecx, ecx
mov r8d, 0x1000
mov rdx, r12
call qword [sym.imp.msvcrt.dll__wfullpath]
test rax, rax
mov rbx, rax
je 0x140007e3a
mov edx, 0x5c
mov rcx, rax
call sub.msvcrt.dll_wcschr
mov r13, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test rax, rax
mov rsi, rax
je 0x140007d6e
mov r15, qword [sym.imp.msvcrt.dll__snwprintf]
lea rbp, [rsp + 0x2030]
mov r13, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
nop
mov r9, rsi
mov edx, 0x1000
mov rcx, rbp
mov qword [rsp + 0x20], rbx
lea r8, [0x140019e56]
sub r9, rbx
sar r9, 1
call r15
xor edx, edx
mov rcx, rbp
call r13
lea rcx, [rsi + 2]
mov edx, 0x5c
call sub.msvcrt.dll_wcschr
test rax, rax
mov rsi, rax
jne 0x140007d30
xor edx, edx
mov rcx, rbx
call r13
test eax, eax
jne 0x140007ba9
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140007ba9
lea rdx, str.LOADER:_failed_to_create_runtime_tmpdir_path__ls__n
mov r8, rbx
lea rcx, str.CreateDirectory
call fcn.140002b70
mov rcx, rbx
call sub.msvcrt.dll_free
jmp 0x140007dd4
lea rdx, [0x140019d36]
mov rcx, r12
call sub.msvcrt.dll_wcscat
jmp 0x140007b82
lea rcx, str.LOADER:_failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
call fcn.1400029e0
mov rcx, r14
mov esi, 0xffffffff
call sub.msvcrt.dll_free
jmp 0x140007c6a
lea rcx, str.LOADER:_runtime_tmpdir_points_to_non_existent_drive__ls__type:__d___n
mov r8d, eax
mov rdx, r12
call fcn.1400029e0
jmp 0x140007dd4
lea rcx, [0x140019c30]
call fcn.1400029e0
jmp 0x140007dd4
lea rcx, str.LOADER:_length_of_teporary_directory_path_exceeds_maximum_path_length__n
mov esi, 0xffffffff
call fcn.1400029e0
jmp 0x140007cd0
lea rcx, str.LOADER:_failed_to_set_the_TMP_environment_variable._n
call fcn.1400029e0
jmp 0x140007dd4
lea rcx, str.LOADER:_failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
call fcn.1400029e0
jmp 0x140007dd4