Function at 0x40baa0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4c4978
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x202c
call fcn.004985e0
mov eax, dword [0x4f4de0]
xor eax, esp
mov dword [esp + 0x2028], eax
push ebx
push esi
push edi
mov eax, dword [0x4f4de0]
xor eax, esp
push eax
lea eax, [esp + 0x2040]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], ebx
mov eax, dword [esi]
cmp eax, ebx
jne 0x40bb02
xor eax, eax
jmp 0x40bd6c
mov ecx, dword [esi + 8]
lea edi, [esi + 8]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], ebx
cmp dword [ecx - 0xc], ebx
jne 0x40bbe6
mov ecx, dword [esi + 4]
lea edx, [esp + 0x14]
push edx
mov edx, dword [esi + 0xc]
or edx, 8
push edx
push ebx
push ecx
push eax
mov dword [esp + 0x38], 0x1000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
xor edi, edi
cmp eax, edi
jne 0x40bd68
mov edx, dword [esp + 0x14]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
push edi
push edi
push edi
push edi
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x48]
push ecx
push edi
push edx
xor esi, esi
call ebx
test eax, eax
jne 0x40bd55
lea esp, [esp]
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x24]
call fcn.00404050
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x204c], edi
call fcn.004105d0
mov dword [esp + 0x2048], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40bbbe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
push edi
push edi
push edi
push edi
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x48]
push edx
inc esi
push esi
push eax
mov dword [esp + 0x44], 0x1000
call ebx
test eax, eax
je 0x40bb70
jmp 0x40bd55
mov edx, dword [esi + 4]
mov ecx, dword [edx - 0xc]
lea eax, [esi + 4]
cmp ecx, ebx
je 0x40bc29
push 0x4d689c
push eax
lea eax, [esp + 0x38]
push eax
call fcn.004067a0
mov ecx, 1
mov dword [esp + 0x2054], ecx
push edi
mov dword [esp + 0x30], ecx
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.00410450
add esp, 0x18
mov ebx, 3
jmp 0x40bc2b
mov eax, edi
mov ecx, dword [esi + 0xc]
mov eax, dword [eax]
lea edx, [esp + 0x14]
push edx
mov edx, dword [esi]
or ecx, 1
push ecx
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
sete byte [esp + 0x1b]
test bl, 2
je 0x40bc78
mov eax, dword [esp + 0x24]
and ebx, 0xfffffffd
add eax, 0xfffffff0
mov dword [esp + 0x20], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bc78
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x2048], 0xffffffff
test bl, 1
je 0x40bca8
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bca8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [esp + 0x1b], 0
je 0x40bd68
mov eax, dword [esp + 0x14]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
xor esi, esi
push esi
push esi
push esi
push esi
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x48]
push edx
push esi
mov edi, 0x1000
push eax
mov dword [esp + 0x3c], edi
call ebx
test eax, eax
jne 0x40bd55
mov edi, edi
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00404050
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x204c], 2
call fcn.004105d0
mov dword [esp + 0x2048], 0xffffffff
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bd32
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x48]
push edx
inc esi
push esi
push eax
mov dword [esp + 0x3c], edi
call ebx
test eax, eax
je 0x40bce0
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x1c], 1
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2040]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2028]
xor ecx, esp
call fcn.00497941
mov esp, ebp
pop ebp
ret