Function at 0x21b70
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
sub rsp, 0x790
mov rax, qword [0x00045100]
xor rax, rsp
mov qword [rsp + 0x780], rax
xor r13d, r13d
lea rcx, [r11 - 0x627]
xor edx, edx
mov r8d, 0x1ff
mov qword [rsp + 0x38], r13
mov dword [rsp + 0x30], r13d
mov qword [rsp + 0x40], r13
mov byte [r11 - 0x628], r13b
call fcn.0003a110
lea rcx, [rsp + 0x382]
xor edx, edx
mov r8d, 0x3fe
mov word [rsp + 0x380], r13w
call fcn.0003a110
mov rdi, qword [0x0004c9d8]
lea rcx, [rdi + 0x10]
call qword [sym.imp.ntoskrnl.exe_ExAcquireFastMutex]
jmp 0x21c07
lea rdx, [rax + 0x18]
mov rcx, rdi
call fcn.0001adbc
mov rax, qword [rdi + 0x48]
cmp rax, r13
jne 0x21bfb
lea rcx, [rdi + 0x10]
call qword [sym.imp.ntoskrnl.exe_ExReleaseFastMutex]
lea rdx, [0x0003ba70]
lea rcx, [rsp + 0x128]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rax, [rsp + 0x128]
lea r8, [rsp + 0xc8]
lea rcx, [rsp + 0x38]
mov edx, 0x80000000
mov qword [rsp + 0xd8], rax
mov dword [rsp + 0xc8], 0x30
mov qword [rsp + 0xd0], r13
mov dword [rsp + 0xe0], 0x240
mov qword [rsp + 0xe8], r13
mov qword [rsp + 0xf0], r13
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
cmp eax, r13d
jl 0x2208f
mov edx, 0x818
mov ecx, 1
call fcn.000353f8
mov rcx, qword [rsp + 0x38]
mov rbx, rax
cmp rax, r13
je 0x22089
lea rax, [rsp + 0x30]
mov r9, rbx
xor r8d, r8d
mov qword [rsp + 0x28], rax
xor edx, edx
mov ebp, r13d
mov dword [rsp + 0x20], 0x818
call qword [sym.imp.ntoskrnl.exe_ZwEnumerateKey]
cmp eax, r13d
jl 0x2207c
lea r12, [rbx + 0x10]
movzx eax, word [rbx + 0xc]
lea r8, [rsp + 0xf8]
lea rcx, [rsp + 0x40]
mov word [rsp + 0x58], ax
mov word [rsp + 0x5a], ax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x100], rax
lea rax, [rsp + 0x58]
mov edx, 0x80000000
inc ebp
mov qword [rsp + 0x60], r12
mov dword [rsp + 0xf8], 0x30
mov qword [rsp + 0x108], rax
mov dword [rsp + 0x110], 0x240
mov qword [rsp + 0x118], r13
mov qword [rsp + 0x120], r13
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
cmp eax, r13d
jl 0x2204e
mov rdi, qword [rsp + 0x40]
lea rdx, [0x0003bc90]
lea rcx, [rsp + 0x158]
mov qword [rsp + 0x48], r13
mov dword [rsp + 0x50], r13d
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rax, [rsp + 0x158]
lea r8, [rsp + 0x98]
lea rcx, [rsp + 0x48]
mov edx, 0x80000000
mov dword [rsp + 0x98], 0x30
mov qword [rsp + 0xa0], rdi
mov qword [rsp + 0xa8], rax
mov dword [rsp + 0xb0], 0x240
mov qword [rsp + 0xb8], r13
mov qword [rsp + 0xc0], r13
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
cmp eax, r13d
jl 0x21e9f
lea rdx, [0x0003aec0]
lea rcx, [rsp + 0x138]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov edx, 0x800
mov ecx, 1
call fcn.000353f8
mov rcx, qword [rsp + 0x48]
mov rdi, rax
cmp rax, r13
je 0x21e99
lea rax, [rsp + 0x50]
lea rdx, [rsp + 0x138]
mov r9, rdi
mov qword [rsp + 0x28], rax
mov r8d, 2
mov dword [rsp + 0x20], 0x800
call qword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
cmp eax, r13d
jl 0x21e8c
cmp dword [rdi + 4], 1
je 0x21e46
cmp dword [rdi + 4], 2
jne 0x21e8c
lea rax, [rdi + 0xc]
lea rcx, [rsp + 0x88]
mov qword [rsp + 0x90], rax
movzx eax, word [rdi + 8]
mov word [rsp + 0x88], ax
mov word [rsp + 0x8a], ax
call fcn.00022130
mov rsi, rax
cmp rax, r13
je 0x21e8c
mov rcx, qword [rax + 8]
call fcn.0002258c
mov rcx, rsi
call fcn.00035470
mov rcx, rdi
call fcn.00035470
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
lea rdx, [0x0003aea0]
lea rcx, [rsp + 0x148]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rcx, [rsp + 0x180]
xor edx, edx
mov r8d, 0x200
call fcn.0003a110
mov rcx, qword [rsp + 0x40]
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x28], rdx
lea r9, [rsp + 0x180]
lea rdx, [rsp + 0x148]
mov r8d, 2
mov dword [rsp + 0x20], 0x200
call qword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
cmp eax, r13d
jl 0x21f46
cmp dword [rsp + 0x184], 1
je 0x21f15
cmp dword [rsp + 0x184], 2
jne 0x21f46
lea rax, [rsp + 0x18c]
lea rcx, [rsp + 0x78]
mov qword [rsp + 0x80], rax
movzx eax, word [rsp + 0x188]
mov word [rsp + 0x78], ax
mov word [rsp + 0x7a], ax
call fcn.00022130
jmp 0x2202a
lea rdx, [0x0003bae0]
lea rcx, [rsp + 0x168]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov rcx, qword [rsp + 0x40]
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x28], rdx
lea r9, [rsp + 0x180]
lea rdx, [rsp + 0x168]
mov r8d, 2
mov dword [rsp + 0x20], 0x200
call qword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
cmp eax, r13d
jl 0x22043
cmp dword [rsp + 0x184], 4
jne 0x22043
cmp dword [rsp + 0x18c], 0x10
jae 0x22043
mov eax, 0x3ce
cmp word [rsp + 0x58], ax
jae 0x22043
lea r9, [rsp + 0x58]
lea r8, [0x0003baf0]
lea rcx, [rsp + 0x380]
mov edx, 0x200
mov word [rsp + 0x380], r13w
call fcn.0002e34c
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdx, [rsp + 0x380]
lea rdi, [rsp + 0x380]
repne scasw ax, word [rdi]
mov eax, 0x400
mov qword [rsp + 0x70], rdx
not rcx
mov word [rsp + 0x6a], ax
dec rcx
add cx, cx
mov word [rsp + 0x68], cx
lea rcx, [rsp + 0x68]
call fcn.000224fc
mov rdi, rax
cmp rax, r13
je 0x22043
mov rcx, qword [rax + 8]
call fcn.0002258c
mov rcx, rdi
call fcn.00035470
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov r9, rbx
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov edx, ebp
mov dword [rsp + 0x20], 0x818
call qword [sym.imp.ntoskrnl.exe_ZwEnumerateKey]
cmp eax, r13d
jge 0x21cde
mov rcx, rbx
call fcn.00035470
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
mov rcx, qword [rsp + 0x780]
xor rcx, rsp
call fcn.00039af0
lea r11, [rsp + 0x790]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r13
pop r12
pop rdi
ret