Function at 0x402470
Capabilities:
Check os version
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x320
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x14], 0x104
mov dword [esp + 0x18], 0
xor bl, bl
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 5
lea edx, [esp + 0x24]
mov edi, str.SYSTEMCurrentControlSetEnumRootPorts
je 0x4024a4
mov edi, str.EnumRootPorts
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x24]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x20]
push ecx
push 0x20019
push 0
push edx
push 0x80000002
call ebp
test eax, eax
jne 0x4026cf
mov ecx, dword [esp + 0x334]
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x22c]
push 0x104
and ecx, 0xff
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x4026b2
mov edi, 0x4063a8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x24]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x24]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x22c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0x20019
lea ecx, [esp + 0x2c]
push 0
push ecx
push 0x80000002
call ebp
mov ecx, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0x14]
lea eax, [esp + 0x128]
push edx
push eax
push 0
push 0
push str.FriendlyName
push ecx
call esi
test eax, eax
jne 0x40268d
push 7
lea edx, [esp + 0x12c]
push str.Bluelet
push edx
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x40268d
lea eax, [esp + 0x128]
push 0x406398
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
mov edx, eax
add esp, 8
test edx, edx
je 0x40268d
lea edi, [esp + 0x128]
or ecx, 0xffffffff
xor eax, eax
add edx, 3
repne scasb al, byte es:[edi]
not ecx
dec ecx
push edx
mov byte [esp + ecx + 0x12b], al
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov bl, al
mov dword [esp + 0x14], 4
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 5
jne 0x40266a
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
push 0x20019
push 0
push str.Device_Parameters
push edx
call ebp
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
push ecx
push 0
push 0
push str.UsageType
push edx
call esi
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x402684
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x18]
push ecx
push edx
push 0
push 0
push str.UsageType
push eax
call esi
cmp dword [esp + 0x18], 1
je 0x40268d
xor bl, bl
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov al, bl
pop ebp
pop ebx
add esp, 0x320
ret 4
mov edx, dword [esp + 0x20]
or bl, 0xff
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov al, bl
pop ebp
pop ebx
add esp, 0x320
ret 4
pop edi
pop esi
pop ebp
or al, 0xff
pop ebx
add esp, 0x320
ret 4