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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4ce988
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x202c
call fcn.004a1b30
mov eax, dword [0x4ffeb0]
xor eax, esp
mov dword [esp + 0x2028], eax
push ebx
push esi
push edi
mov eax, dword [0x4ffeb0]
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 0x40f1b2
xor eax, eax
jmp 0x40f41c
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 0x40f296
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 0x40f418
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 0x40f405
lea esp, [esp]
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x24]
call fcn.00404030
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x204c], edi
call fcn.00413880
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 0x40f26e
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 0x40f220
jmp 0x40f405
mov edx, dword [esi + 4]
mov ecx, dword [edx - 0xc]
lea eax, [esi + 4]
cmp ecx, ebx
je 0x40f2d9
push 0x4e0c60
push eax
lea eax, [esp + 0x38]
push eax
call fcn.00406480
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.00413670
add esp, 0x18
mov ebx, 3
jmp 0x40f2db
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 0x40f328
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 0x40f328
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 0x40f358
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 0x40f358
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [esp + 0x1b], 0
je 0x40f418
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 0x40f405
mov edi, edi
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00404030
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x204c], 2
call fcn.00413880
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 0x40f3e2
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 0x40f390
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.004a0e91
mov esp, ebp
pop ebp
ret