Function at 0x23158
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x180
xor eax, eax
xor r12d, r12d
mov rbp, rcx
mov word [r11 - 0x128], r12w
mov qword [r11 - 0x126], rax
mov word [r11 - 0x118], r12w
mov qword [r11 - 0x116], rax
lea rcx, [rsp + 0x60]
lea rdx, [0x00025330]
mov word [rsp + 0x60], r12w
mov qword [rsp + 0x62], rax
mov dword [rsp + 0x6a], eax
mov word [rsp + 0x6e], ax
mov dword [rsp + 0x8a], eax
mov word [rsp + 0x8e], ax
mov dword [rsp + 0x9a], eax
mov word [rsp + 0x9e], ax
mov word [rsp + 0x30], r12w
mov qword [rsp + 0x32], rax
mov dword [rsp + 0x3a], eax
mov word [rsp + 0x3e], ax
mov word [rsp + 0x48], r12w
mov qword [rsp + 0x4a], rax
mov dword [rsp + 0x52], eax
mov word [rsp + 0x56], ax
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rdx, [0x00025310]
lea rcx, [rsp + 0x80]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rdx, [0x00028660]
lea rcx, [rsp + 0x90]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov r13d, 0x400
mov ecx, 0x6020000
mov word [rsp + 0x30], r13w
mov word [rsp + 0x32], r13w
call fcn.00024fc4
mov rcx, r13
call fcn.00012db4
mov qword [rsp + 0x38], rax
cmp rax, r12
je 0x2376e
mov ecx, 0x6020000
mov word [rsp + 0x48], r13w
mov word [rsp + 0x4a], r13w
call fcn.00024fc4
mov rcx, r13
call fcn.00012db4
mov qword [rsp + 0x50], rax
cmp rax, r12
jne 0x23292
mov rcx, qword [rsp + 0x38]
mov edx, 0x4d746147
jmp 0x23769
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_RtlCopyUnicodeString]
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_RtlCopyUnicodeString]
xor edx, edx
lea rcx, [rsp + 0x110]
lea r8d, [rdx + 0x70]
call fcn.00025100
lea rax, [rsp + 0x1c0]
xor edx, edx
mov qword [rsp + 0x128], rax
mov eax, 4
lea rcx, [rsp + 0xe8]
mov dword [rsp + 0x130], eax
mov dword [rsp + 0x140], eax
lea rax, [rsp + 0x1c8]
mov qword [rsp + 0x138], rax
lea rax, [0x000253d0]
lea r8d, [rdx + 0x28]
mov dword [rsp + 0x1c0], r12d
mov dword [rsp + 0x1c8], r12d
mov dword [rsp + 0x118], 0x20
mov qword [rsp + 0x120], rax
call fcn.00025100
lea rax, [rsp + 0x60]
lea r8, [rsp + 0xe0]
lea rcx, [rsp + 0x40]
mov edx, 0x20019
mov qword [rsp + 0xf0], rax
mov dword [rsp + 0xe0], 0x30
mov qword [rsp + 0xe8], r12
mov dword [rsp + 0xf8], 0x240
mov qword [rsp + 0x100], r12
mov qword [rsp + 0x108], r12
mov qword [rsp + 0x40], r12
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
cmp eax, r12d
jl 0x2373e
mov rcx, qword [rsp + 0x40]
xor r9d, r9d
lea rax, [rsp + 0x1b8]
lea ebx, [r9 + 2]
xor r8d, r8d
mov dword [rsp + 0x1b8], r12d
mov edx, ebx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntoskrnl.exe_ZwQueryKey]
cmp eax, r12d
jge 0x23412
cmp eax, 0x80000005
je 0x23412
cmp eax, 0xc0000023
je 0x23412
mov rcx, qword [rsp + 0x38]
mov r11d, 0x4d746147
mov edx, r11d
call fcn.00012ebc
mov rcx, qword [rsp + 0x50]
mov edx, r11d
mov qword [rsp + 0x38], r12
call fcn.00012ebc
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x50], r12
call qword [sym.imp.ntoskrnl.exe_ZwClose]
jmp 0x2376e
mov eax, dword [rsp + 0x1b8]
cmp eax, r12d
je 0x233d8
cmp eax, r13d
ja 0x233d8
mov ecx, 0x6020000
call fcn.00024fc4
mov r9d, dword [rsp + 0x1b8]
mov rcx, r9
cmp r9, r12
je 0x2344f
call fcn.00012db4
mov r9d, dword [rsp + 0x1b8]
mov rdi, rax
jmp 0x23452
mov rdi, r12
cmp rdi, r12
je 0x233d8
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x1b8]
mov r8, rdi
mov edx, ebx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntoskrnl.exe_ZwQueryKey]
cmp eax, r12d
jl 0x23785
cmp dword [rsp + 0x1b8], r12d
je 0x23785
mov esi, r12d
cmp dword [rdi + 0x14], r12d
jbe 0x23720
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x1b8]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov edx, esi
mov dword [rsp + 0x20], r12d
call qword [sym.imp.ntoskrnl.exe_ZwEnumerateKey]
cmp eax, r12d
jge 0x234d4
cmp eax, 0x80000005
je 0x234d4
cmp eax, 0xc0000023
jne 0x23720
mov eax, dword [rsp + 0x1b8]
cmp eax, r12d
je 0x23720
cmp eax, r13d
ja 0x23720
mov ecx, 0x6020000
call fcn.00024fc4
mov r11d, dword [rsp + 0x1b8]
mov rcx, r11
cmp r11, r12
je 0x23519
call fcn.00012db4
mov r11d, dword [rsp + 0x1b8]
mov rbx, rax
jmp 0x2351c
mov rbx, r12
cmp rbx, r12
je 0x23720
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x1b8]
mov r9, rbx
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov edx, esi
mov dword [rsp + 0x20], r11d
call qword [sym.imp.ntoskrnl.exe_ZwEnumerateKey]
cmp eax, r12d
jl 0x23713
cmp dword [rsp + 0x1b8], r12d
je 0x23713
movzx ecx, word [rbx + 0xc]
mov word [rsp + 0xa0], cx
movzx eax, word [rbx + 0xc]
mov word [rsp + 0xa2], ax
lea rax, [rbx + 0x10]
mov qword [rsp + 0xa8], rax
cmp cx, 0x14
jbe 0x236d6
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_RtlAppendUnicodeStringToString]
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_RtlAppendUnicodeStringToString]
mov rdx, qword [rsp + 0x50]
lea r8, [rsp + 0x110]
xor r9d, r9d
xor ecx, ecx
mov qword [rsp + 0x20], r12
call qword [sym.imp.ntoskrnl.exe_RtlQueryRegistryValues]
cmp word [rsp + 0x48], r12w
je 0x236d6
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_RtlAppendUnicodeStringToString]
xor edx, edx
lea rcx, [rsp + 0xb8]
lea r8d, [rdx + 0x28]
call fcn.00025100
lea rax, [rsp + 0x30]
lea r8, [rsp + 0xb0]
lea rcx, [rsp + 0x58]
mov edx, 0x20006
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0x58], r12
mov dword [rsp + 0xb0], 0x30
mov qword [rsp + 0xb8], r12
mov dword [rsp + 0xc8], 0x240
mov qword [rsp + 0xd0], r12
mov qword [rsp + 0xd8], r12
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
cmp eax, r12d
jl 0x236d6
xor eax, eax
lea rdx, [0x000286c0]
lea rcx, [rsp + 0x70]
mov word [rsp + 0x70], r12w
mov qword [rsp + 0x72], rax
mov dword [rsp + 0x7a], eax
mov word [rsp + 0x7e], ax
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov rcx, qword [rsp + 0x58]
cmp word [rbp], r12w
jbe 0x236cb
cmp rcx, r12
je 0x236d6
cmp qword [rsp + 0x78], r12
je 0x236cb
movzx eax, word [rbp + 2]
lea rdx, [rsp + 0x70]
mov r9d, 1
mov dword [rsp + 0x28], eax
mov rax, qword [rbp + 8]
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntoskrnl.exe_ZwSetValueKey]
mov rcx, qword [rsp + 0x58]
cmp rcx, r12
je 0x236d6
call qword [sym.imp.ntoskrnl.exe_ZwClose]
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_RtlCopyUnicodeString]
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_RtlCopyUnicodeString]
mov edx, 0x504249
mov rcx, rbx
call fcn.00012ebc
inc esi
cmp esi, dword [rdi + 0x14]
jb 0x23498
jmp 0x23720
mov edx, 0x504249
mov rcx, rbx
call fcn.00012ebc
mov edx, 0x504649
mov rcx, rdi
call fcn.00012ebc
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
or qword [rsp + 0x40], 0xffffffffffffffff
cmp word [rsp + 0x30], r12w
jbe 0x2376e
mov rcx, qword [rsp + 0x38]
mov r11d, 0x4d746147
mov edx, r11d
call fcn.00012ebc
cmp word [rsp + 0x30], r12w
jbe 0x2376e
mov rcx, qword [rsp + 0x50]
mov edx, r11d
call fcn.00012ebc
mov rbx, qword [rsp + 0x1b0]
add rsp, 0x180
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov edx, 0x504649
mov rcx, rdi
call fcn.00012ebc
jmp 0x233d8