Function at 0x12dfe
Capabilities:
Delete registry value
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x50
push esi
mov esi, dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
push edi
push 0x3e8
xor edi, edi
push 1
mov dword [ebp - 0x24], edi
call esi
cmp dword [ebp + 8], edi
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], edi
jne 0x12e2f
or eax, 0xffffffff
jmp 0x13051
push dword [ebp + 8]
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea eax, [ebp - 0x38]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x50]
push eax
push 0xf003f
lea eax, [ebp - 4]
push eax
mov dword [ebp - 0x50], 0x18
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x44], 0x40
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
call dword [sym.imp.ntoskrnl.exe_ZwOpenKey]
test eax, eax
jl 0x13057
push ebx
mov ebx, dword [sym.imp.ntoskrnl.exe_ZwQueryKey]
lea eax, [ebp - 8]
push eax
push edi
push edi
push 2
push dword [ebp - 4]
call ebx
push dword [ebp - 8]
push 1
call esi
mov edi, eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
mov dword [ebp - 0x28], edi
push edi
push 2
push dword [ebp - 4]
call ebx
mov eax, dword [edi + 0x24]
add eax, 0x10
push eax
push 1
mov dword [ebp - 0x2c], eax
call esi
mov dword [ebp - 0x18], eax
mov eax, dword [edi + 0x28]
add eax, 0x10
push eax
push 1
mov dword [ebp - 0x30], eax
call esi
xor ebx, ebx
cmp dword [edi + 0x20], ebx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0xc], ebx
jbe 0x12fe5
mov ebx, dword [sym.imp.ntoskrnl.exe_ZwEnumerateValueKey]
mov edi, 0x208
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x2c]
push dword [ebp - 0x18]
push 0
push dword [ebp - 0xc]
push dword [ebp - 4]
call ebx
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x30]
push dword [ebp - 0x1c]
push 2
push dword [ebp - 0xc]
push dword [ebp - 4]
call ebx
push edi
push 1
call esi
push 0x104
push 0
push eax
mov dword [ebp + 8], eax
call sub.ntoskrnl.exe_memset
add esp, 0xc
push edi
push 1
call esi
push 0x104
push 0
push dword [ebp + 8]
mov dword [ebp - 0x14], eax
call sub.ntoskrnl.exe_memset
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 8]
shr ecx, 1
push ecx
add eax, 0xc
push eax
push dword [ebp + 8]
call dword [sym.imp.ntoskrnl.exe_wcsncpy]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 8]
shr ecx, 1
push ecx
add eax, 0xc
push eax
push dword [ebp - 0x14]
call dword [sym.imp.ntoskrnl.exe_wcsncpy]
push 0x14ffc
push dword [ebp + 8]
call dword [sym.imp.ntoskrnl.exe__wcsicmp]
add esp, 0x2c
test eax, eax
je 0x12f8a
push 0x14ff4
push dword [ebp + 8]
call dword [sym.imp.ntoskrnl.exe__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x12fb9
push dword [ebp - 0x14]
call fcn.00014e30
test eax, eax
jne 0x12fb9
push edi
push 1
call esi
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
mov dword [ecx + edx*4], eax
mov edx, dword [ebp + 8]
movzx ecx, word [edx]
inc edx
mov word [eax], cx
inc edx
inc eax
inc eax
test cx, cx
jne 0x12fa7
inc dword [ebp - 0x10]
push 0
push dword [ebp + 8]
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
push 0
push dword [ebp - 0x14]
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [eax + 0x20]
jb 0x12ede
mov edi, eax
xor ebx, ebx
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
push ebx
push dword [ebp - 0x18]
call esi
push ebx
push dword [ebp - 0x1c]
call esi
push ebx
push edi
call esi
cmp dword [ebp - 0x10], ebx
jle 0x13032
mov eax, dword [ebp - 0x20]
lea edi, [eax + ebx*4]
push dword [edi]
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 4]
call dword [sym.imp.ntoskrnl.exe_ZwDeleteValueKey]
test eax, eax
jl 0x13026
inc dword [ebp - 0x24]
push 0
push dword [edi]
call esi
inc ebx
cmp ebx, dword [ebp - 0x10]
jl 0x13000
xor edi, edi
pop ebx
push edi
push dword [ebp - 0x20]
call esi
call dword [sym.imp.ntoskrnl.exe_ExGetPreviousMode]
test al, al
jne 0x1304e
push dword [ebp - 4]
call dword [sym.imp.ntoskrnl.exe_ZwClose]
mov eax, dword [ebp - 0x24]
pop edi
pop esi
leave
ret 4
mov esi, dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x13035