Function at 0x410880
Capabilities:
Print debug messages
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x20c]
sub esp, 0x20c
push 0xffffffffffffffff
push 0x418d40
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x4294ec]
xor eax, ebp
mov dword [ebp + 0x208], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x214]
mov edx, dword [0x429700]
mov dword [ebp - 0x28], eax
mov eax, dword [edx + 0xc]
xor ebx, ebx
mov ecx, 0x429700
mov dword [ebp - 0x38], ebx
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0x218]
push ecx
lea edx, [ebp - 0x14]
push str.COM_d
push edx
mov dword [ebp - 4], ebx
call fcn.00405d50
mov eax, dword [0x429700]
mov edx, dword [eax + 0xc]
add esp, 0xc
mov ecx, 0x429700
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
push eax
lea ecx, [ebp - 0x10]
push str._NPSInternetConnector__GetFriendlyName2ComPort_strCOMPort___s
push ecx
mov byte [ebp - 4], 1
call fcn.00405d50
mov esi, dword [ebp - 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add esp, 0xc
push esi
call edi
lea edx, [ebp - 0x18]
push edx
push 0x20019
push ebx
push str.SYSTEMCurrentControlSetControlClass4D36E96D_E325_11CE_BFC1_08002BE10318
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
je 0x41097e
mov edi, dword [ebp - 0x28]
push 0x41caf8
mov ecx, edi
call fcn.00406430
add esi, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jmp 0x410b3d
mov edx, dword [ebp - 0x18]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea ecx, [ebp - 0x20]
push ecx
push ebx
push ebx
push ebx
push ebx
push edx
mov dword [ebp - 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
add eax, eax
call fcn.00417730
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
mov ebx, esp
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x2c]
push ecx
push ebx
push 0
push edx
mov dword [ebp - 0x2c], eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov dword [ebp - 0x30], 1
cmp eax, 0x103
je 0x410af6
lea ebx, [ebx]
push ebx
lea eax, [ebp - 0x10]
push str._NPSInternetConnector__GetFriendlyName2ComPort_pszKeyName___s
push eax
mov dword [ebp - 0x24], 0x208
mov dword [ebp - 0x34], 0
call fcn.00405d50
mov esi, dword [ebp - 0x10]
add esp, 0xc
push esi
call edi
mov edx, dword [ebp - 0x18]
lea ecx, [ebp - 0x1c]
push ecx
push 0x20019
push 0
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x410acd
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp]
push ecx
lea edx, [ebp - 0x34]
push edx
push 0
push str.AttachedTo
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [ebp]
push ecx
lea edx, [ebp - 0x10]
push str._NPSInternetConnector__GetFriendlyName2ComPort_COM___s
push edx
call fcn.00405d50
mov esi, dword [ebp - 0x10]
add esp, 0xc
push esi
call edi
mov ecx, dword [ebp - 0x14]
lea eax, [ebp]
push eax
push ecx
call dword [sym.imp.MSVCR90.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x410ab9
lea edx, [ebp - 0x24]
push edx
mov edx, dword [ebp - 0x1c]
lea eax, [ebp]
push eax
lea ecx, [ebp - 0x34]
push ecx
push 0
push str.FriendlyName
push edx
mov dword [ebp - 0x24], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x38], eax
lea eax, [ebp]
push eax
lea ecx, [ebp - 0x10]
push str._NPSInternetConnector__GetFriendlyName2ComPort_FriendlyName___s
push ecx
call fcn.00405d50
mov esi, dword [ebp - 0x10]
add esp, 0xc
push esi
call edi
cmp dword [ebp - 0x38], 0
je 0x410b0d
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x410ac7
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x2c], edx
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x18]
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x2c]
push eax
push ebx
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc dword [ebp - 0x30]
cmp eax, 0x103
jne 0x4109e0
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x410956
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x410956
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x410b1b
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x28]
lea ecx, [ebp]
push ecx
mov ecx, edi
call fcn.00406430
add esi, 0xfffffff0
mov byte [ebp - 4], 0
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x410b49
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x410b6f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
lea esp, [ebp - 0x48]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x208]
xor ecx, ebp
call fcn.0041759c
add ebp, 0x20c
mov esp, ebp
pop ebp
ret