Function at 0x405042
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0x388
mov eax, dword [0x439d24]
xor eax, dword [ebp + 0x6c]
push ebx
push esi
push edi
mov dword [ebp + 0x64], eax
call dword [0x4390a0]
xor ebx, ebx
cmp word [ebp + 0x74], bx
mov edi, eax
mov dword [ebp + 0x50], ebx
je 0x40508b
lea eax, [ebp + 0x50]
push eax
push dword [ebp + 0x7c]
push dword [ebp + 0x78]
push dword [ebp + 0x74]
push dword [ebp + 0x70]
call dword [sym.imp.OLEAUT32.dll_RegisterTypeLib]
test eax, eax
jge 0x40508b
mov dword [ebp + 0x50], ebx
push 0x27
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0x70]
call dword [sym.imp.ole32.dll_StringFromGUID2]
cmp eax, 0x27
je 0x4050a6
xor eax, eax
jmp 0x4052ec
lea eax, [ebp - 0x14]
push eax
mov dword [ebp + 0x48], ebx
mov dword [ebp + 0x44], ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [eax + eax + 2]
mov eax, esi
add eax, 3
and eax, 0xfffffffc
call fcn.00406560
mov eax, esp
push edi
push esi
lea ecx, [ebp - 0x14]
push ecx
push eax
call fcn.004038f0
push eax
lea eax, [ebp - 0x320]
push str.TYPELIB_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp + 0x4c]
push eax
lea eax, [ebp - 0x320]
push eax
push SysAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x405241
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x104
push edi
lea eax, [ebp - 0x21c]
push eax
push ebx
push dword [ebp + 0x4c]
mov dword [ebp + 0x58], ebx
call esi
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40522d
and dword [ebp + 0x5c], 0
and dword [ebp + 0x40], 0
lea eax, [ebp + 0x5c]
push eax
lea eax, [ebp - 0x21c]
push eax
push dword [ebp + 0x4c]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40521a
and dword [ebp + 0x60], eax
push edi
lea eax, [ebp - 0x118]
push eax
push 0
jmp 0x4051f7
push str.HELPDIR
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4051e9
push str.FLAGS
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4051e9
and dword [ebp + 0x54], 0
lea eax, [ebp + 0x54]
push eax
lea eax, [ebp - 0x118]
push eax
push dword [ebp + 0x5c]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4051e9
lea eax, [ebp + 0x3c]
push eax
push str.win16
push dword [ebp + 0x54]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x405295
push dword [ebp + 0x3c]
call ebx
push str.win32
push dword [ebp + 0x54]
call fcn.00404d21
push dword [ebp + 0x54]
mov dword [ebp + 0x44], eax
mov dword [ebp + 0x40], 1
call ebx
inc dword [ebp + 0x60]
push edi
lea eax, [ebp - 0x118]
push eax
push dword [ebp + 0x60]
push dword [ebp + 0x5c]
call esi
test eax, eax
je 0x405166
push dword [ebp + 0x5c]
call ebx
cmp dword [ebp + 0x40], 0
je 0x4052b9
mov dword [ebp + 0x48], 1
inc dword [ebp + 0x58]
push edi
lea eax, [ebp - 0x21c]
push eax
push dword [ebp + 0x58]
push dword [ebp + 0x4c]
call esi
test eax, eax
je 0x405130
push dword [ebp + 0x4c]
call ebx
xor ebx, ebx
cmp dword [ebp + 0x48], ebx
jne 0x405255
lea eax, [ebp - 0x320]
push eax
push SysAllocStringLen
call fcn.00404d21
mov dword [ebp + 0x44], eax
push dword [ebp + 0x44]
call fcn.00404d06
mov esi, eax
cmp esi, ebx
pop ecx
je 0x4052ea
cmp dword [ebp + 0x50], ebx
je 0x4052ea
lea eax, [ebp + 0x48]
push eax
push dword [ebp + 0x7c]
mov dword [ebp + 0x48], ebx
push dword [ebp + 0x78]
push dword [ebp + 0x74]
push dword [ebp + 0x70]
call dword [sym.imp.OLEAUT32.dll_RegisterTypeLib]
test eax, eax
jge 0x4052d8
push dword [ebp + 0x50]
call fcn.00404d65
pop ecx
jmp 0x4052e1
push dword [ebp + 0x54]
call ebx
lea eax, [ebp - 0x118]
push eax
push dword [ebp + 0x5c]
call fcn.00404d21
test eax, eax
jne 0x4051e9
and dword [ebp + 0x60], eax
jmp 0x4051ec
lea eax, [ebp - 0x21c]
push eax
push dword [ebp + 0x4c]
call fcn.00404d21
test eax, eax
jne 0x40521a
and dword [ebp + 0x58], eax
jmp 0x40521d
mov eax, dword [ebp + 0x48]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp + 0x50]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, esi
lea esp, [ebp - 0x32c]
mov ecx, dword [ebp + 0x64]
xor ecx, dword [ebp + 0x6c]
call fcn.0040600b
pop edi
pop esi
pop ebx
add ebp, 0x68
leave
ret 0x10