Function at 0x402670
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x408f0b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x90
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], ebp
call fcn.00408594
mov eax, dword [ebp + 0x80]
xor edi, edi
cmp eax, edi
mov dword [esp + 0xa8], edi
je 0x4026fd
mov ebx, dword [ebp + 0x78]
cmp ebx, edi
je 0x4026da
jmp 0x4026bc
xor edi, edi
lea esi, [ebx + 8]
push 0
mov ecx, esi
call fcn.00402c30
add esi, 8
mov eax, edi
dec edi
test eax, eax
jne 0x4026bf
mov ebx, dword [ebx]
test ebx, ebx
jne 0x4026ba
xor edi, edi
mov ecx, dword [ebp + 0x88]
mov dword [ebp + 0x80], edi
mov dword [ebp + 0x84], edi
mov dword [ebp + 0x7c], edi
mov dword [ebp + 0x78], edi
call sub.MFC42.DLL_CPlex::FreeDataChain
mov dword [ebp + 0x88], edi
lea ecx, [esp + 0x1c]
push ecx
push 0x20019
push edi
push str.HARDWAREDEVICEMAPSERIALCOMM_
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, edi
je 0x402730
push edi
push edi
push 0x40d1c4
call sub.MFC42.DLL_AfxMessageBox
mov dword [ebp + 0x68], edi
jmp 0x40291a
xor esi, esi
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x50]
push edx
lea edx, [esp + 0x34]
push ecx
push edx
lea ecx, [esp + 0x34]
push edi
lea edx, [esp + 0x44]
mov eax, esi
push ecx
push edx
push eax
mov eax, dword [esp + 0x38]
inc esi
push eax
mov dword [esp + 0x48], 0x19
mov dword [esp + 0x4c], 0x50
mov dword [esp + 0x44], esi
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, edi
mov dword [esp + 0x20], eax
je 0x402782
cmp eax, 0xea
jne 0x4028fc
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x18]
call fcn.0040840e
lea edx, [esp + 0x53]
push edx
call dword [sym.imp.MSVCRT.dll_atoi]
mov esi, dword [esp + 0x1c]
add esp, 4
mov ebp, eax
mov ebx, dword [esi + 0x80]
mov dword [esp + 0x10], ebp
test ebx, ebx
jne 0x4027f4
mov eax, dword [esi + 0x78]
add esi, 0x74
push eax
push ebx
mov ecx, esi
call fcn.00402bc0
mov ecx, dword [esp + 0x10]
mov edi, eax
lea edx, [esp + 0x14]
mov dword [edi + 8], ecx
push edx
lea ecx, [edi + 0xc]
call sub.MFC42.DLL_CString::operator_1
mov eax, dword [esi + 4]
test eax, eax
je 0x4027e9
mov dword [eax + 4], edi
mov dword [esi + 4], edi
jmp 0x4028e7
mov dword [esi + 8], edi
mov dword [esi + 4], edi
jmp 0x4028e7
xor ecx, ecx
test ebx, ebx
jle 0x402829
mov eax, dword [esi + 0x80]
lea edi, [esi + 0x74]
cmp ecx, eax
jge 0x40281d
test ecx, ecx
jl 0x40281d
mov edx, dword [edi + 4]
je 0x40281f
mov esi, ecx
mov edx, dword [edx]
dec esi
jne 0x402812
mov esi, dword [esp + 0x18]
jmp 0x40281f
xor edx, edx
cmp ebp, dword [edx + 8]
jl 0x402861
inc ecx
cmp ecx, ebx
jl 0x402803
mov ecx, dword [esi + 0x7c]
add esi, 0x74
push 0
push ecx
mov ecx, esi
call fcn.00402bc0
mov edx, dword [esp + 0x10]
mov edi, eax
lea eax, [esp + 0x14]
push eax
lea ecx, [edi + 0xc]
mov dword [edi + 8], edx
call sub.MFC42.DLL_CString::operator_1
mov eax, dword [esi + 8]
test eax, eax
je 0x4028e1
mov dword [eax], edi
jmp 0x4028e4
cmp ecx, dword [edi + 0xc]
jge 0x402878
test ecx, ecx
jl 0x402878
mov esi, dword [edi + 4]
je 0x40287a
lea eax, [ecx]
mov esi, dword [esi]
dec eax
jne 0x402871
jmp 0x40287a
xor esi, esi
test esi, esi
jne 0x4028b0
mov eax, dword [edi + 4]
mov ecx, edi
push eax
push esi
call fcn.00402bc0
mov esi, eax
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esi + 8]
call fcn.00402950
mov eax, dword [edi + 4]
test eax, eax
je 0x4028a8
mov dword [eax + 4], esi
mov dword [edi + 4], esi
jmp 0x4028e7
mov dword [edi + 8], esi
mov dword [edi + 4], esi
jmp 0x4028e7
mov edx, dword [esi + 4]
push esi
push edx
mov ecx, edi
call fcn.00402bc0
mov ebx, eax
lea eax, [esp + 0x10]
push eax
lea ecx, [ebx + 8]
call fcn.00402950
mov eax, dword [esi + 4]
test eax, eax
je 0x4028d9
mov dword [eax], ebx
mov dword [esi + 4], ebx
jmp 0x4028e7
mov dword [edi + 4], ebx
mov dword [esi + 4], ebx
jmp 0x4028e7
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
mov ecx, dword [eax + 0x68]
inc ecx
xor edi, edi
mov dword [eax + 0x68], ecx
mov eax, dword [esp + 0x20]
cmp eax, edi
je 0x402732
cmp eax, 0xea
je 0x402732
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x14]
mov dword [esp + 0xa8], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0xa0]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x9c
ret