Function at 0x180009940
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xc8
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x40], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 2
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.ntoskrnl.exe_ZwQueryKey]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jge 0x180009bf2
mov edx, dword [rsp + 0x30]
mov r8d, 0x6f6a386b
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x180009bd1
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x30]
mov r8, qword [rsp + 0x48]
mov edx, 2
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.ntoskrnl.exe_ZwQueryKey]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jl 0x180009bd1
jmp 0x180009a13
mov rax, qword [rsp + 0x48]
mov ecx, dword [rax + 0x14]
sub ecx, 1
mov rax, qword [rsp + 0x48]
mov dword [rax + 0x14], ecx
mov rax, qword [rsp + 0x48]
cmp dword [rax + 0x14], 0
jbe 0x180009bd1
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.ntoskrnl.exe_ZwEnumerateKey]
mov dword [rsp + 0x50], eax
mov edx, dword [rsp + 0x30]
mov r8d, 0x6f6a386b
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x38]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.ntoskrnl.exe_ZwEnumerateKey]
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x38]
movzx eax, word [rax + 0xc]
mov word [rsp + 0x58], ax
mov rax, qword [rsp + 0x38]
add rax, 0x10
mov qword [rsp + 0x60], rax
mov r8d, 0x6f6a386b
mov edx, 0x410
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
mov qword [rsp + 0x68], rax
mov r8d, 0x410
xor edx, edx
mov rcx, qword [rsp + 0x68]
call fcn.180014bb0
mov r8w, 0x410
mov rdx, qword [rsp + 0x68]
lea rcx, [rsp + 0x70]
call fcn.18000a2a0
mov rdx, qword [rsp + 0xd8]
lea rcx, [rsp + 0x70]
call qword [sym.imp.ntoskrnl.exe_RtlCopyUnicodeString]
lea rdx, [0x180016800]
lea rcx, [rsp + 0x70]
call qword [sym.imp.ntoskrnl.exe_RtlAppendUnicodeToString]
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x70]
call qword [sym.imp.ntoskrnl.exe_RtlAppendUnicodeStringToString]
mov dword [rsp + 0x88], 0x30
mov qword [rsp + 0x90], 0
mov dword [rsp + 0xa0], 0x40
lea rax, [rsp + 0x70]
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xa8], 0
mov qword [rsp + 0xb0], 0
lea r8, [rsp + 0x88]
mov edx, 0xf003f
lea rcx, [rsp + 0x80]
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jl 0x180009bab
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.ntoskrnl.exe_ZwDeleteKey]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
cmp qword [rsp + 0x38], 0
je 0x180009bcc
mov edx, 0x6f6a386b
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov qword [rsp + 0x38], 0
jmp 0x180009a00
cmp qword [rsp + 0x48], 0
je 0x180009bf2
mov edx, 0x6f6a386b
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov qword [rsp + 0x48], 0
mov eax, dword [rsp + 0x50]
add rsp, 0xc8
ret