Function at 0x416320
Capabilities:
Check os version
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x476730
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x4b34c4]
xor eax, esp
mov dword [esp + 0x80], eax
push ebx
push esi
push edi
mov eax, dword [0x4b34c4]
xor eax, esp
push eax
lea eax, [esp + 0x98]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
push ebx
push 0x485602
lea ecx, [esi + 0x60]
mov dword [esp + 0x30], esi
call fcn.004059e0
mov eax, dword [esi]
cmp eax, ebx
je 0x4163a2
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 0x485602
lea ecx, [esi + 0x44]
mov dword [esi], ebx
call fcn.004059e0
push 0x40
push ebx
add esi, 4
push esi
call fcn.00427230
add esp, 0xc
xor eax, eax
push ebx
push 0x485602
lea ecx, [esp + 0x50]
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x64], 0xf
mov dword [esp + 0x60], ebx
mov byte [esp + 0x50], al
call fcn.004059e0
lea eax, [esp + 0x64]
push eax
mov dword [esp + 0xa4], ebx
call dword [sym.imp.HID.DLL_HidD_GetHidGuid]
push 0x12
push ebx
push ebx
lea ecx, [esp + 0x70]
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov edi, eax
mov dword [esp + 0x14], edi
cmp edi, ebx
je 0x416637
cmp edi, 0xffffffff
je 0x416637
mov dword [esp + 0x20], 2
mov dword [esp + 0x1c], ebx
jmp 0x416426
mov edi, dword [esp + 0x14]
xor ebx, ebx
mov esi, dword [esp + 0x1c]
xor eax, eax
lea edx, [esp + 0x74]
push edx
push esi
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
lea eax, [esp + 0x6c]
push eax
push ebx
push edi
mov dword [esp + 0x88], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
inc esi
mov dword [esp + 0x1c], esi
cmp eax, ebx
je 0x416612
push ebx
lea ecx, [esp + 0x1c]
push ecx
push ebx
push ebx
lea edx, [esp + 0x84]
push edx
push edi
mov dword [esp + 0x30], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
mov eax, dword [esp + 0x18]
cmp eax, 5
jb 0x416426
push eax
call fcn.00421181
add esp, 4
push ebx
mov esi, eax
push ebx
mov dword [esi], 5
mov eax, dword [esp + 0x20]
push eax
push esi
lea ecx, [esp + 0x84]
push ecx
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
lea ecx, [esi + 4]
mov dword [esp + 0x24], eax
mov eax, ecx
lea edi, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4164e0
sub eax, edi
push eax
push ecx
lea ecx, [esp + 0x50]
call fcn.004059e0
push esi
call fcn.00421a19
add esp, 4
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], 0
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x50]
push edx
lea ecx, [esp + 0x38]
mov byte [esp + 0xac], 1
call fcn.00404670
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x2c]
mov edi, ecx
cmp eax, 0x10
jae 0x4165eb
lea edi, [esp + 0x2c]
mov ebx, edi
add ebx, dword [esp + 0x3c]
mov esi, ecx
cmp eax, 0x10
jae 0x41654f
lea esi, [esp + 0x2c]
cmp esi, ebx
je 0x416571
sub edi, esi
movsx eax, byte [esi]
push eax
call fcn.0042321c
mov byte [esi + edi], al
inc esi
add esp, 4
cmp esi, ebx
jne 0x416555
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x2c]
cmp dword [esp + 0x24], 0
je 0x4165cc
push 0x1b
push str.HIDVID_36F6PID_A111MI_02
lea ecx, [esp + 0x34]
push ecx
xor eax, eax
call fcn.004180f0
cmp eax, 0xffffffff
jne 0x4165a8
push 0x1b
push str.HIDVID_248APID_FF53MI_02
lea edx, [esp + 0x34]
push edx
xor eax, eax
call fcn.004180f0
cmp eax, 0xffffffff
je 0x4165c4
cmp dword [esp + 0x5c], 0x10
mov ebx, dword [esp + 0x48]
jae 0x4165b7
lea ebx, [esp + 0x48]
mov ecx, dword [esp + 0x28]
call fcn.00417f40
test al, al
jne 0x4165f2
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x2c]
mov byte [esp + 0xa0], 0
cmp eax, 0x10
jb 0x416420
push ecx
call fcn.00421a4e
add esp, 4
jmp 0x416420
mov ebx, ecx
jmp 0x416540
cmp dword [esp + 0x40], 0x10
mov dword [esp + 0x20], 0
jb 0x41660e
mov eax, dword [esp + 0x2c]
push eax
call fcn.00421a4e
add esp, 4
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov esi, dword [esp + 0x20]
neg esi
cmp dword [esp + 0x5c], 0x10
jb 0x416633
mov ecx, dword [esp + 0x48]
push ecx
call fcn.00421a4e
add esp, 4
mov eax, esi
jmp 0x41664e
cmp dword [esp + 0x5c], 0x10
jb 0x41664b
mov edx, dword [esp + 0x48]
push edx
call fcn.00421a4e
add esp, 4
or eax, 0xffffffff
mov ecx, dword [esp + 0x98]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0042097b
mov esp, ebp
pop ebp
ret