Function at 0x14009d4c4
Capabilities:
Query or enumerate registry key

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xd0
mov rax, qword [0x14017d140]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0x58], r8
mov rax, rdx
mov qword [rsp + 0x60], rdx
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x78], rcx
mov qword [rsp + 0x88], rdx
mov qword [rsp + 0x80], r8
xor edi, edi
mov r14d, edi
mov dword [rsp + 0x34], edi
mov r15d, reloc.ADVAPI32.dll_TraceEvent
mov qword [rax], rdi
mov dword [r8], edi
mov qword [rsp + 0x50], rdi
mov rsi, rdi
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov r9d, 0x30
lea r8, [rsp + 0x90]
lea edx, [r9 - 0x2e]
call qword [sym.imp.ntdll.dll_ZwQueryKey]
mov ebx, eax
mov dword [rsp + 0x30], eax
test eax, eax
jns 0x14009d564
cmp eax, 0x80000005
jne 0x14009d778
mov r14d, dword [rsp + 0xa4]
test r14d, r14d
jne 0x14009d57c
mov ebx, edi
mov dword [rsp + 0x30], ebx
jmp 0x14009d773
mov eax, dword [rsp + 0xa8]
lea ecx, [rax + 2]
cmp ecx, eax
jb 0x14009d58e
mov ebx, edi
jmp 0x14009d596
mov ecx, r15d
mov ebx, 0xc0000095
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], ebx
test ebx, ebx
js 0x14009d5bf
imul rcx, r14
cmp rcx, r15
ja 0x14009d5af
mov ebx, edi
jmp 0x14009d5b7
mov ecx, r15d
mov ebx, 0xc0000095
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], ebx
mov eax, edi
test ebx, ebx
js 0x14009d773
mov rax, r14
shl rax, 3
cmp rax, r15
ja 0x14009d5d9
mov ebx, edi
jmp 0x14009d5e1
mov eax, r15d
mov ebx, 0xc0000095
mov dword [rsp + 0x30], ebx
test ebx, ebx
js 0x14009d773
lea edx, [rax + rcx]
cmp edx, eax
jb 0x14009d5fa
mov eax, edx
mov ebx, edi
jmp 0x14009d602
mov eax, r15d
mov ebx, 0xc0000095
mov dword [rsp + 0x30], ebx
test ebx, ebx
js 0x14009d773
mov r8d, eax
mov rcx, qword gs:[0x60]
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov rsi, rax
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x14009d63d
mov ebx, 0xc000009a
jmp 0x14009d573
lea r13, [rax + r14*8]
mov eax, dword [rsp + 0xa8]
add eax, 0x1a
cmp eax, 0x1a
jb 0x14009d654
mov ebx, edi
jmp 0x14009d65c
mov eax, r15d
mov ebx, 0xc0000095
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x30], ebx
test ebx, ebx
js 0x14009d773
mov r8d, eax
mov rcx, qword gs:[0x60]
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov rcx, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x14009d633
mov r12d, dword [rsp + 0x38]
mov esi, edi
test r14d, r14d
je 0x14009d756
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x48]
mov dword [rsp + 0x20], eax
mov r9, rcx
xor r8d, r8d
mov edx, esi
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ntdll.dll_ZwEnumerateKey]
mov ebx, eax
mov dword [rsp + 0x30], eax
cmp eax, 0x8000001a
je 0x14009d752
test eax, eax
js 0x14009d76e
mov rdx, qword [rsp + 0x50]
mov ecx, dword [rdx + 0xc]
add rcx, 2
mov eax, r12d
cmp rcx, rax
ja 0x14009d747
mov rbx, qword [rsp + 0x38]
mov qword [rbx], r13
mov r8d, dword [rdx + 0xc]
add rdx, 0x10
mov rcx, r13
call sub.msvcrt.dll_memcpy
mov rcx, qword [rsp + 0x50]
mov r11d, dword [rcx + 0xc]
add r13, r11
mov word [r13], di
add r13, 2
mov eax, HeapSize
sub eax, dword [rcx + 0xc]
add r12d, eax
inc esi
add rbx, 8
mov qword [rsp + 0x38], rbx
cmp esi, r14d
jb 0x14009d6ab
jmp 0x14009d756
mov ebx, 0xc0000023
mov dword [rsp + 0x30], ebx
jmp 0x14009d76e
test esi, esi
je 0x14009d76e
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x60]
mov qword [rcx], rax
mov rax, qword [rsp + 0x58]
mov dword [rax], esi
mov ebx, edi
jmp 0x14009d74c
mov rsi, qword [rsp + 0x40]
mov r14d, dword [rsp + 0x34]
mov rax, qword [rsp + 0x50]
test rax, rax
je 0x14009d79a
mov rcx, qword gs:[0x60]
mov r8, rax
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
test ebx, ebx
jns 0x14009d7bb
test rsi, rsi
je 0x14009d7bb
mov rcx, qword gs:[0x60]
mov r8, rsi
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
cmp ebx, 0xc000017d
jne 0x14009d81c
int3
mov eax, ebx
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.140168920
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret