Function at 0x1400514ec
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
mov rbp, rsp
sub rsp, 0x60
xor edi, edi
mov eax, 0x8000
mov rbx, rcx
and qword [rbp - 8], rdi
mov word [rbp + 0x38], ax
mov rcx, qword [str.___t_]
lea r12, str.___t_
lea r13, [0x140003de0]
cmp rcx, r12
je 0x140051546
test byte [rcx + 0x1c], 4
je 0x140051546
cmp byte [rcx + 0x19], 5
jb 0x140051546
mov rcx, qword [rcx + 0x10]
lea edx, [rdi + 0x16]
mov r8, r13
call fcn.14000e618
lea rax, [rbp + 0x48]
lea r9, [0x1400022d0]
lea rdx, [0x140003c90]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 8]
xor r8d, r8d
mov qword [rsp + 0x38], rax
and qword [rsp + 0x30], rdi
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x20006
and dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov esi, eax
test eax, eax
je 0x1400515c0
mov rcx, qword [str.___t_]
cmp rcx, r12
je 0x1400515b9
test byte [rcx + 0x1c], 4
je 0x1400515b9
cmp byte [rcx + 0x19], 2
jb 0x1400515b9
mov rcx, qword [rcx + 0x10]
mov edx, 0x17
mov r9d, eax
mov r8, r13
call fcn.14000e63c
mov eax, esi
jmp 0x1400517b6
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_IsValidSecurityDescriptor]
test eax, eax
jne 0x1400515fe
mov ebx, 0x53a
mov rcx, qword [str.___t_]
cmp rcx, r12
je 0x140051798
test byte [rcx + 0x1c], 4
je 0x140051798
cmp byte [rcx + 0x19], 2
jb 0x140051798
lea edx, [rax + 0x18]
jmp 0x1400516f4
lea r8, [rbp - 0x10]
lea rdx, [rbp + 0x38]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
jne 0x140051649
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [str.___t_]
cmp rcx, r12
je 0x140051798
test byte [rcx + 0x1c], 4
je 0x140051798
cmp byte [rcx + 0x19], 2
jb 0x140051798
mov edx, 0x19
jmp 0x140051789
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorLength]
mov ecx, 0x8000
mov dword [rbp + 0x40], eax
test word [rbp + 0x38], cx
je 0x1400516bb
mov rcx, qword [rbp - 8]
mov dword [rsp + 0x28], eax
lea rdx, [0x140003cd0]
mov r9d, 3
xor r8d, r8d
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
test eax, eax
je 0x140051798
mov rcx, qword [str.___t_]
cmp rcx, r12
je 0x140051798
test byte [rcx + 0x1c], 4
je 0x140051798
cmp byte [rcx + 0x19], 2
jb 0x140051798
mov edx, 0x1a
jmp 0x140051789
mov ecx, eax
call fcn.140072274
mov rdi, rax
test rax, rax
jne 0x140051705
lea ebx, [rax + 8]
mov rcx, qword [str.___t_]
cmp rcx, r12
je 0x140051798
test byte [rcx + 0x1c], 4
je 0x140051798
cmp byte [rcx + 0x19], 2
jb 0x140051798
lea edx, [rax + 0x1b]
mov rcx, qword [rcx + 0x10]
mov r8, r13
call fcn.14000e618
jmp 0x140051798
lea r8, [rbp + 0x40]
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_MakeSelfRelativeSD]
test eax, eax
jne 0x140051740
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [str.___t_]
cmp rcx, r12
je 0x140051798
test byte [rcx + 0x1c], 4
je 0x140051798
cmp byte [rcx + 0x19], 2
jb 0x140051798
mov edx, 0x1c
jmp 0x140051789
mov eax, dword [rbp + 0x40]
mov rcx, qword [rbp - 8]
lea rdx, [0x140003cd0]
mov dword [rsp + 0x28], eax
mov r9d, 3
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
test eax, eax
je 0x140051798
mov rcx, qword [str.___t_]
cmp rcx, r12
je 0x140051798
test byte [rcx + 0x1c], 4
je 0x140051798
cmp byte [rcx + 0x19], 2
jb 0x140051798
mov edx, 0x1d
mov rcx, qword [rcx + 0x10]
mov r9d, eax
mov r8, r13
call fcn.14000e63c
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x1400517a7
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test rdi, rdi
je 0x1400517b4
mov rcx, rdi
call fcn.140072328
mov eax, ebx
mov rbx, qword [rsp + 0x90]
add rsp, 0x60
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret