Function at 0x401659
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x468114]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
push edi
mov dword [ebp - 0x220], eax
xor eax, eax
push 0x100
push eax
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x208], eax
lea eax, [ebp - 0x204]
push eax
mov dword [ebp - 0x224], esi
call fcn.00416020
and dword [ebp - 0x214], 0
xor edi, edi
and dword [ebp - 0x20c], edi
add esp, 0xc
cmp dword [ebp - 0x220], edi
je 0x401a06
test esi, esi
je 0x401a06
push 0x20019
mov ecx, ebx
call fcn.004031c2
mov esi, eax
test esi, esi
js 0x401a0b
lea eax, [ebp - 0x218]
push eax
mov eax, dword [ebx + 8]
and eax, 0x300
or eax, 0x20019
push eax
push edi
push str.EventProviders
push dword [ebx + 4]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4019cd
xor ecx, ecx
lea eax, [ebp - 0x214]
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push eax
push ecx
push ecx
push ecx
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x4019cd
imul eax, dword [ebp - 0x214], 0x120
push eax
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov edi, eax
test edi, edi
jne 0x401753
mov esi, 0x8007000e
jmp 0x401a0b
imul eax, dword [ebp - 0x214], 0x120
push eax
push 0
push edi
call fcn.00416020
and dword [ebp - 0x21c], 0
add esp, 0xc
cmp dword [ebp - 0x214], 0
jbe 0x4019db
lea esi, [edi + 0x100]
mov dword [ebp - 0x210], esi
mov eax, 0x100
push eax
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.00416020
add esp, 0xc
lea eax, [ebp - 0x230]
push eax
xor eax, eax
push eax
push eax
push eax
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x204]
push eax
push dword [ebp - 0x21c]
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x4017e1
cmp eax, 0xea
jne 0x4019cd
lea eax, [ebp - 0x208]
push eax
mov eax, dword [ebx + 8]
and eax, 0x300
or eax, 0x20019
push eax
push 0
lea eax, [ebp - 0x204]
push eax
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4019cd
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x20c], 0x100
push eax
lea eax, [ebp - 0x104]
mov ecx, ebx
push eax
push str.DisplayName
push dword [ebp - 0x208]
call fcn.00402ba5
add esi, 0xffffff00
test eax, eax
jns 0x40184a
mov byte [esi], 0
push dword [ebp + 0x10]
lea eax, [ebp - 0x104]
mov ecx, ebx
push 0x100
push eax
call fcn.004036c2
push 0x100
lea eax, [ebp - 0x104]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x20c], 0x100
push eax
lea eax, [ebp - 0x104]
mov ecx, ebx
push eax
push str.ProviderConfigCLSID
push dword [ebp - 0x208]
call fcn.00402ba5
test eax, eax
jns 0x4018b3
push 0x10
push 0
push dword [ebp - 0x210]
call fcn.00416020
add esp, 0xc
lea eax, [ebp - 0x104]
push eax
call fcn.00422d70
pop ecx
lea esi, [eax + 1]
cmp esi, 0x3fffffff
jle 0x4018cf
xor eax, eax
jmp 0x4018e9
lea eax, [esi + esi]
call fcn.004147d0
mov eax, esp
lea ecx, [ebp - 0x104]
push 3
push esi
push ecx
push eax
call fcn.0040133e
push dword [ebp - 0x210]
push eax
call dword [sym.imp.ole32.dll_CLSIDFromString]
mov esi, eax
test esi, esi
js 0x4019e5
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x20c], 0x100
push eax
lea eax, [ebp - 0x104]
mov ecx, ebx
push eax
push str.ProviderGlobalCLSID
push dword [ebp - 0x208]
call fcn.00402ba5
mov esi, eax
cmp esi, 0x80070002
jne 0x401938
xor esi, esi
jmp 0x40198b
test esi, esi
js 0x40198b
lea eax, [ebp - 0x104]
push eax
call fcn.00422d70
pop ecx
lea esi, [eax + 1]
cmp esi, 0x3fffffff
jle 0x401958
xor edx, edx
jmp 0x401974
lea eax, [esi + esi]
call fcn.004147d0
mov eax, esp
lea ecx, [ebp - 0x104]
push 3
push esi
push ecx
push eax
call fcn.0040133e
mov edx, eax
mov ecx, dword [ebp - 0x210]
add ecx, 0x10
push ecx
push edx
call dword [sym.imp.ole32.dll_CLSIDFromString]
mov esi, eax
test esi, esi
js 0x4019e5
mov eax, dword [ebp - 0x208]
test eax, eax
je 0x4019a3
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and dword [ebp - 0x208], 0
mov eax, dword [ebp - 0x21c]
add dword [ebp - 0x210], 0x120
inc eax
mov dword [ebp - 0x21c], eax
cmp eax, dword [ebp - 0x214]
jae 0x4019db
mov esi, dword [ebp - 0x210]
jmp 0x401789
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
mov eax, edi
test esi, esi
jns 0x4019ee
test eax, eax
je 0x401a0b
push edi
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x401a0b
mov eax, dword [ebp - 0x220]
mov ecx, dword [ebp - 0x224]
mov dword [eax], edi
mov eax, dword [ebp - 0x214]
mov dword [ecx], eax
jmp 0x401a0b
mov esi, 0x80004003
cmp dword [ebp - 0x218], 0
je 0x401a20
push dword [ebp - 0x218]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x208]
test eax, eax
je 0x401a31
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
lea esp, [ebp - 0x23c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004146b1
leave
ret 0xc