Function at 0x401690
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x459150]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x30], 0
push edi
mov dword [ebp - 0x3c], 0
lea ebx, [esi + 0x54]
mov dword [esi + 0x44], 0
push ebx
mov dword [esi + 0x48], 0
call sub.HID.DLL_HidD_GetHidGuid
push 0x12
push 0
push 0
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x50], eax
xor eax, eax
mov dword [ebp - 0x2c], 0x1c
mov dword [ebp - 0x38], eax
lea ecx, [ebp - 0x2c]
push ecx
push eax
lea eax, [esi + 0x54]
push eax
push 0
push dword [esi + 0x50]
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x401860
push 0
lea eax, [ebp - 0x30]
push eax
push 0
push 0
lea eax, [ebp - 0x2c]
push eax
push dword [esi + 0x50]
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
push dword [ebp - 0x30]
call fcn.0040e2db
add esp, 4
mov dword [esi + 0x44], eax
mov dword [eax], 5
lea eax, [ebp - 0x3c]
push 0
push eax
push dword [ebp - 0x30]
lea eax, [ebp - 0x2c]
push dword [esi + 0x44]
push eax
push dword [esi + 0x50]
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
mov eax, dword [esi + 0x44]
push 0
push 0
push 3
push 0
push 3
push 0
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
lea ecx, [ebp - 0x10]
mov dword [esi + 0x48], eax
push ecx
push eax
mov dword [ebp - 0x10], 0xc
call sub.HID.DLL_HidD_GetAttributes
mov eax, 0x2563
mov byte [esi + 0x7c], 0
cmp word [ebp - 0xc], ax
jne 0x40186d
mov eax, 0x1818
cmp word [ebp - 0xa], ax
jne 0x40186d
push str.Device_detected
call edi
lea eax, [ebp - 0x34]
push eax
push dword [esi + 0x48]
call sub.HID.DLL_HidD_GetPreparsedData
push str.HidD_GetPreparsedData:
call edi
lea ebx, [esi + 4]
push ebx
push dword [ebp - 0x34]
call sub.HID.DLL_HidP_GetCaps
push str.HidP_GetCaps:
call edi
push dword [ebp - 0x34]
call sub.HID.DLL_HidD_FreePreparsedData
push str.HidD_FreePreparsedData:
call edi
movzx ecx, word [esi + 6]
movzx eax, word [ebx]
shl ecx, 8
add ecx, eax
cmp ecx, 0x102
jne 0x4017f8
push str.This_device_is_a_system_mouse
jmp 0x401805
cmp ecx, 0x106
jne 0x401807
push str.This_device_is_a_system_keyboard
call edi
mov eax, 0xff00
cmp word [esi + 6], ax
jne 0x40183e
cmp word [ebx], 1
jne 0x40183e
mov eax, dword [esi + 0x44]
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
add eax, 4
mov byte [esi + 0x7c], 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x280], eax
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi + 0x44]
call fcn.0040e2d6
mov eax, dword [ebp - 0x38]
add esp, 4
inc eax
cmp byte [esi + 0x7c], 0
mov dword [ebp - 0x38], eax
je 0x4016f2
cmp byte [esi + 0x7c], 0
jne 0x401874
push str.Device_not_detected
jmp 0x401879
push dword [esi + 0x48]
call ebx
jmp 0x401844
push str.Device_detected
call edi
push dword [esi + 0x50]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
push 0x44f300
call edi
movzx eax, byte [esi + 0x7c]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403a54
mov esp, ebp
pop ebp
ret 4