Function at 0x408d40
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x44
mov eax, dword [esp + 0x48]
push esi
push edi
xor esi, esi
push 0x12
push esi
push esi
push eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x408d7e
push str.SetupDiGetClassDevs___Fail_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
xor eax, eax
pop esi
add esp, 0x44
ret 0xc
push ebx
lea ecx, [esp + 0x18]
push ebp
push ecx
push esi
push edi
mov dword [esp + 0x28], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x408e1e
mov esi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdA]
lea edx, [esp + 0x14]
lea eax, [esp + 0x1c]
push edx
push 0
push 0
push eax
push edi
call esi
mov ecx, dword [esp + 0x14]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
test ebp, ebp
je 0x408e3e
mov edx, dword [esp + 0x14]
push 0
push edx
lea eax, [esp + 0x24]
push ebp
push eax
push edi
call esi
test eax, eax
je 0x408e4b
mov ecx, dword [esp + 0x5c]
mov ebx, dword [sym.imp.USER32.dll_CharUpperA]
push ecx
call ebx
push ebp
call ebx
mov edx, dword [esp + 0x5c]
push edx
push ebp
call fcn.00414940
add esp, 8
test eax, eax
jne 0x408e5f
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
inc eax
push ecx
push eax
push edi
mov dword [esp + 0x1c], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x408da3
push str.Not_found____n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
xor esi, esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
pop ebp
pop ebx
mov eax, esi
pop edi
pop esi
add esp, 0x44
ret 0xc
push str.LocalAlloc___Fail_for_pDeviceInstanceID_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x408e1e
push str.SetupDiGetDeviceInstanceId___Fail_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x408e1e
push str.Found_it____n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x58]
lea edx, [esp + 0x38]
push edx
push 0
lea ecx, [esp + 0x24]
push eax
push ecx
push edi
mov dword [esp + 0x4c], 0x1c
mov dword [esp + 0x24], 0
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
mov esi, eax
test esi, esi
je 0x408fac
mov ebx, dword [esp + 0x60]
mov esi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
lea edx, [esp + 0x18]
push 0
push edx
push 0
lea eax, [esp + 0x44]
push 0
push eax
push edi
call esi
mov ecx, dword [esp + 0x18]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
mov dword [ebx], eax
jne 0x408ed9
push str.LocalAlloc___Fail_for_ppDeviceInterfaceDetailData_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x408f2f
mov dword [eax], 5
mov edx, dword [esp + 0x18]
mov eax, dword [ebx]
push 0
push 0
push edx
lea ecx, [esp + 0x44]
push eax
push ecx
push edi
call esi
mov esi, eax
test esi, esi
je 0x408f73
mov edx, dword [ebx]
add edx, 4
push edx
call dword [sym.imp.USER32.dll_CharUpperA]
mov eax, dword [ebx]
push str.WAVE
add eax, 4
push eax
call fcn.00414940
add esp, 8
test eax, eax
jne 0x408fa7
mov ecx, dword [ebx]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebx], 0
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x38]
inc eax
push edx
mov dword [esp + 0x14], eax
push eax
mov eax, dword [esp + 0x60]
lea ecx, [esp + 0x24]
push eax
push ecx
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
mov esi, eax
test esi, esi
jne 0x408ea0
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
pop ebp
pop ebx
mov eax, esi
pop edi
pop esi
add esp, 0x44
ret 0xc
push str.SetupDiGetDeviceInterfaceDetail___Fail_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edx, dword [ebx]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebp
mov dword [ebx], 0
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
pop ebp
pop ebx
mov eax, esi
pop edi
pop esi
add esp, 0x44
ret 0xc
mov esi, 1
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
pop ebp
pop ebx
mov eax, esi
pop edi
pop esi
add esp, 0x44
ret 0xc