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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40a1ce
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x9a4
push ebx
push esi
push edi
mov esi, ecx
push 0x3f8
mov dword [ebp - 0x20], esi
call sub.MFC42.DLL_CWnd::GetDlgItem
mov ebx, eax
call sub.MFC42.DLL_AfxGetModuleState
mov ecx, dword [eax + 4]
call sub.MFC42.DLL_CCmdTarget::BeginWaitCursor
mov eax, dword [ebx + 0x20]
xor edi, edi
push edi
push edi
push 0x184
push eax
mov dword [ebp - 4], edi
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x58], edi
cmp eax, edi
mov dword [ebp - 0x54], edi
je 0x407880
cmp byte [eax], 0
je 0x407880
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
lea eax, [edi + edi]
add eax, 3
and al, 0xfc
call fcn.00409230
mov ecx, dword [ebp + 8]
mov eax, esp
push edi
push ecx
push eax
call fcn.00408760
mov dword [ebp - 0x54], eax
xor edi, edi
lea edx, [ebp - 0x40]
lea eax, [ebp - 0x58]
push edx
push 1
push eax
push 0x17
push edi
push 0x40c740
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x40], 0x40cbc8
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edi
call dword [sym.imp.ole32.dll_CoCreateInstanceEx]
cmp eax, edi
mov dword [ebp - 0x2c], eax
jl 0x407aaf
cmp dword [ebp - 0x38], edi
jl 0x407aaf
mov edi, dword [ebp - 0x3c]
lea edx, [ebp - 0x18]
lea eax, [esi + 0x9c]
push edx
push eax
push 1
mov dword [ebp - 0x18], 0
mov ecx, dword [edi]
push eax
push 1
push edi
mov dword [ebp - 0x44], edi
call dword [ecx + 0xc]
mov esi, eax
test esi, esi
jl 0x407a74
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x10]
push edx
lea edx, [ebp - 0x9b0]
mov ecx, dword [eax]
push edx
push 0x64
push eax
call dword [ecx + 0xc]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x10]
test eax, eax
mov dword [ebp - 0x28], 0
jbe 0x407a55
lea eax, [ebp - 0x9b0]
mov dword [ebp + 8], eax
mov ecx, dword [edi]
lea edx, [ebp - 0x24]
push edx
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x34]
push eax
push edx
push edi
call dword [ecx + 0x10]
test eax, eax
jl 0x407a3a
push 0x18
call sub.MFC42.DLL_operatornew
mov esi, eax
add esp, 4
mov dword [ebp - 0x48], esi
test esi, esi
mov byte [ebp - 4], 3
je 0x40798a
mov eax, dword [ebp - 0x34]
mov edi, dword [ebp - 0x24]
push eax
mov ecx, esi
call sub.MFC42.DLL_CString::CString_1
push edi
lea ecx, [esi + 4]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::CString_1
mov edx, dword [ebp + 8]
lea ecx, [esi + 8]
mov eax, dword [edx]
mov dword [ecx], eax
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov eax, dword [edx + 8]
mov dword [ecx + 8], eax
mov edx, dword [edx + 0xc]
mov dword [ecx + 0xc], edx
jmp 0x40798c
xor esi, esi
mov eax, dword [ebp - 0x20]
push esi
mov byte [ebp - 4], 0
lea ecx, [eax + 0x80]
call sub.MFC42.DLL_CPtrList::AddTail
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esi + 4]
mov edx, dword [esi]
push ecx
push edx
lea eax, [ebp - 0x14]
push str._s____s_
push eax
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::Format
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebx + 0x20]
add esp, 0x10
push ecx
push 0
push 0x180
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, eax
mov eax, dword [ebx + 0x20]
push esi
push edi
push 0x19a
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [ebp - 0x20]
mov ecx, dword [esi]
push ecx
mov eax, dword [edx + 0x64]
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
neg eax
sbb eax, eax
inc eax
test al, al
je 0x407a19
mov ecx, dword [ebx + 0x20]
push 0
push edi
push 0x186
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [ebp - 0x34]
mov esi, dword [sym.imp.ole32.dll_CoTaskMemFree]
push edx
call esi
mov eax, dword [ebp - 0x24]
push eax
call esi
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.00408d0a
mov edi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
inc eax
add edx, 0x10
cmp eax, ecx
mov dword [ebp - 0x28], eax
mov dword [ebp + 8], edx
jb 0x407920
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x4078ec
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov edx, dword [edi]
push edi
call dword [edx + 8]
jmp 0x407e28
push str.EnumClassesOfCategories_failed:
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [ebp - 0x10]
mov ecx, dword [0x40f780]
push esi
push eax
mov byte [ebp - 4], 6
call fcn.00406490
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0
call fcn.00408d0a
mov ecx, dword [edi]
push edi
call dword [ecx + 8]
mov esi, dword [ebp - 0x20]
jmp 0x407b48
push str.Error_connecting_to_OPC_2.0_Server_Browser.
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [esi + 0x60]
mov byte [ebp - 4], 1
cmp dword [eax - 8], edi
je 0x407ada
push eax
lea edx, [ebp - 0x14]
push str.Error_connecting_to_OPC_2.0_Server_Browser_on__s.
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov eax, dword [ebp - 0x2c]
cmp eax, 0x80040154
jne 0x407b1e
push str.Please_install_the_OPC_2.0_Components.
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [esi + 0x60]
mov byte [ebp - 4], 2
cmp dword [eax - 8], edi
je 0x407b0f
push eax
lea eax, [ebp - 0x10]
push str.Please_install_the_OPC_2.0_Components_on__s.
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.00408d0a
mov eax, dword [ebp - 0x2c]
cmp eax, edi
jge 0x407b29
mov ecx, dword [ebp - 0x14]
push eax
push ecx
jmp 0x407b31
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x14]
push edx
push eax
mov ecx, dword [0x40f780]
call fcn.00406490
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.00408d0a
add esi, 0x9c
mov ecx, 0x10
mov edi, 0x40c750
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x407b82
mov eax, dword [ebp + 8]
xor edi, edi
cmp eax, edi
mov dword [ebp - 0x30], 0x80000000
je 0x407b9d
lea ecx, [ebp - 0x30]
push ecx
push 0x80000000
push eax
call dword [sym.imp.ADVAPI32.dll_RegConnectRegistryA]
cmp eax, edi
je 0x407b9d
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_AfxGetModuleState
mov ecx, dword [eax + 4]
call sub.MFC42.DLL_CCmdTarget::EndWaitCursor
xor eax, eax
jmp 0x407e41
lea edx, [ebp - 0x70]
lea eax, [ebp - 0x1c]
push edx
mov edx, dword [ebp - 0x30]
push edi
push edi
push edi
lea ecx, [ebp - 0x170]
push eax
push ecx
push edi
push edx
mov dword [ebp - 0x1c], 0x100
mov dword [ebp - 0x24], edi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x407e20
mov edx, dword [ebp - 0x30]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp + 8]
lea ecx, [ebp - 0x170]
push eax
push 1
push edi
push ecx
push edx
mov dword [ebp + 8], edi
call esi
test eax, eax
jne 0x407ded
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
push 1
push edi
push 0x40f064
push ecx
mov dword [ebp - 0x18], edi
call esi
test eax, eax
jne 0x407de3
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x10]
push edx
push 1
push edi
push str.CLSID
push eax
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x10], edi
call esi
test eax, eax
jne 0x407cba
lea ecx, [ebp - 0x1c]
lea edx, [ebp - 0x270]
push ecx
lea eax, [ebp - 0x28]
push edx
mov edx, dword [ebp - 0x10]
push eax
lea ecx, [ebp - 0x170]
push edi
push ecx
push edx
mov dword [ebp - 0x1c], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x407cba
lea eax, [ebp - 0x270]
test eax, eax
je 0x407c95
lea ecx, [ebp - 0x270]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.00409230
mov eax, esp
lea edx, [ebp - 0x270]
push esi
push edx
push eax
call fcn.00408760
lea ecx, [ebp - 0x68]
push ecx
push eax
call dword [sym.imp.ole32.dll_CLSIDFromString]
cmp eax, edi
jge 0x407cba
mov ecx, dword [0x40f780]
push eax
push str.CLSIDFromString:
call fcn.00406490
jmp 0x407df4
lea edx, [ebp - 0x1c]
lea eax, [ebp - 0x370]
push edx
lea ecx, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x18]
push ecx
lea edx, [ebp - 0x170]
push edi
push edx
push eax
mov dword [ebp - 0x1c], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push 0x18
call sub.MFC42.DLL_operatornew
mov esi, eax
add esp, 4
mov dword [ebp - 0x48], esi
cmp esi, edi
mov byte [ebp - 4], 7
je 0x407d6c
lea ecx, [ebp - 0x170]
test ecx, ecx
jne 0x407d07
xor eax, eax
jmp 0x407d36
lea edx, [ebp - 0x170]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
lea eax, [edi + edi]
add eax, 3
and al, 0xfc
call fcn.00409230
mov eax, esp
lea ecx, [ebp - 0x170]
push edi
push ecx
push eax
call fcn.00408760
xor edi, edi
push eax
mov ecx, esi
call sub.MFC42.DLL_CString::CString_1
push 0x40f638
lea ecx, [esi + 4]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [ebp - 0x68]
lea edx, [esi + 8]
mov dword [esi + 8], eax
mov ecx, dword [ebp - 0x64]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x60]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x5c]
mov dword [edx + 0xc], ecx
jmp 0x407d6e
xor esi, esi
mov edx, dword [ebp - 0x20]
push esi
mov byte [ebp - 4], 0
lea ecx, [edx + 0x80]
call sub.MFC42.DLL_CPtrList::AddTail
mov eax, dword [esi]
mov ecx, dword [ebx + 0x20]
push eax
push edi
push 0x180
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [ebx + 0x20]
mov edi, eax
push esi
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push edi
push 0x19a
push edx
call esi
mov ecx, dword [ebp - 0x20]
lea eax, [ebp - 0x170]
push eax
mov edx, dword [ecx + 0x64]
push edx
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
neg eax
sbb eax, eax
inc eax
test al, al
je 0x407dd7
mov eax, dword [ebx + 0x20]
push 0
push edi
push 0x186
push eax
call esi
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x1c], 0x100
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x70]
push ecx
push edi
push edi
lea edx, [ebp - 0x1c]
push edi
lea ecx, [ebp - 0x170]
inc eax
push edx
mov edx, dword [ebp - 0x30]
push ecx
push eax
push edx
mov dword [ebp - 0x24], eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x407bcc
mov ecx, dword [ebp - 0x20]
call fcn.00407eb0
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_AfxGetModuleState
mov ecx, dword [eax + 4]
call sub.MFC42.DLL_CCmdTarget::EndWaitCursor
mov eax, 1
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x9bc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4