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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41a9b3
mov eax, dword fs:[0]
push eax
sub esp, 0x1d4
mov eax, dword [0x427664]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp - 0x1d0], edi
mov dword [ebp - 0x1c4], ebx
mov dword [ebp - 0x1d8], esi
mov dword [ebp - 4], esi
xor ecx, ecx
push esi
push esi
mov eax, ecx
push esi
inc ecx
push esi
mov dword [ebp - 0x1c0], ecx
lea ecx, [ebp - 0x198]
push ecx
lea edx, [ebp - 0x194]
push edx
push eax
push edi
mov dword [ebp - 0x198], pe_nt_image_headers32
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x40cf4d
lea eax, [ebp - 0x19c]
push eax
push 0x20019
push esi
lea ecx, [ebp - 0x194]
push ecx
push edi
mov dword [ebp - 0x19c], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40cc77
push str.Could_not_read_from_HKLMEnum..._
lea ecx, [ebp - 0x1c0]
call dword [0x41ca04]
lea edx, [ebp - 0x194]
push edx
push eax
lea eax, [ebp - 0x1dc]
push eax
mov byte [ebp - 4], 1
call fcn.00404c10
add esp, 0xc
push 0x423ca4
lea ecx, [ebp - 0x1dc]
push ecx
call sub.MSVCR100.dll__CxxThrowException
mov ecx, dword [ebp - 0x19c]
lea edx, [ebp - 0x198]
push edx
lea eax, [ebp - 0x94]
push eax
push esi
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push str.PORTNAME
mov edi, 0x80
push ecx
mov dword [ebp - 0x198], edi
call esi
test eax, eax
jne 0x40cef4
lea edx, [ebp - 0x94]
push edx
lea ecx, [ebp - 0x1a0]
call dword [0x41ca04]
lea ecx, [ebp - 0x1a4]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov edx, dword [ebp - 0x19c]
lea eax, [ebp - 0x198]
push eax
lea ecx, [ebp - 0x94]
push ecx
push 0
push 0
push str.FRIENDLYNAME
push edx
mov byte [ebp - 4], 3
mov dword [ebp - 0x198], edi
call esi
test eax, eax
jne 0x40cd0e
lea eax, [ebp - 0x94]
push eax
lea ecx, [ebp - 0x1a4]
call dword [0x41c6d0]
lea ecx, [ebp - 0x1b8]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x1b4]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x1b0]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x1a8]
mov dword [ebp - 0x1ac], 0
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push str.._
lea ecx, [ebp - 0x1d4]
mov byte [ebp - 4], 4
call dword [0x41ca04]
lea ecx, [ebp - 0x1a0]
push ecx
push eax
lea edx, [ebp - 0x1c8]
push edx
mov byte [ebp - 4], 5
call fcn.00404b90
add esp, 0xc
push eax
lea ecx, [ebp - 0x1b8]
mov byte [ebp - 4], 6
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
lea ecx, [ebp - 0x1c8]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x1d4]
mov byte [ebp - 4], 4
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea eax, [ebp - 0x1a0]
push eax
lea ecx, [ebp - 0x1b4]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
lea ecx, [ebp - 0x1a4]
push ecx
lea ecx, [ebp - 0x1b0]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
mov edx, dword [ebp + 0xc]
xor ecx, ecx
mov dword [ebp - 0x1ac], edx
mov dword [ebp - 0x1bc], ecx
xor esi, esi
mov edi, edi
mov eax, dword [ebx + 8]
cmp esi, eax
jge 0x40ce95
test ecx, ecx
jne 0x40cea8
test esi, esi
js 0x40ce90
cmp esi, eax
jge 0x40ce90
mov ecx, dword [ebp - 0x1a0]
mov eax, dword [ebx + 4]
lea edi, [esi + esi*4]
add edi, edi
add edi, edi
push ecx
lea ecx, [eax + edi + 4]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Compare]
test eax, eax
jne 0x40ce84
mov dword [ebp - 0x1bc], 1
cmp esi, dword [ebx + 8]
jge 0x40ce90
mov ebx, dword [ebx + 4]
lea edx, [ebp - 0x1b8]
add ebx, edi
push edx
mov ecx, ebx
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
lea eax, [ebp - 0x1b4]
push eax
lea ecx, [ebx + 4]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
lea ecx, [ebp - 0x1b0]
push ecx
lea ecx, [ebx + 8]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
mov edx, dword [ebp - 0x1ac]
lea eax, [ebp - 0x1a8]
push eax
lea ecx, [ebx + 0x10]
mov dword [ebx + 0xc], edx
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
mov ebx, dword [ebp - 0x1c4]
mov ecx, dword [ebp - 0x1bc]
inc esi
jmp 0x40cde0
call sub.mfc100u.dll_AfxThrowInvalidArgException
test ecx, ecx
jne 0x40cea8
lea ecx, [ebp - 0x1b8]
push ecx
push eax
mov ecx, ebx
call fcn.0040c080
lea ecx, [ebp - 0x1a8]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x1b0]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x1b4]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x1b8]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x1a4]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x1a0]
mov byte [ebp - 4], 0
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov ecx, dword [ebp - 0x19c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x1d0]
mov ecx, dword [ebp - 0x1c0]
xor esi, esi
jmp 0x40cbe0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00418c9e
mov esp, ebp
pop ebp
ret