Function at 0x12500
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
mov word [0x1e528], ax
mov ax, word [esi + 2]
add ax, 2
movzx ecx, ax
xor ebx, ebx
push ecx
push ebx
mov word [0x1e52a], ax
mov dword [0x1e52c], ebx
call dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov dword [0x1e52c], eax
cmp eax, ebx
jne 0x1254a
pop esi
mov eax, 0xc000009a
pop ebx
mov esp, ebp
pop ebp
ret 4
movzx edx, word [0x1e52a]
push edx
push ebx
push eax
call sub.ntoskrnl.exe_memset
add esp, 0xc
push esi
push 0x1e528
call dword [sym.imp.ntoskrnl.exe_RtlCopyUnicodeString]
lea eax, [ebp - 0x2c]
push eax
push 0x20019
lea ecx, [ebp + 8]
push ecx
mov dword [ebp - 0x2c], 0x18
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x20], 0x240
mov dword [ebp - 0x24], 0x1e528
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call dword [sym.imp.ntoskrnl.exe_ZwOpenKey]
cmp eax, ebx
jl 0x12712
push edi
push str.ImagePath
lea edx, [ebp - 0xc]
push edx
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov edx, dword [ebp + 8]
mov edi, dword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push 2
lea ecx, [ebp - 0xc]
push ecx
push edx
call edi
cmp eax, 0xc0000034
je 0x12702
mov eax, dword [ebp - 4]
cmp eax, ebx
je 0x12702
add eax, 2
push eax
push ebx
mov dword [ebp - 4], eax
call dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov esi, eax
cmp esi, ebx
jne 0x1260b
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ntoskrnl.exe_ZwClose]
pop edi
pop esi
mov eax, 0xc000009a
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
push ecx
push ebx
push esi
call sub.ntoskrnl.exe_memset
mov eax, dword [ebp - 4]
add esp, 0xc
lea edx, [ebp - 4]
push edx
mov edx, dword [ebp + 8]
push eax
push esi
push 2
lea ecx, [ebp - 0xc]
push ecx
push edx
call edi
mov edi, eax
cmp edi, ebx
jge 0x12651
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ntoskrnl.exe_ZwClose]
push ebx
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 4], 2
jne 0x1269b
mov eax, dword [esi + 8]
cmp eax, 2
jbe 0x1269b
push eax
push ebx
call dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov dword [0x1e2ac], eax
cmp eax, ebx
je 0x12694
mov ecx, dword [esi + 8]
push ecx
push ebx
push eax
call sub.ntoskrnl.exe_memset
mov edx, dword [esi + 8]
mov ecx, dword [0x1e2ac]
push edx
lea eax, [esi + 0xc]
push eax
push ecx
call sub.ntoskrnl.exe_memcpy
add esp, 0x18
jmp 0x126a0
mov edi, 0xc000009a
jmp 0x126a0
mov edi, 0xc000003e
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ntoskrnl.exe_ZwClose]
push ebx
push esi
call dword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
cmp edi, ebx
jl 0x126f7
mov eax, dword [0x1e2ac]
push eax
lea ecx, [ebp - 0x14]
push ecx
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
push 0x1e2b4
push 0x1e2b0
lea edx, [ebp - 0x14]
push edx
call fcn.000122f0
mov edi, eax
cmp edi, ebx
jl 0x126f7
mov eax, dword [0x1e2b4]
mov ecx, dword [0x1e2b0]
push eax
push ecx
push ebx
call fcn.0001ad60
mov dword [0x1e2b8], eax
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ntoskrnl.exe_ZwClose]
mov eax, 0xc0000034
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4