Function at 0x41ad70
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
push esi
push str.GetDeviceProfileFromReg_called._mRegHandle__0x_x
mov dword [ebp - 0x10], ebx
call fcn.0040acd0
xor edx, edx
add esp, 8
xor eax, eax
cmp esi, edx
je 0x41b03a
push edi
mov ecx, 0x41
lea edi, [ebp - 0x118]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x10]
cmp eax, 1
mov dword [ebp - 8], edx
mov dword [ebp - 4], edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0xc], edx
jne 0x41adcd
push str.Connected_
lea eax, [ebp - 0x118]
push eax
jmp 0x41ade3
cmp eax, 2
je 0x41add7
cmp eax, 3
jne 0x41adeb
push str.Selected_
lea ecx, [ebp - 0x118]
push ecx
call fcn.00416990
add esp, 8
mov eax, dword [ebp + 8]
add eax, 8
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41adf3
lea edi, [ebp - 0x118]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41ae03
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [ebp - 0x118]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.0040acd0
mov esi, dword [ebp + 0xc]
add esp, 4
lea eax, [ebp - 4]
push eax
push 0x2001f
push 0
lea ecx, [ebp - 0x118]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x41aeac
push str.GetDeviceProfileFromReg._Profile_doesnt_exist_n
call fcn.0040acd0
mov eax, dword [ebp + 0x10]
add esp, 4
cmp eax, 1
jne 0x41ae68
test dword [ebx + 0x28], 0x100000
jne 0x41ae7a
cmp dword [ebx + 0x6b4], 0x10
jne 0x41aea1
cmp dword [ebx + 0xdfc], 4
jne 0x41aea1
push str.GetDeviceProfileFromReg._Try_selected_profile_n
call fcn.0040acd0
mov eax, dword [ebp + 8]
add esp, 4
push esi
lea ecx, [eax + 8]
push ecx
push eax
mov ecx, ebx
call fcn.0041ac00
mov ebx, eax
test ebx, ebx
jne 0x41b028
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebp + 0x10], 1
jne 0x41aebb
test dword [ebx + 0x28], 0x100000
jne 0x41aed5
cmp dword [ebx + 0x6b4], 0x10
jne 0x41af8a
cmp dword [ebx + 0xdfc], 4
jne 0x41af8a
xor eax, eax
mov ecx, 0x41
lea edi, [ebp - 0x21c]
push str.GetDeviceProfileFromReg:_try_to_find_selected_key_n
rep stosd dword es:[edi], eax
call fcn.0040acd0
add esp, 4
lea edx, [ebp - 0x14]
push edx
mov edx, dword [ebp - 4]
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0xc]
push ecx
push 0
push str.SelectedProfileKey
push edx
mov dword [ebp - 0xc], 7
mov dword [ebp - 0x14], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x41af8a
mov al, byte [ebp - 0x21c]
test al, al
je 0x41af8a
mov ecx, dword [ebp + 8]
push esi
lea eax, [ebp - 0x21c]
push eax
push ecx
mov ecx, ebx
call fcn.0041ac00
mov ebx, eax
test ebx, ebx
je 0x41af70
mov edx, dword [ebp - 4]
push edx
mov dword [ebp - 8], 1
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x21c]
push eax
push str.GetDeviceProfileFromReg:_using_this_selected_key:__s_n
call fcn.0040acd0
add esp, 8
jmp 0x41b004
push str.GetDeviceProfileFromReg:_using_this_selected_key:_doesnt_exist._using_connected_profile_instead_n
call fcn.0040acd0
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp + 0xc]
add esp, 4
mov dword [ebp - 8], 0
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp + 0x10], 1
jne 0x41afa3
test dword [ebx + 0x28], 0x100000
jne 0x41afb5
cmp dword [ebx + 0x6b4], 0x10
jne 0x41afda
cmp dword [ebx + 0xdfc], 4
jne 0x41afda
mov eax, dword [ebp + 8]
push esi
lea ecx, [eax + 8]
push ecx
push eax
mov ecx, ebx
call fcn.0041ac00
mov ebx, eax
test ebx, ebx
je 0x41afd4
mov dword [ebp - 8], 1
jmp 0x41b004
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
xor eax, eax
cmp ecx, 1
je 0x41afe9
cmp ecx, 3
jne 0x41afee
mov eax, 1
push eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x118]
push edx
push esi
push eax
mov ecx, ebx
call fcn.0041ab10
mov ebx, eax
test ebx, ebx
je 0x41b037
mov eax, dword [ebp - 8]
test eax, eax
jne 0x41b028
mov eax, dword [ebp + 0x10]
cmp eax, 1
jne 0x41b01e
mov edi, 0x4a8d98
jmp 0x41b02d
cmp eax, 2
je 0x41b028
cmp eax, 3
jne 0x41b037
mov edi, 0x4a8af0
mov esi, dword [ebp + 8]
mov ecx, 0x68
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc