Function at 0x416930
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 0x416c06
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 0x416991
push str.Connected_
lea eax, [esp + 0x24]
push eax
jmp 0x4169a5
cmp eax, 2
je 0x41699b
cmp eax, 3
jne 0x4169ad
push str.Selected_
lea ecx, [esp + 0x24]
push ecx
call fcn.00416280
add esp, 8
mov eax, dword [ebp + 8]
add eax, 8
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4169b5
lea edi, [esp + 0x20]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4169c3
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 0x416a69
push str.GetDeviceProfileFromReg._Profile_doesnt_exist_n
call fcn.0040aab0
mov eax, dword [ebp + 0x10]
add esp, 4
cmp eax, 1
jne 0x416a25
test dword [ebx + 0x28], 0x100000
jne 0x416a37
cmp dword [ebx + 0x45c], 0x10
jne 0x416a5e
cmp dword [ebx + 0xb40], 4
jne 0x416a5e
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.004167c0
mov ebx, eax
test ebx, ebx
jne 0x416bf5
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebp + 0x10], 1
jne 0x416a78
test dword [ebx + 0x28], 0x100000
jne 0x416a92
cmp dword [ebx + 0x45c], 0x10
jne 0x416b55
cmp dword [ebx + 0xb40], 4
jne 0x416b55
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 0x416b55
mov al, byte [esp + 0x128]
test al, al
je 0x416b55
mov ecx, dword [ebp + 8]
push esi
lea eax, [esp + 0x12c]
push eax
push ecx
mov ecx, ebx
call fcn.004167c0
mov ebx, eax
test ebx, ebx
je 0x416b39
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 0x416bd0
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 0x416b6f
test dword [ebx + 0x28], 0x100000
jne 0x416b81
cmp dword [ebx + 0x45c], 0x10
jne 0x416ba8
cmp dword [ebx + 0xb40], 4
jne 0x416ba8
mov eax, dword [ebp + 8]
push esi
lea ecx, [eax + 8]
push ecx
push eax
mov ecx, ebx
call fcn.004167c0
mov ebx, eax
test ebx, ebx
je 0x416ba1
mov dword [esp + 0x10], 1
jmp 0x416bd0
mov ebx, dword [esp + 0x18]
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
xor eax, eax
cmp ecx, 1
je 0x416bb7
cmp ecx, 3
jne 0x416bbc
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.004166b0
mov ebx, eax
test ebx, ebx
je 0x416c04
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x416bf5
mov eax, dword [ebp + 0x10]
cmp eax, 1
jne 0x416beb
mov edi, 0x493940
jmp 0x416bfa
cmp eax, 2
je 0x416bf5
cmp eax, 3
jne 0x416c04
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