Function at 0x14006a040
Capabilities:
Create directory
Delete registry key
Get common file path
Set registry value

Disassembly:
push rbp
push rbx
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x5f8]
sub rsp, 0x6f8
mov rax, qword [0x1400d1608]
xor rax, rsp
mov qword [rbp + 0x5e0], rax
mov r12, rcx
xor r13d, r13d
lea rcx, str.MTP_LICNOSAVE
mov r14d, r13d
mov r15, rdx
call fcn.14007e118
test rax, rax
je 0x14006a0b4
mov rcx, rax
call fcn.140074200
test eax, eax
je 0x14006a0b4
mov rax, qword [0x140233378]
test rax, rax
je 0x14006a5a1
lea rcx, str.License_code_not_saved
call rax
xor eax, eax
jmp 0x14006a5aa
mov rax, qword [0x140233378]
test rax, rax
je 0x14006a0cc
mov rdx, r12
lea rcx, str.dei_serialsave__s
call rax
lea rax, [rbp + 0x1e0]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, 0x801c
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
je 0x14006a10e
mov rax, qword [0x140233378]
test rax, rax
je 0x14006a104
lea rcx, str.SHGetFolderPath_failed
call rax
mov eax, 0xffffffff
jmp 0x14006a5aa
lea rdx, [0x1400d0784]
lea rcx, [rbp + 0x1e0]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
xor edx, edx
lea rcx, [rbp + 0x1e0]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x14006a15a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x14006a15a
mov edx, eax
lea rcx, str.CreateDirectory
call fcn.140044e60
mov eax, 0xffffffff
jmp 0x14006a5aa
lea rdx, str.dei_mtp.dat
lea rcx, [rbp + 0x1e0]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
lea rcx, [rsp + 0x58]
call fcn.14006ac30
mov ebx, eax
test eax, eax
jns 0x14006a19a
mov rdx, qword [0x140233378]
test rdx, rdx
je 0x14006a193
lea rcx, str.Cannot_find_host_id
call rdx
mov eax, ebx
jmp 0x14006a5aa
mov qword [rsp + 0x740], rsi
mov rsi, qword [rsp + 0x58]
mov qword [rsp + 0x6f0], rdi
mov rdi, rsi
test rsi, rsi
je 0x14006a56a
nop dword [rax + rax]
mov r14, qword [rdi]
lea r8, str._s_s__16.16I64X
mov r9, qword [str.Softwaredeimtp]
lea rcx, [rbp - 0x20]
mov qword [rsp + 0x28], r14
mov edx, 0x80
mov qword [rsp + 0x20], r12
call fcn.140044c10
mov rax, qword [0x140233378]
test rax, rax
je 0x14006a202
lea rdx, [rbp - 0x20]
lea rcx, str.Registry_path__s
call rax
test r15, r15
je 0x14006a4ea
cmp byte [r15], r13b
je 0x14006a4ea
xor edx, edx
mov rcx, r15
lea r8d, [rdx + 0x10]
call fcn.140074c54
mov rbx, rax
lea r8, [0x1400d0a38]
mov rax, r14
lea rcx, [rbp - 0x60]
and rax, 0xfffffffffffffff8
mov edx, 0x20
shl rax, 0x14
xor rbx, rax
mov rax, r14
shr rax, 0x10
shr r14, 3
xor rbx, rax
mov r9, r14
call fcn.140044c10
mov r9, rbx
lea r8, str._.16I64X
mov edx, 0x20
lea rcx, [rbp - 0x40]
call fcn.140044c10
movzx eax, byte [rbp - 0x60]
mov byte [rsp + 0x60], al
movzx eax, byte [rbp - 0x40]
mov byte [rsp + 0x61], al
movzx eax, byte [rbp - 0x5f]
mov byte [rsp + 0x62], al
movzx eax, byte [rbp - 0x3f]
mov byte [rsp + 0x63], al
movzx eax, byte [rbp - 0x5e]
mov byte [rsp + 0x64], al
movzx eax, byte [rbp - 0x3e]
mov byte [rsp + 0x65], al
movzx eax, byte [rbp - 0x5d]
mov byte [rsp + 0x66], al
movzx eax, byte [rbp - 0x3d]
mov byte [rsp + 0x67], al
movzx eax, byte [rbp - 0x5c]
mov byte [rsp + 0x68], al
movzx eax, byte [rbp - 0x3c]
mov byte [rsp + 0x69], al
movzx eax, byte [rbp - 0x5b]
mov byte [rsp + 0x6a], al
movzx eax, byte [rbp - 0x3b]
mov byte [rsp + 0x6b], al
movzx eax, byte [rbp - 0x5a]
mov byte [rsp + 0x6c], al
movzx eax, byte [rbp - 0x3a]
mov byte [rsp + 0x6d], al
movzx eax, byte [rbp - 0x59]
mov byte [rsp + 0x6e], al
movzx eax, byte [rbp - 0x39]
mov byte [rsp + 0x6f], al
movzx eax, byte [rbp - 0x58]
mov byte [rsp + 0x70], al
movzx eax, byte [rbp - 0x38]
mov byte [rsp + 0x71], al
movzx eax, byte [rbp - 0x57]
mov byte [rsp + 0x72], al
movzx eax, byte [rbp - 0x37]
mov byte [rsp + 0x73], al
movzx eax, byte [rbp - 0x56]
mov byte [rsp + 0x74], al
movzx eax, byte [rbp - 0x36]
mov byte [rsp + 0x75], al
movzx eax, byte [rbp - 0x55]
mov byte [rsp + 0x76], al
movzx eax, byte [rbp - 0x35]
mov byte [rsp + 0x77], al
movzx eax, byte [rbp - 0x54]
mov byte [rsp + 0x78], al
movzx eax, byte [rbp - 0x34]
mov byte [rsp + 0x79], al
movzx eax, byte [rbp - 0x53]
mov byte [rsp + 0x7a], al
movzx eax, byte [rbp - 0x33]
mov byte [rsp + 0x7b], al
movzx eax, byte [rbp - 0x52]
mov byte [rsp + 0x7c], al
movzx eax, byte [rbp - 0x32]
lea rdx, [rbp - 0x20]
mov byte [rsp + 0x7d], al
xor r9d, r9d
movzx eax, byte [rbp - 0x51]
xor r8d, r8d
mov qword [rsp + 0x40], r13
mov rcx, 0xffffffff80000001
mov byte [rsp + 0x7e], al
movzx eax, byte [rbp - 0x31]
mov byte [rsp + 0x7f], al
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], r13d
mov byte [rbp - 0x80], r13b
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x14006a4bb
lea rcx, [rsp + 0x60]
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], r13b
jne 0x14006a3c1
mov rcx, qword [rsp + 0x50]
inc eax
mov dword [rsp + 0x28], eax
mov r9d, 1
lea rax, [rsp + 0x60]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x50]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x14006a500
mov qword [rsp + 0x40], r13
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
lea rdx, [rbp - 0x20]
mov qword [rsp + 0x30], r13
xor r9d, r9d
mov dword [rsp + 0x28], 0xf003f
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x20], r13d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x14006a48c
lea rcx, [rsp + 0x60]
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [rcx + rax], r13b
jne 0x14006a450
mov rcx, qword [rsp + 0x50]
inc eax
mov dword [rsp + 0x28], eax
mov r9d, 1
lea rax, [rsp + 0x60]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14006a500
cmp qword [0x140233378], r13
je 0x14006a500
mov r8d, 0x100
lea rdx, [rbp + 0xe0]
mov ecx, eax
call fcn.140044d90
mov rdx, rax
lea rcx, str.Unable_to_create_global_key:__s
call qword [0x140233378]
jmp 0x14006a500
cmp qword [0x140233378], r13
je 0x14006a500
mov r8d, 0x100
lea rdx, [rbp + 0xe0]
mov ecx, eax
call fcn.140044d90
mov rdx, rax
lea rcx, str.Unable_to_create_user_key:__s
call qword [0x140233378]
jmp 0x14006a500
lea rdx, [rbp - 0x20]
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov byte [rsp + 0x60], r13b
lea rax, [rdi + 0x18]
mov r9, r12
lea r8, str._s__s
mov qword [rsp + 0x20], rax
mov edx, 0x80
lea rcx, [rbp + 0x60]
call fcn.140044c10
mov ebx, eax
cmp eax, 0x7f
jl 0x14006a53d
mov rdx, qword [0x140233378]
test rdx, rdx
je 0x14006a53d
lea rcx, str.appstr_too_long
call rdx
lea r9, [rsp + 0x60]
mov edx, ebx
lea r8, [rbp + 0x1e0]
lea rcx, [rbp + 0x60]
call fcn.14006a980
mov rdi, qword [rdi + 0x10]
test eax, eax
mov r14d, r13d
sete r14b
test rdi, rdi
jne 0x14006a1c0
mov rdi, qword [rsp + 0x6f0]
test rsi, rsi
je 0x14006a594
nop word [rax + rax]
mov rbx, qword [rsi + 0x10]
mov rcx, rsi
call fcn.1400733f0
mov rsi, rbx
test rbx, rbx
jne 0x14006a580
mov rsi, qword [rsp + 0x740]
test r14d, r14d
je 0x14006a5a5
xor eax, eax
jmp 0x14006a5aa
mov eax, 0xfffffffd
mov rcx, qword [rbp + 0x5e0]
xor rcx, rsp
call fcn.14006f1f0
add rsp, 0x6f8
pop r15
pop r14
pop r13
pop r12
pop rbx
pop rbp
ret