Function at 0x18000e420
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
lea rbp, [rsp - 0x458]
sub rsp, 0x558
mov rax, qword [0x180093630]
xor rax, rsp
mov qword [rbp + 0x440], rax
or r12d, 0xffffffff
mov dword [rsp + 0x40], edx
cmp byte [0x1800962f8], 0
mov rbx, r8
mov r13, r9
mov qword [rsp + 0x50], rbx
mov edi, edx
mov esi, ecx
je 0x18001f7fe
lea rcx, [0x180096140]
call qword [sym.imp.ntdll.dll_RtlEnterCriticalSection]
cmp qword [0x1800960e8], 0
jne 0x18001f808
lea eax, [rsi - 1]
cmp eax, 1
ja 0x18001f811
cmp byte [0x1800961c8], 0
jne 0x18001f81b
lea rcx, [0x180096180]
call qword [sym.imp.ntdll.dll_RtlIsGenericTableEmpty]
test al, al
jne 0x18001f834
mov qword [rsp + 0x590], r14
mov qword [rsp + 0x550], r15
cmp byte [rbp + 0x4b0], al
jne 0x18001f900
mov rdi, qword [0x1800960e8]
lea rax, [rbp + 0x230]
xor r14d, r14d
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x2080000
lea r15, [0x180070210]
cmp esi, 1
jne 0x18000e619
lea rdx, str.RegistryMachineSoftwarePoliciesMicrosoftWindowsSafer
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntdll.dll_RtlAppendUnicodeToString]
mov rdi, r14
mov rdx, r15
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntdll.dll_RtlAppendUnicodeToString]
mov ebx, eax
test eax, eax
js 0x18000e562
lea rax, [rsp + 0x30]
mov dword [rbp - 0x80], 0x30
xorps xmm0, xmm0
mov qword [rbp - 0x70], rax
lea r8, [rbp - 0x80]
mov qword [rbp - 0x78], rdi
mov edx, 0x20019
mov dword [rbp - 0x68], 0x40
lea rcx, [rsp + 0x48]
movdqu xmmword [rbp - 0x60], xmm0
call qword [sym.imp.ntdll.dll_NtOpenKey]
mov ebx, eax
mov rax, qword [rsp + 0x38]
test rax, rax
je 0x18000e57c
lea rcx, [rbp + 0x230]
cmp rax, rcx
jne 0x18001f8a8
test ebx, ebx
js 0x18000e5db
lea rdx, str.DefaultLevel
lea rcx, [rsp + 0x70]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x20]
mov r8d, 1
mov dword [rsp + 0x20], 0x20c
lea rdx, [rsp + 0x70]
call qword [sym.imp.ntdll.dll_NtQueryValueKey]
mov ebx, eax
test eax, eax
jns 0x18001f8c8
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ntdll.dll_NtClose]
test ebx, ebx
jns 0x18001f8eb
mov r14, qword [rsp + 0x590]
mov r15, qword [rsp + 0x550]
lea rcx, [0x180096140]
call qword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
mov eax, ebx
mov rcx, qword [rbp + 0x440]
xor rcx, rsp
call fcn.180017170
add rsp, 0x558
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
cmp esi, 2
jne 0x18001f875
lea rcx, [rsp + 0x60]
call qword [sym.imp.ntdll.dll_RtlFormatCurrentUserKeyPath]
mov ebx, eax
test eax, eax
js 0x18000e562
movzx ebx, word [rsp + 0x60]
add bx, 0x78
cmp word [rsp + 0x32], bx
jb 0x18001f83e
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntdll.dll_RtlAppendUnicodeStringToString]
lea rcx, [rsp + 0x60]
mov ebx, eax
call qword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
test ebx, ebx
js 0x18000e562
lea rdx, str.SoftwarePoliciesMicrosoftWindowsSafer
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntdll.dll_RtlAppendUnicodeToString]
mov ebx, eax
test eax, eax
jns 0x18000e512
jmp 0x18000e562
mov eax, 0xc0000001
jmp 0x18000e5fa
cmp esi, 3
je 0x18000e494
mov ebx, 0xc0000030
jmp 0x18000e5eb
call fcn.1800063f0
mov ebx, eax
test eax, eax
js 0x18000e5eb
mov rbx, qword [rsp + 0x50]
jmp 0x18000e4a1
mov ebx, 0xc0000225
jmp 0x18000e5eb
mov rcx, qword gs:[0x60]
xor edx, edx
movzx r8d, bx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov qword [rsp + 0x38], rax
test rax, rax
jne 0x18001f86b
mov ebx, 0xc0000017
jmp 0x18000e5db
mov word [rsp + 0x32], bx
jmp 0x18000e64b
cmp esi, 3
jne 0x18001f8f6
test rdi, rdi
je 0x18000e515
mov ecx, 0x5c
cmp cx, 0x5c
jne 0x18000e515
movzx eax, word [r15 + 2]
add r15, 2
movzx ecx, ax
test ax, ax
jne 0x18001f888
jmp 0x18000e515
mov rcx, qword gs:[0x60]
xor edx, edx
mov r8, qword [rsp + 0x38]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
nop
jmp 0x18000e57c
cmp dword [rbp + 0x24], 4
jne 0x18001f8e1
cmp dword [rbp + 0x2c], 4
jne 0x18001f8e1
mov eax, dword [rbp + 0x28]
mov r12d, dword [rbp + rax + 0x20]
jmp 0x18000e5c8
mov ebx, 0xc0000225
jmp 0x18000e5c8
mov rbx, qword [rsp + 0x50]
mov edi, dword [rsp + 0x40]
jmp 0x18001f924
mov ebx, 0xc00000ef
jmp 0x18000e5db
mov rax, qword [0x180096088]
cmp esi, 2
je 0x18001f913
mov rax, qword [0x180095ee0]
xor r14d, r14d
mov r12d, 0x40000
test rax, rax
je 0x18001f924
mov r12d, dword [rax]
xor edx, edx
lea rcx, [rbp - 0x50]
lea r8d, [rdx + 0x70]
call sub.msvcrt.dll_memset
lea rdx, [rbp - 0x50]
mov dword [rbp - 0x50], r12d
lea rcx, [0x180096180]
call qword [sym.imp.ntdll.dll_RtlLookupElementGenericTable]
test rax, rax
jne 0x18001f957
mov ebx, 0xc0000225
jmp 0x18000e5db
test rbx, rbx
je 0x18001f969
cmp edi, 4
jb 0x18001f969
mov dword [rbx], r12d
mov ebx, r14d
jmp 0x18001f96e
mov ebx, 0xc0000023
test r13, r13
je 0x18000e5db
mov dword [r13], 4
jmp 0x18000e5db