Function at 0x180021450
Capabilities:
Query or enumerate registry key

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x888
mov rax, qword [0x18010e350]
xor rax, rsp
mov qword [rsp + 0x870], rax
xor eax, eax
mov rbx, r8
mov rdi, rcx
mov rsi, rdx
lea rcx, [rsp + 0x72]
mov r8d, 0x7fe
xor edx, edx
mov rbp, r9
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
mov word [rsp + 0x70], ax
call fcn.180086e90
xor eax, eax
test rbp, rbp
mov dword [rsp + 0x50], 0x400
mov dword [rsp + 0x58], 0
mov dword [rsp + 0x5c], eax
je 0x18002158f
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x48]
mov edx, 0x20
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1800214e9
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1800216e9
mov rcx, qword [rsp + 0x48]
lea rdx, str.SeTakeOwnershipPrivilege
mov r8d, 1
call fcn.18001db80
test eax, eax
mov ebx, eax
jne 0x18002154d
lea rax, [rsp + 0x40]
mov r9d, 0x80000
xor r8d, r8d
mov rdx, rsi
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
mov ebx, eax
jne 0x18002154d
mov rcx, qword [rsp + 0x40]
lea edx, [rax + 1]
mov r8, rbp
call qword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
mov rcx, qword [rsp + 0x40]
test eax, eax
mov ebx, eax
je 0x18002155f
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x1800216e9
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x48]
lea rdx, str.SeTakeOwnershipPrivilege
xor r8d, r8d
call fcn.18001db80
mov rcx, qword [rsp + 0x48]
test eax, eax
mov ebx, eax
jne 0x180021552
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x60]
lea rax, [rsp + 0x40]
mov r9d, 0x40000
xor r8d, r8d
mov rdx, rsi
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1800216e9
mov rcx, qword [rsp + 0x40]
lea edx, [rax + 4]
mov r8, rbx
call qword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
mov rcx, qword [rsp + 0x40]
test eax, eax
mov ebx, eax
je 0x1800215df
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
jmp 0x1800216e9
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
movzx ebx, byte [rsp + 0x8d0]
test bl, bl
je 0x1800216e7
lea rax, [rsp + 0x40]
mov r9d, 8
xor r8d, r8d
mov rdx, rsi
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1800216e9
xor ecx, ecx
lea rax, [rsp + 0x58]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rcx
mov edi, ecx
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x70]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
je 0x1800216dc
mov rsi, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
lea rdx, [rsp + 0x70]
mov r9, rbp
mov r8, rsi
mov byte [rsp + 0x20], bl
call fcn.180021450
lea rcx, [rsp + 0x70]
xor edx, edx
mov r8d, 0x800
mov dword [rsp + 0x50], 0x400
call fcn.180086e90
mov rcx, qword [rsp + 0x40]
xor r11d, r11d
lea rax, [rsp + 0x58]
add edi, 1
lea r9, [rsp + 0x50]
mov qword [rsp + 0x38], rax
xor eax, eax
lea r8, [rsp + 0x70]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
mov edx, edi
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x58], r11d
mov dword [rsp + 0x5c], r11d
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
jne 0x180021660
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov rcx, qword [rsp + 0x870]
xor rcx, rsp
call fcn.180086e60
add rsp, 0x888
pop rdi
pop rsi
pop rbp
pop rbx
ret