Function at 0x401130
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
push edi
mov edi, ecx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x3c], 0
lea esi, [edi + 0x54]
mov dword [edi + 0x44], 0
push esi
mov dword [edi + 0x48], 0
call sub.HID.DLL_HidD_GetHidGuid
push 0x12
push 0
push 0
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [edi + 0x50], eax
xor eax, eax
mov dword [ebp - 0x2c], 0x1c
mov dword [ebp - 0x38], eax
nop dword [eax]
lea ecx, [ebp - 0x2c]
push ecx
push eax
push esi
push 0
push dword [edi + 0x50]
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x401441
push 0
lea eax, [ebp - 0x30]
push eax
push 0
push 0
lea eax, [ebp - 0x2c]
push eax
push dword [edi + 0x50]
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
push dword [ebp - 0x30]
call fcn.0040e2db
add esp, 4
mov dword [edi + 0x44], eax
mov dword [eax], 5
lea eax, [ebp - 0x3c]
push 0
push eax
push dword [ebp - 0x30]
lea eax, [ebp - 0x2c]
push dword [edi + 0x44]
push eax
push dword [edi + 0x50]
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
mov eax, dword [edi + 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 [edi + 0x48], eax
push ecx
push eax
mov dword [ebp - 0x10], 0xc
call sub.HID.DLL_HidD_GetAttributes
mov dx, word [ebp - 0xc]
mov cx, word [ebp - 0xa]
movzx eax, dx
mov byte [edi + 0x7c], 0
cmp eax, dword [edi + 0x288]
jne 0x401240
movzx eax, cx
cmp eax, dword [edi + 0x28c]
je 0x401378
mov eax, 0x45e
cmp dx, ax
jne 0x401266
mov eax, 0x28e
cmp cx, ax
je 0x401378
push dword [edi + 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401425
mov eax, 0x54c
cmp dx, ax
jne 0x401285
mov eax, 0xcda
cmp cx, ax
je 0x401378
mov eax, 0x268
jmp 0x40124f
mov eax, 0x2563
cmp dx, ax
jne 0x4012c2
mov eax, 0x1818
cmp cx, ax
je 0x401378
cmp cx, 0x59
je 0x401378
cmp cx, 2
je 0x401378
cmp cx, 1
je 0x401378
mov eax, 0x58d
jmp 0x40124f
cmp dx, 0x79
jne 0x4012ee
mov eax, 0x1843
cmp cx, ax
je 0x401378
mov eax, 0x954e
cmp cx, ax
je 0x401378
mov eax, 0x1846
jmp 0x40136f
mov eax, 0x20bc
cmp dx, ax
jne 0x40130c
mov eax, 0x5500
cmp cx, ax
je 0x401378
mov eax, 0x5503
jmp 0x40124f
mov eax, 0x2e24
cmp dx, ax
jne 0x401320
mov eax, 0xbff
jmp 0x40124f
mov eax, 0x738
cmp dx, ax
jne 0x401334
mov eax, 0x303
jmp 0x40124f
mov eax, 0x57e
cmp dx, ax
jne 0x401348
mov eax, 0x2009
jmp 0x40124f
mov eax, 0xf0d
cmp dx, ax
jne 0x40135c
mov eax, 0xf6
jmp 0x40124f
mov eax, 0x488
cmp dx, ax
jne 0x401258
mov eax, 0x572a
cmp cx, ax
jne 0x401258
push str.Device_detected
call ebx
lea eax, [ebp - 0x34]
push eax
push dword [edi + 0x48]
call sub.HID.DLL_HidD_GetPreparsedData
push str.HidD_GetPreparsedData:
call ebx
lea esi, [edi + 4]
push esi
push dword [ebp - 0x34]
call sub.HID.DLL_HidP_GetCaps
push str.HidP_GetCaps:
call ebx
push dword [ebp - 0x34]
call sub.HID.DLL_HidD_FreePreparsedData
push str.HidD_FreePreparsedData:
call ebx
movzx ecx, word [edi + 6]
movzx eax, word [esi]
shl ecx, 8
add ecx, eax
cmp ecx, 0x102
jne 0x4013cf
push str.This_device_is_a_system_mouse
jmp 0x4013dc
cmp ecx, 0x106
jne 0x4013de
push str.This_device_is_a_system_keyboard
call ebx
mov eax, dword [edi + 0x44]
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
add eax, 4
mov byte [edi + 0x7c], 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi + 0x284], eax
mov ecx, 0x1818
mov ax, word [ebp - 0xa]
cmp ax, cx
je 0x401418
cmp ax, 0x59
jne 0x401422
mov dword [0x459b5c], 1
lea esi, [edi + 0x54]
push dword [edi + 0x44]
call fcn.0040e2d6
mov eax, dword [ebp - 0x38]
add esp, 4
inc eax
cmp byte [edi + 0x7c], 0
mov dword [ebp - 0x38], eax
je 0x401190
cmp byte [edi + 0x7c], 0
jne 0x40144e
push str.Device_not_detected
jmp 0x401453
push str.Device_detected
call ebx
push dword [edi + 0x50]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
push 0x44f300
call ebx
movzx eax, byte [edi + 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