Function at 0x14002b1e8
Capabilities:
Create directory
Delete file
Query environment variable
Read file on windows
Set file attributes
Set registry value
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
push rbp
push r14
push r15
lea rbp, [rax - 0x19e8]
mov eax, 0x1ad0
call fcn.140037090
sub rsp, rax
mov rax, qword [0x14004ffa8]
xor rax, rsp
mov qword [rbp + 0x19c0], rax
mov ebx, 0x208
lea rcx, [rbp + 0x180]
mov r8d, ebx
xor edx, edx
mov r14d, 0x80004005
call sub.msvcrt.dll_memset
mov r8d, ebx
lea rcx, [rsp + 0x70]
xor edx, edx
call sub.msvcrt.dll_memset
or r12, 0xffffffffffffffff
lea rcx, [rsp + 0x60]
xor r15d, r15d
mov rdi, r12
mov qword [rsp + 0x58], r15
mov rsi, r12
call qword [sym.imp.ole32.dll_CoCreateGuid]
test eax, eax
js 0x14002b58a
lea r8d, [r15 + 0x27]
lea rdx, [rbp + 0x180]
lea rcx, [rsp + 0x60]
call qword [sym.imp.ole32.dll_StringFromGUID2]
cmp eax, 0x27
jne 0x14002b58a
mov ebx, 0x104
lea r8, str..dat
mov edx, ebx
lea rcx, [rbp + 0x180]
call fcn.1400064f4
mov r8d, ebx
lea rdx, [rbp + 0x390]
lea rcx, str._LocalAppData_MicrosoftInkHWRCustomization
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x103
ja 0x14002b58a
lea rax, [rbp + 0x180]
mov edx, ebx
lea r9, [rbp + 0x390]
mov qword [rsp + 0x20], rax
lea r8, str._s_s
lea rcx, [rsp + 0x70]
call fcn.1400065c4
test eax, eax
jne 0x14002b58a
mov qword [rsp + 0x30], r15
lea rcx, [0x140051420]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, r12
je 0x14002b58a
mov qword [rsp + 0x30], r15
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, r12
jne 0x14002b3bd
xor r8d, r8d
lea rdx, [rbp + 0x390]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
jne 0x14002b58a
mov qword [rsp + 0x30], r15
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, r12
je 0x14002b58a
mov edx, 0x2000
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], r15
mov r8d, 0x20
lea rdx, [rbp + 0x9c0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14002b58a
cmp dword [rsp + 0x50], 0x20
jmp 0x14002b430
mov r8d, dword [rsp + 0x50]
test r8d, r8d
je 0x14002b45a
lea r9, [rsp + 0x54]
mov qword [rsp + 0x20], r15
lea rdx, [rbp + 0x9c0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14002b58a
mov eax, dword [rsp + 0x54]
cmp dword [rsp + 0x50], eax
jne 0x14002b58a
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], r15
mov r8d, 0x1000
lea rdx, [rbp + 0x9c0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14002b3fc
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
mov rdi, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, r12
cmp dword [rsp + 0x50], r15d
jne 0x14002b58a
lea rax, str.Resources
mov rdx, rbx
mov qword [rsp + 0x28], rax
lea r9, str.SoftwareMicrosoftTPGHWRCustomization
lea rax, str.en_us
lea r8, str._s_s_s
mov qword [rsp + 0x20], rax
lea rcx, [rbp + 0x5a0]
call fcn.1400065c4
test eax, eax
jne 0x14002b58a
mov qword [rsp + 0x40], r15
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
lea rdx, [rbp + 0x5a0]
mov qword [rsp + 0x30], r15
xor r9d, r9d
mov dword [rsp + 0x28], 0x103
xor r8d, r8d
mov rcx, 0xffffffff80000001
mov dword [rsp + 0x20], r15d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x14002b58a
lea r9, str.Resource
mov dword [rsp + 0x20], 0x226
lea r8, str._s_d
mov rdx, rbx
lea rcx, [rbp + 0x7b0]
call fcn.1400065c4
test eax, eax
jne 0x14002b58a
mov rax, rbx
lea rcx, [rbp + 0x180]
cmp word [rcx], r15w
je 0x14002b540
add rcx, 2
sub rax, 1
jne 0x14002b530
test rax, rax
je 0x14002b54a
sub rbx, rax
jmp 0x14002b54d
mov rbx, r15
test rax, rax
je 0x14002b58a
mov rcx, qword [rsp + 0x58]
lea eax, [rbx*2 + 2]
mov dword [rsp + 0x28], eax
lea rdx, [rbp + 0x7b0]
lea rax, [rbp + 0x180]
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
cmove r14d, r15d
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x14002b59a
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp rdi, r12
je 0x14002b5a8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp rsi, r12
je 0x14002b5b6
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r14d, r14d
jns 0x14002b5ce
cmp word [rsp + 0x70], r15w
je 0x14002b5ce
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, r14d
mov rcx, qword [rbp + 0x19c0]
xor rcx, rsp
call fcn.1400362c0
lea r11, [rsp + 0x1ad0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret