Function at 0x1400076e0
Capabilities:
Create directory
Get common file path
Query environment variable
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
mov eax, 0x4028
call fcn.14000ec9c
sub rsp, rax
mov rdi, rdx
mov rbx, rcx
test rdx, rdx
je 0x140007777
lea rcx, [0x14001a470]
call fcn.1400075b0
mov rsi, rax
xor r14d, r14d
xor ecx, ecx
mov rdx, rdi
xor r8d, r8d
call fcn.140008880
test rax, rax
je 0x14000791a
mov r15, rax
lea rdx, [rsp + 0x20]
mov rcx, rax
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebp, eax
mov rcx, r15
call sub.msvcrt.dll_free
test ebp, ebp
je 0x14000792b
lea rcx, [rsp + 0x20]
call fcn.140008c80
test eax, eax
je 0x14000794f
lea rcx, [rsp + 0x20]
call qword [sym.imp.msvcrt.dll__wcsdup]
jmp 0x140007962
xor esi, esi
lea r14, [rsp + 0x20]
mov ecx, 0x1000
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
call sub.msvcrt.dll__getpid
lea r15, [rsp + 0x2020]
mov rcx, r15
mov r9d, eax
call fcn.140007a50
mov rcx, r14
mov rdx, r15
call qword [sym.imp.msvcrt.dll__wtempnam]
mov r14, rax
mov rcx, rax
call fcn.140008bc0
test eax, eax
je 0x1400078a8
mov rcx, r14
call sub.msvcrt.dll_free
lea rcx, [rsp + 0x20]
lea rdx, [rsp + 0x2020]
call qword [sym.imp.msvcrt.dll__wtempnam]
mov r14, rax
mov rcx, rax
call fcn.140008bc0
test eax, eax
je 0x1400078a8
mov rcx, r14
call sub.msvcrt.dll_free
lea rcx, [rsp + 0x20]
lea rdx, [rsp + 0x2020]
call qword [sym.imp.msvcrt.dll__wtempnam]
mov r14, rax
mov rcx, rax
call fcn.140008bc0
test eax, eax
je 0x1400078a8
mov rcx, r14
call sub.msvcrt.dll_free
lea rcx, [rsp + 0x20]
lea rdx, [rsp + 0x2020]
call qword [sym.imp.msvcrt.dll__wtempnam]
mov r14, rax
mov rcx, rax
call fcn.140008bc0
test eax, eax
je 0x1400078a8
mov rcx, r14
call sub.msvcrt.dll_free
lea rcx, [rsp + 0x20]
lea rdx, [rsp + 0x2020]
call qword [sym.imp.msvcrt.dll__wtempnam]
mov r14, rax
mov rcx, rax
call fcn.140008bc0
test eax, eax
je 0x1400078a8
mov rcx, r14
call sub.msvcrt.dll_free
test rdi, rdi
je 0x140007a29
lea rdx, [0x14001a470]
xor r14d, r14d
xor ecx, ecx
xor r8d, r8d
call fcn.140008880
mov rdi, rax
test rsi, rsi
jne 0x1400078e9
xor r14d, r14d
jmp 0x140007937
mov r8d, 0x1000
mov rcx, rbx
mov rdx, r14
call fcn.140008630
mov rcx, r14
call sub.msvcrt.dll_free
mov r14d, 1
test rdi, rdi
je 0x140007a2c
lea rdx, [0x14001a470]
xor ecx, ecx
xor r8d, r8d
call fcn.140008880
mov rdi, rax
test rsi, rsi
je 0x140007937
xor ecx, ecx
mov rdx, rsi
xor r8d, r8d
call fcn.140008880
mov rbx, rax
mov rcx, rdi
mov rdx, rax
call qword [sym.imp.msvcrt.dll__wputenv_s]
mov rcx, rdi
call sub.msvcrt.dll_free
mov rcx, rbx
call sub.msvcrt.dll_free
mov rcx, rsi
jmp 0x140007945
lea rcx, str.LOADER:_Failed_to_convert_runtime_tmpdir_to_a_wide_string._n
call fcn.140002930
jmp 0x140007a2c
lea rcx, str.LOADER:_Failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
jmp 0x140007a24
mov rcx, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rdi
call sub.msvcrt.dll_free
jmp 0x140007a2c
lea rdx, [rsp + 0x20]
mov r8d, 0x1000
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__wfullpath]
mov r14, rax
test rax, rax
je 0x140007a1d
lea rcx, [rsp + 0x2020]
mov r8d, 0x2000
xor edx, edx
call sub.msvcrt.dll_memset
mov rcx, r14
mov dx, 0x5c
call sub.msvcrt.dll_wcschr
test rax, rax
je 0x1400079e7
mov r15, rax
lea r12, [rsp + 0x2020]
mov r13, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
nop word cs:[rax + rax]
mov r8, r15
sub r8, r14
sar r8, 1
inc r8
mov rcx, r12
mov rdx, r14
call sub.msvcrt.dll_wcsncpy
mov rcx, r12
xor edx, edx
call r13
add r15, 2
mov rcx, r15
mov dx, 0x5c
call sub.msvcrt.dll_wcschr
mov r15, rax
test rax, rax
jne 0x1400079b0
mov rcx, r14
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea rcx, [0x14001a474]
mov rdx, r14
call qword [sym.imp.msvcrt.dll__wputenv_s]
mov ebp, eax
mov rcx, r14
call sub.msvcrt.dll_free
test ebp, ebp
je 0x140007779
lea rcx, str.LOADER:_Failed_to_set_the_TMP_environment_variable._n
jmp 0x140007a24
lea rcx, str.LOADER:_Failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
call fcn.140002930
xor r14d, r14d
mov eax, r14d
add rsp, 0x4028
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret