Function at 0x416920
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x224
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov ebx, ecx
push esi
push str.GetDeviceProfileFromReg_called._mRegHandle__0x_x
mov dword [esp + 0x20], ebx
call fcn.0040aab0
xor edx, edx
add esp, 8
xor eax, eax
cmp esi, edx
je 0x416bf6
mov ecx, 0x41
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x10]
cmp eax, 1
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x14], edx
jne 0x416981
push str.Connected_
lea eax, [esp + 0x24]
push eax
jmp 0x416995
cmp eax, 2
je 0x41698b
cmp eax, 3
jne 0x41699d
push str.Selected_
lea ecx, [esp + 0x24]
push ecx
call fcn.00416270
add esp, 8
mov eax, dword [ebp + 8]
add eax, 8
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4169a5
lea edi, [esp + 0x20]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4169b3
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0x20]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.0040aab0
mov esi, dword [ebp + 0xc]
add esp, 4
lea eax, [esp + 0xc]
push eax
push 0x2001f
push 0
lea ecx, [esp + 0x2c]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x416a59
push str.GetDeviceProfileFromReg._Profile_doesnt_exist_n
call fcn.0040aab0
mov eax, dword [ebp + 0x10]
add esp, 4
cmp eax, 1
jne 0x416a15
test dword [ebx + 0x28], 0x100000
jne 0x416a27
cmp dword [ebx + 0x45c], 0x10
jne 0x416a4e
cmp dword [ebx + 0xb40], 4
jne 0x416a4e
push str.GetDeviceProfileFromReg._Try_selected_profile_n
call fcn.0040aab0
mov eax, dword [ebp + 8]
add esp, 4
push esi
lea ecx, [eax + 8]
push ecx
push eax
mov ecx, ebx
call fcn.004167b0
mov ebx, eax
test ebx, ebx
jne 0x416be5
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebp + 0x10], 1
jne 0x416a68
test dword [ebx + 0x28], 0x100000
jne 0x416a82
cmp dword [ebx + 0x45c], 0x10
jne 0x416b45
cmp dword [ebx + 0xb40], 4
jne 0x416b45
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x128]
push str.GetDeviceProfileFromReg:_try_to_find_selected_key_n
rep stosd dword es:[edi], eax
call fcn.0040aab0
add esp, 4
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x12c]
push eax
lea ecx, [esp + 0x1c]
push ecx
push 0
push str.SelectedProfileKey
push edx
mov dword [esp + 0x2c], 7
mov dword [esp + 0x34], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x416b45
mov al, byte [esp + 0x128]
test al, al
je 0x416b45
mov ecx, dword [ebp + 8]
push esi
lea eax, [esp + 0x12c]
push eax
push ecx
mov ecx, ebx
call fcn.004167b0
mov ebx, eax
test ebx, ebx
je 0x416b29
mov edx, dword [esp + 0xc]
push edx
mov dword [esp + 0x14], 1
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x128]
push eax
push str.GetDeviceProfileFromReg:_using_this_selected_key:__s_n
call fcn.0040aab0
add esp, 8
jmp 0x416bc0
push str.GetDeviceProfileFromReg:_using_this_selected_key:_doesnt_exist._using_connected_profile_instead_n
call fcn.0040aab0
mov ebx, dword [esp + 0x1c]
mov esi, dword [ebp + 0xc]
add esp, 4
mov dword [esp + 0x10], 0
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp + 0x10], 1
jne 0x416b5f
test dword [ebx + 0x28], 0x100000
jne 0x416b71
cmp dword [ebx + 0x45c], 0x10
jne 0x416b98
cmp dword [ebx + 0xb40], 4
jne 0x416b98
mov eax, dword [ebp + 8]
push esi
lea ecx, [eax + 8]
push ecx
push eax
mov ecx, ebx
call fcn.004167b0
mov ebx, eax
test ebx, ebx
je 0x416b91
mov dword [esp + 0x10], 1
jmp 0x416bc0
mov ebx, dword [esp + 0x18]
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
xor eax, eax
cmp ecx, 1
je 0x416ba7
cmp ecx, 3
jne 0x416bac
mov eax, 1
push eax
mov eax, dword [ebp + 8]
lea edx, [esp + 0x24]
push edx
push esi
push eax
mov ecx, ebx
call fcn.004166a0
mov ebx, eax
test ebx, ebx
je 0x416bf4
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x416be5
mov eax, dword [ebp + 0x10]
cmp eax, 1
jne 0x416bdb
mov edi, 0x493940
jmp 0x416bea
cmp eax, 2
je 0x416be5
cmp eax, 3
jne 0x416bf4
mov edi, 0x493698
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