Function at 0x21738
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x1f0
mov rax, qword [0x0002b100]
xor rax, rsp
mov qword [rsp + 0x1e0], rax
xor eax, eax
xor r14d, r14d
lea rdx, [0x00025330]
mov word [r11 - 0x188], r14w
mov qword [r11 - 0x186], rax
mov word [r11 - 0x178], r14w
mov qword [r11 - 0x176], rax
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x9a], eax
mov word [rsp + 0x9e], ax
mov dword [rsp + 0xaa], eax
mov word [rsp + 0xae], ax
mov word [rsp + 0x70], r14w
mov qword [rsp + 0x72], rax
mov dword [rsp + 0x7a], eax
mov word [rsp + 0x7e], ax
mov word [rsp + 0x40], r14w
mov qword [rsp + 0x42], rax
mov dword [rsp + 0x4a], eax
mov word [rsp + 0x4e], ax
mov word [rsp + 0x50], r14w
mov qword [rsp + 0x52], rax
mov dword [rsp + 0x5a], eax
mov word [rsp + 0x5e], ax
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rdx, [0x00025310]
lea rcx, [rsp + 0x90]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rdx, [0x00028590]
lea rcx, [rsp + 0xa0]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov r15d, 0x400
mov ecx, 0x6020000
mov word [rsp + 0x40], r15w
mov word [rsp + 0x42], r15w
call fcn.00024fc4
mov rcx, r15
call fcn.00012db4
mov qword [rsp + 0x48], rax
cmp rax, r14
jne 0x21857
xor al, al
jmp 0x21f03
mov ecx, 0x6020000
mov word [rsp + 0x50], r15w
mov word [rsp + 0x52], r15w
call fcn.00024fc4
mov rcx, r15
call fcn.00012db4
mov qword [rsp + 0x58], rax
cmp rax, r14
jne 0x21890
mov rcx, qword [rsp + 0x48]
mov edx, 0x4d746147
call fcn.00012ebc
jmp 0x21850
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_RtlCopyUnicodeString]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x50]
call qword [sym.imp.ntoskrnl.exe_RtlCopyUnicodeString]
xor edx, edx
lea rcx, [rsp + 0x130]
lea r8d, [rdx + 0x70]
call fcn.00025100
lea rax, [rsp + 0x88]
xor edx, edx
mov qword [rsp + 0x148], rax
mov eax, 4
lea rcx, [rsp + 0x108]
mov dword [rsp + 0x150], eax
mov dword [rsp + 0x160], eax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x158], rax
lea rax, [0x000253d0]
lea r8d, [rdx + 0x28]
mov dword [rsp + 0x88], r14d
mov dword [rsp + 0x80], r14d
mov dword [rsp + 0x138], 0x20
mov qword [rsp + 0x140], rax
call fcn.00025100
lea rax, [rsp + 0x70]
lea r8, [rsp + 0x100]
lea rcx, [rsp + 0x38]
mov edx, 0x20019
mov qword [rsp + 0x110], rax
mov dword [rsp + 0x100], 0x30
mov qword [rsp + 0x108], r14
mov dword [rsp + 0x118], 0x240
mov qword [rsp + 0x120], r14
mov qword [rsp + 0x128], r14
mov qword [rsp + 0x38], r14
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
cmp eax, r14d
jl 0x21ecc
mov rcx, qword [rsp + 0x38]
xor r9d, r9d
lea rax, [rsp + 0x30]
lea edx, [r9 + 2]
xor r8d, r8d
mov dword [rsp + 0x30], r14d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntoskrnl.exe_ZwQueryKey]
cmp eax, r14d
jge 0x21a05
cmp eax, 0x80000005
je 0x21a05
cmp eax, 0xc0000023
je 0x21a05
mov rcx, qword [rsp + 0x48]
mov edi, 0x4d746147
mov edx, edi
call fcn.00012ebc
mov rcx, qword [rsp + 0x58]
mov edx, edi
mov qword [rsp + 0x48], r14
call fcn.00012ebc
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x58], r14
call qword [sym.imp.ntoskrnl.exe_ZwClose]
jmp 0x21850
mov eax, dword [rsp + 0x30]
cmp eax, r14d
je 0x219ce
cmp eax, r15d
ja 0x219ce
mov ecx, 0x6020000
call fcn.00024fc4
mov r9d, dword [rsp + 0x30]
mov rcx, r9
cmp r9, r14
je 0x21a39
call fcn.00012db4
mov r9d, dword [rsp + 0x30]
mov rbx, rax
jmp 0x21a3c
mov rbx, r14
cmp rbx, r14
je 0x219ce
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov r8, rbx
mov edx, 2
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntoskrnl.exe_ZwQueryKey]
cmp eax, r14d
jl 0x21f34
cmp dword [rsp + 0x30], r14d
je 0x21f34
mov r13b, r14b
mov r12d, r14d
cmp dword [rbx + 0x14], r14d
jbe 0x21eae
mov esi, 0xe
lea edi, [rsi - 0xd]
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov edx, r12d
mov dword [rsp + 0x20], r14d
call qword [sym.imp.ntoskrnl.exe_ZwEnumerateKey]
cmp eax, r14d
jge 0x21ac4
cmp eax, 0x80000005
je 0x21ac4
cmp eax, 0xc0000023
jne 0x21eae
mov eax, dword [rsp + 0x30]
cmp eax, r14d
je 0x21eae
cmp eax, r15d
ja 0x21eae
mov ecx, 0x6020000
call fcn.00024fc4
mov edx, dword [rsp + 0x30]
mov rcx, rdx
cmp rdx, r14
je 0x21afe
call fcn.00012db4
mov edx, dword [rsp + 0x30]
mov rbp, rax
jmp 0x21b01
mov rbp, r14
cmp rbp, r14
je 0x21eae
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov r9, rbp
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], edx
mov edx, r12d
xor r8d, r8d
call qword [sym.imp.ntoskrnl.exe_ZwEnumerateKey]
cmp eax, r14d
jl 0x21ea1
cmp dword [rsp + 0x30], r14d
je 0x21ea1
movzx ecx, word [rbp + 0xc]
mov word [rsp + 0xb0], cx
movzx eax, word [rbp + 0xc]
mov word [rsp + 0xb2], ax
lea rax, [rbp + 0x10]
mov qword [rsp + 0xb8], rax
cmp cx, 0x14
jbe 0x21e5d
lea rdx, [rsp + 0xb0]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_RtlAppendUnicodeStringToString]
lea rdx, [rsp + 0xb0]
lea rcx, [rsp + 0x50]
call qword [sym.imp.ntoskrnl.exe_RtlAppendUnicodeStringToString]
mov rdx, qword [rsp + 0x58]
lea r8, [rsp + 0x130]
xor r9d, r9d
xor ecx, ecx
mov qword [rsp + 0x20], r14
call qword [sym.imp.ntoskrnl.exe_RtlQueryRegistryValues]
cmp word [rsp + 0x50], r14w
je 0x21e5d
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_RtlAppendUnicodeStringToString]
xor edx, edx
lea rcx, [rsp + 0xd8]
lea r8d, [rdx + 0x28]
call fcn.00025100
lea rax, [rsp + 0x40]
lea r8, [rsp + 0xd0]
lea rcx, [rsp + 0x68]
mov edx, 0x20019
mov qword [rsp + 0xe0], rax
mov qword [rsp + 0x68], r14
mov dword [rsp + 0xd0], 0x30
mov qword [rsp + 0xd8], r14
mov dword [rsp + 0xe8], 0x240
mov qword [rsp + 0xf0], r14
mov qword [rsp + 0xf8], r14
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
cmp eax, r14d
jl 0x21e5d
mov rcx, qword [rsp + 0x68]
mov eax, 0x10
xor r9d, r9d
mov word [rsp + 0xc2], ax
lea rax, [0x00028600]
lea rdx, [rsp + 0xc0]
mov qword [rsp + 0xc8], rax
lea rax, [rsp + 0x60]
lea r8d, [r9 + 2]
mov qword [rsp + 0x28], rax
mov word [rsp + 0xc0], si
mov dword [rsp + 0x60], r14d
mov dword [rsp + 0x20], r14d
call qword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
cmp eax, r14d
jge 0x21cb5
cmp eax, 0x80000005
je 0x21cb5
cmp eax, 0xc0000023
je 0x21cb5
mov byte [0x0186d5e3], r14b
jmp 0x21e52
cmp dword [rsp + 0x60], r14d
jne 0x21cc8
mov byte [0x0186d5e3], dil
jmp 0x21e52
mov ecx, 0x6020000
mov byte [0x0186d5e3], r14b
mov r13b, dil
call fcn.00024fc4
mov edx, dword [rsp + 0x60]
mov rcx, rdx
cmp rdx, r14
je 0x21cf6
call fcn.00012db4
mov edx, dword [rsp + 0x60]
mov rsi, rax
jmp 0x21cf9
mov rsi, r14
cmp rsi, r14
je 0x21e4d
mov rcx, qword [rsp + 0x68]
lea rax, [rsp + 0x84]
mov r9, rsi
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], edx
lea rdx, [rsp + 0xc0]
mov r8d, 2
mov dword [rsp + 0x84], r14d
call qword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
cmp eax, r14d
jl 0x21e40
mov rax, qword [0x00028610]
mov edx, dword [rsi + 8]
lea rcx, [rsp + 0x1c0]
mov qword [rcx], rax
movzx eax, word [0x00028618]
lea rdi, [rsp + 0x1c0]
mov word [rcx + 8], ax
xor eax, eax
or rcx, 0xffffffffffffffff
mov qword [rsp + 0x1ca], rax
mov qword [rsp + 0x1d2], rax
mov dword [rsp + 0x1da], eax
mov word [rsp + 0x1de], ax
repne scasw ax, word [rdi]
mov qword [rsp + 0x1a2], rax
not rcx
mov qword [rsp + 0x1aa], rax
mov qword [rsp + 0x1b2], rax
mov dword [rsp + 0x1ba], eax
mov word [rsp + 0x1be], ax
lea rax, [rcx + rcx - 2]
mov word [rsp + 0x1a0], r14w
lea rdi, [rcx - 1]
cmp rdx, rax
jb 0x21e13
mov eax, 0xe
lea rcx, [rsp + 0x1a0]
cmp edx, eax
cmova edx, eax
mov r8d, edx
lea rdx, [rsi + 0xc]
call fcn.00024c10
lea edx, [rdi + rdi]
lea r8, [rsp + 0x1c0]
lea rcx, [rsp + 0x1a0]
call fcn.000120cc
mov edi, 1
cmp rax, r14
je 0x21e40
jmp 0x21e1d
mov edi, 1
cmp edx, r14d
jne 0x21e26
mov byte [0x0186d5e3], dil
jmp 0x21e40
cmp edx, 2
jb 0x21e40
movzx eax, byte [0x0186d5e3]
cmp word [rsi + 0xc], r14w
cmove eax, edi
mov byte [0x0186d5e3], al
mov edx, 0x52454749
mov rcx, rsi
call fcn.00012ebc
mov esi, 0xe
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
mov edx, 0x504249
mov rcx, rbp
call fcn.00012ebc
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_RtlCopyUnicodeString]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x50]
call qword [sym.imp.ntoskrnl.exe_RtlCopyUnicodeString]
cmp r13b, r14b
jne 0x21eae
add r12d, edi
cmp r12d, dword [rbx + 0x14]
jb 0x21a8a
jmp 0x21eae
mov edx, 0x504249
mov rcx, rbp
call fcn.00012ebc
mov edx, 0x504649
mov rcx, rbx
call fcn.00012ebc
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
or qword [rsp + 0x38], 0xffffffffffffffff
cmp word [rsp + 0x40], r14w
jbe 0x21ef9
mov rcx, qword [rsp + 0x48]
mov edi, 0x4d746147
mov edx, edi
call fcn.00012ebc
cmp word [rsp + 0x40], r14w
jbe 0x21ef9
mov rcx, qword [rsp + 0x58]
mov edx, edi
call fcn.00012ebc
cmp byte [0x0186d5e3], r14b
sete al
mov rcx, qword [rsp + 0x1e0]
xor rcx, rsp
call fcn.00024bb0
lea r11, [rsp + 0x1f0]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov edx, 0x504649
mov rcx, rbx
call fcn.00012ebc
jmp 0x219ce