Function at 0x180005700
Capabilities:
Delete registry key
Set registry value

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0xa8], rbx
mov ebp, r9d
mov r15, rdx
mov rbx, rcx
xor r13b, r13b
cmp qword [rcx + 0x78], 8
jb 0x180005743
mov rsi, qword [rcx + 0x60]
jmp 0x180005747
lea rsi, [rcx + 0x60]
lea rcx, [0x18002f9d0]
mov rax, qword [0x18002f9d0]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
xor r14d, r14d
or r12, 0xffffffffffffffff
test rsi, rsi
je 0x1800057ac
test rsi, 0xffffffffffff0000
jne 0x180005799
movzx edi, si
xor edx, edx
mov ecx, edi
call fcn.1800010c0
test rax, rax
je 0x1800057c0
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.180002540
jmp 0x1800057c0
xor eax, eax
mov rcx, r12
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
dec rcx
jmp 0x1800057af
mov ecx, r14d
mov r8d, ecx
mov rdx, rsi
lea rcx, [rsp + 0x30]
call fcn.1800020b0
nop
mov rdx, qword [rbx + 0x20]
test rdx, rdx
jne 0x1800057ce
mov ecx, r14d
jmp 0x1800057df
xor eax, eax
mov rcx, r12
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
dec rcx
mov r8d, ecx
lea rcx, [rsp + 0x30]
call fcn.180002440
mov r9d, ebp
or r9d, 0x20019
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov rdi, qword [rsp + 0x30]
mov rdx, rdi
mov rcx, 0xffffffff80000003
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x180005a38
mov rcx, rbx
call fcn.180004ee0
mov rdx, qword [rbx + 0x28]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
lea r8, [rsp + 0x38]
mov rdx, qword [rbx + 0x28]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
mov dword [rsp + 0xa0], r14d
mov rax, qword [rbx + 0xa0]
sub rax, qword [rbx + 0x98]
sar rax, 3
test rax, rax
je 0x180005955
xor ebp, ebp
movabs rdi, 0x2aaaaaaaaaaaaaab
nop word [rax + rax]
mov rcx, qword [rbx + 0xd0]
sub rcx, qword [rbx + 0xc8]
mov rax, rdi
imul rcx
sar rdx, 3
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp r14, rdx
jb 0x1800058ac
call fcn.180012a74
mov rsi, qword [rbx + 0xc8]
mov rax, qword [rsi + rbp + 0x20]
cmp rax, qword [rsi + rbp + 0x18]
jne 0x1800058c4
call fcn.180012a74
mov rsi, qword [rsi + rbp + 0x18]
mov rax, qword [rbx + 0xa0]
sub rax, qword [rbx + 0x98]
sar rax, 3
cmp r14, rax
jb 0x1800058e5
call fcn.180012a74
mov rax, qword [rbx + 0x98]
mov dword [rsp + 0x28], 0x18
mov qword [rsp + 0x20], rsi
mov r9d, 3
xor r8d, r8d
mov rdx, qword [rax + r14*8]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov r8d, dword [rsp + 0xa0]
inc r8d
mov dword [rsp + 0xa0], r8d
inc r14
add rbp, 0x30
mov rcx, qword [rbx + 0xa0]
sub rcx, qword [rbx + 0x98]
sar rcx, 3
mov eax, r8d
cmp rax, rcx
jb 0x180005880
mov rdi, qword [rsp + 0x30]
mov ebp, dword [rsp + 0xb8]
cmp qword [r15 + 0x20], 8
jb 0x180005962
mov rdx, qword [r15 + 8]
jmp 0x180005966
lea rdx, [r15 + 8]
mov dword [rsp + 0x28], 0x18
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x20], rax
mov r9d, 3
xor r8d, r8d
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x1800059af
mov r8d, ebp
mov rdx, r15
mov rcx, rbx
call fcn.180003b10
mov r13b, al
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
or ebp, 0x2001f
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, ebp
xor r8d, r8d
mov rdx, qword [rbx + 0x48]
mov rcx, 0xffffffff80000003
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x180005a2c
mov dword [rsp + 0xa0], 0x10000
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
mov rdx, qword [rbx + 0x50]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx r13d, r13b
test eax, eax
mov eax, 0
cmovne r13d, eax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], r12d
dec r12d
test r12d, r12d
jg 0x180005a58
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov al, r13b
jmp 0x180005a5b
mov al, r13b
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret