Function at 0x4075c0
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.0040d6b0
sub rsp, rax
cmp qword [rcx + 0x3040], 0
mov r12, rcx
je 0x407760
lea rcx, [0x00411c1a]
call fcn.004074a0
mov rcx, qword [r12 + 0x3040]
xor r8d, r8d
xor edx, edx
mov r14, rax
call fcn.00407f30
test rax, rax
mov rbx, rax
je 0x4078d0
lea rbp, [rsp + 0x30]
mov r8d, 0x1000
mov rcx, rax
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_free
test esi, esi
je 0x407894
mov rcx, rbp
call fcn.004080e0
test eax, eax
je 0x4077b0
cmp word [rsp + 0x34], 0x5c
jne 0x407880
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jle 0x4078b2
mov rcx, rbp
call qword [sym.imp.msvcrt.dll__wcsdup]
test rax, rax
mov rbx, rax
je 0x4078a0
lea rcx, [0x00411ed8]
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 0x407902
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_1]
lea r8, str._MEI_d
mov edx, 0x10
mov rcx, rbp
mov r9d, eax
call fcn.00407470
mov r13, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov r15, qword [sym.imp.msvcrt.dll__wtempnam]
mov rdx, rbp
mov rcx, rdi
call r15
mov rdx, qword [r12 + 0x3038]
mov rsi, rax
mov rcx, rax
call r13
test eax, eax
jne 0x407770
mov rcx, rsi
call sub.msvcrt.dll_free
sub ebx, 1
jne 0x4076eb
mov ebx, 0xffffffff
cmp qword [r12 + 0x3040], 0
je 0x407742
test r14, r14
je 0x4077a0
lea rcx, [0x00411c1a]
mov rdx, r14
call fcn.00407530
mov rcx, r14
call sub.msvcrt.dll_free
mov eax, ebx
add rsp, 0x4038
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rbp, [rsp + 0x30]
xor r14d, r14d
jmp 0x4076a5
lea rdx, [r12 + 0x2022]
mov r8d, 0x1000
mov rcx, rsi
call fcn.00407e40
xor ebx, ebx
test rax, rax
je 0x4078de
mov rcx, rsi
call sub.msvcrt.dll_free
jmp 0x40771b
lea rcx, [0x00411c1a]
call fcn.00407580
jmp 0x407742
xor ecx, ecx
mov r8d, 0x1000
mov rdx, rbp
call qword [sym.imp.msvcrt.dll__wfullpath]
test rax, rax
mov rbx, rax
je 0x4078f4
mov edx, 0x5c
mov rcx, rax
call sub.msvcrt.dll_wcschr
mov r13, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test rax, rax
mov r15, rax
je 0x40783d
mov r13, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea rdi, [rsp + 0x2030]
lea rsi, str._.s
nop
mov r9, r15
mov r8, rsi
mov edx, 0x1000
mov qword [rsp + 0x20], rbx
sub r9, rbx
mov rcx, rdi
sar r9, 1
call qword [sym.imp.msvcrt.dll__snwprintf]
xor edx, edx
mov rcx, rdi
call r13
lea rcx, [r15 + 2]
mov edx, 0x5c
call sub.msvcrt.dll_wcschr
test rax, rax
mov r15, rax
jne 0x407800
xor edx, edx
mov rcx, rbx
call r13
test eax, eax
jne 0x407683
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x407683
lea rdx, str.LOADER:_failed_to_create_runtime_tmpdir_path__ls__n
mov r8, rbx
lea rcx, str.CreateDirectory
call fcn.00402230
mov rcx, rbx
call sub.msvcrt.dll_free
jmp 0x4078a0
lea rdx, [0x00411d26]
mov rcx, rbp
call sub.msvcrt.dll_wcscat
jmp 0x40765c
lea rcx, str.LOADER:_failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
call fcn.00402130
mov rcx, r14
mov ebx, 0xffffffff
call sub.msvcrt.dll_free
jmp 0x407742
lea rcx, str.LOADER:_runtime_tmpdir_points_to_non_existent_drive__ls__type:__d___n
mov r8d, eax
mov rdx, rbp
call fcn.00402130
jmp 0x4078a0
lea rcx, [0x00411c20]
call fcn.00402130
jmp 0x4078a0
lea rcx, str.LOADER:_length_of_teporary_directory_path_exceeds_maximum_path_length__n
mov ebx, 0xffffffff
call fcn.00402130
jmp 0x407791
lea rcx, str.LOADER:_failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
call fcn.00402130
jmp 0x4078a0
lea rcx, str.LOADER:_failed_to_set_the_TMP_environment_variable._n
call fcn.00402130
jmp 0x4078a0