Function at 0x412900
Capabilities:
Check for software breakpoints
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x870
push ebx
mov word [ebp - 0x448], 0xffff
mov dword [ebp - 0x468], 0
mov eax, dword [ebp + 0x18]
mov dword [eax], 0
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x46c], ecx
cmp dword [ebp + 8], 0xffffffff
je 0x41293b
cmp dword [ebp + 8], 0
jne 0x412944
or ax, 0xffff
jmp 0x412cb2
lea edx, [ebp - 0x870]
push edx
mov eax, dword [ebp - 0x46c]
mov ecx, dword [eax + 4]
push ecx
call sub.HID.DLL_HidD_GetPreparsedData
and eax, 0xff
mov dword [ebp - 0x458], eax
cmp dword [ebp - 0x458], 0
jne 0x412977
or ax, 0xffff
jmp 0x412cb2
lea edx, [ebp - 0x44]
push edx
mov eax, dword [ebp - 0x870]
push eax
call sub.HID.DLL_HidP_GetCaps
mov dword [ebp - 0x458], eax
cmp dword [ebp - 0x458], 0
jne 0x41299f
or ax, 0xffff
jmp 0x412cb2
mov ecx, dword [ebp - 0x870]
push ecx
call sub.HID.DLL_HidD_FreePreparsedData
mov byte [ebp - 0x454], 0
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x450], edx
mov eax, dword [ebp - 0x3c]
and eax, 0xffff
sub eax, 5
mov word [ebp - 0x464], ax
mov byte [ebp - 0x444], 0
mov cl, byte [ebp + 0x1c]
mov byte [ebp - 0x443], cl
mov byte [ebp - 0x460], 0
mov dword [ebp - 0x468], 0
push 0x400
push 0
lea edx, [ebp - 0x444]
push edx
call fcn.00416430
add esp, 0xc
mov byte [ebp - 0x444], 0
mov al, byte [ebp + 0x1c]
mov byte [ebp - 0x443], al
mov ecx, dword [ebp - 0x464]
and ecx, 0xffff
cmp dword [ebp + 0x10], ecx
jbe 0x412a41
mov byte [ebp - 0x441], 0
mov dl, byte [ebp - 0x464]
mov byte [ebp - 0x440], dl
mov byte [ebp - 0x44c], 0x20
jmp 0x412a58
mov byte [ebp - 0x441], 0
mov al, byte [ebp + 0x10]
mov byte [ebp - 0x440], al
mov byte [ebp - 0x44c], 0
mov ecx, dword [ebp - 0x460]
and ecx, 0xff
mov edx, dword [ebp - 0x44c]
and edx, 0xff
add ecx, edx
mov eax, dword [ebp - 0x454]
and eax, 0xff
add ecx, eax
mov byte [ebp - 0x442], cl
mov cl, byte [ebp - 0x454]
add cl, 1
mov byte [ebp - 0x454], cl
mov edx, dword [ebp - 0x460]
and edx, 0xff
cmp edx, 0x40
jne 0x412aae
mov byte [ebp - 0x460], 0
jmp 0x412ab5
mov byte [ebp - 0x460], 0x40
mov eax, dword [ebp - 0x440]
and eax, 0xff
push eax
mov ecx, dword [ebp - 0x450]
push ecx
lea edx, [ebp - 0x43f]
push edx
call fcn.00415ff0
add esp, 0xc
mov eax, dword [ebp - 0x440]
and eax, 0xff
mov ecx, dword [ebp + 0x10]
sub ecx, eax
mov dword [ebp + 0x10], ecx
mov edx, dword [ebp - 0x440]
and edx, 0xff
mov eax, dword [ebp - 0x450]
add eax, edx
mov dword [ebp - 0x450], eax
mov ecx, dword [ebp - 0x3c]
and ecx, 0xffff
push ecx
lea edx, [ebp - 0x444]
push edx
mov eax, dword [ebp - 0x46c]
mov ecx, dword [eax + 4]
push ecx
call sub.HID.DLL_HidD_SetFeature
and eax, 0xff
mov dword [ebp - 0x458], eax
cmp dword [ebp - 0x458], 0
jne 0x412b41
mov ax, 0xfff4
jmp 0x412cb2
cmp dword [ebp + 0x10], 0
ja 0x4129ee
mov byte [ebp - 0x86c], 0
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0x450], edx
mov eax, dword [ebp + 0x18]
mov dword [eax], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 4], eax
mov dword [ebp - 0x468], 0
mov ecx, dword [ebp - 0x3c]
and ecx, 0xffff
push ecx
lea edx, [ebp - 0x86c]
push edx
mov eax, dword [ebp - 0x46c]
mov ecx, dword [eax + 4]
push ecx
call sub.HID.DLL_HidD_GetFeature
and eax, 0xff
mov dword [ebp - 0x458], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 4]
cmp eax, 0xdbba0
jbe 0x412bbb
mov ax, 0x6ff0
jmp 0x412cb2
mov dl, byte [ebp - 0x86a]
mov byte [ebp - 0x45c], dl
mov eax, dword [ebp - 0x45c]
and eax, 0xff
cmp eax, 0xcc
jne 0x412bdb
jmp 0x412b77
mov ecx, dword [ebp - 0x45c]
and ecx, 0xff
and ecx, 0x20
mov byte [ebp - 0x44c], cl
mov edx, dword [ebp - 0x868]
and edx, 0xff
test edx, edx
jle 0x412c22
mov eax, dword [ebp - 0x868]
and eax, 0xff
push eax
lea ecx, [ebp - 0x867]
push ecx
mov edx, dword [ebp - 0x450]
push edx
call fcn.00415ff0
add esp, 0xc
mov eax, dword [ebp - 0x868]
and eax, 0xff
mov ecx, dword [ebp - 0x450]
add ecx, eax
mov dword [ebp - 0x450], ecx
mov edx, dword [ebp - 0x868]
and edx, 0xff
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax]
add ecx, edx
mov edx, dword [ebp + 0x18]
mov dword [edx], ecx
mov eax, dword [ebp - 0x44c]
and eax, 0xff
test eax, eax
jg 0x412b77
mov ecx, dword [ebp + 0x18]
cmp dword [ecx], 2
jb 0x412ca5
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x14]
xor edx, edx
mov dl, byte [ecx + eax - 2]
shl edx, 8
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax]
mov eax, dword [ebp + 0x14]
xor ebx, ebx
mov bl, byte [eax + ecx - 1]
add edx, ebx
mov word [ebp - 0x448], dx
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
sub edx, 2
mov eax, dword [ebp + 0x18]
mov dword [eax], edx
jmp 0x412cab
mov ax, 0xfff8
jmp 0x412cb2
mov ax, word [ebp - 0x448]
pop ebx
mov esp, ebp
pop ebp
ret 0x18