Function at 0x1400959d0
Capabilities:
Register raw input devices

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x90
lea rdx, [0x140185d90]
mov r8d, 0x68
test dl, 3
je 0x140095a06
nop
mov rax, r8
dec r8
test rax, rax
je 0x140095a45
mov byte [rdx], 0
inc rdx
test dl, 3
jne 0x1400959f0
mov r9, r8
shr r8, 2
and r9d, 3
test r8, r8
je 0x140095a24
mov rdi, rdx
xor eax, eax
mov rcx, r8
lea rdx, [rdx + r8*4]
rep stosd dword [rdi], eax
sub r9, 1
je 0x140095a42
sub r9, 1
je 0x140095a3c
cmp r9, 1
jne 0x140095a45
mov byte [rdx], 0
inc rdx
mov byte [rdx], 0
inc rdx
mov byte [rdx], 0
mov edx, 2
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitializeEx]
mov ecx, eax
cmp eax, 0x80010106
jne 0x140095a67
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitializeEx]
mov ecx, eax
xor ebx, ebx
cmp ecx, 1
mov eax, ebx
cmovne eax, ecx
xor ecx, ecx
mov dword [0x140185d90], eax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea rdi, str.Message
mov dword [0x140185d98], 0x50
mov qword [0x140185db0], rax
lea rcx, [0x140185d98]
lea rax, [0x140095860]
mov qword [0x140185dd8], rdi
mov qword [0x140185da0], rax
call qword [sym.imp.USER32.dll_RegisterClassExW]
test ax, ax
jne 0x140095aeb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_create_register_class_for_joystick_autodetect
call fcn.140075890
call fcn.140095910
lea eax, [rbx - 1]
mov rbx, qword [rsp + 0xa0]
add rsp, 0x90
pop rdi
ret
mov qword [rsp + 0x58], rbx
xor r9d, r9d
mov qword [rsp + 0x50], rbx
xor r8d, r8d
mov qword [rsp + 0x48], rbx
mov rdx, rdi
mov qword [rsp + 0x40], 0xfffffffffffffffd
xor ecx, ecx
mov dword [rsp + 0x38], ebx
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov qword [0x140185de8], rax
mov r10, rax
test rax, rax
jne 0x140095b62
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_create_message_window_for_joystick_autodetect
call fcn.140075890
call fcn.140095910
mov eax, 0xffffffff
mov rbx, qword [rsp + 0xa0]
add rsp, 0x90
pop rdi
ret
lea rax, [rsp + 0x70]
mov r8d, 0x20
lea rdx, [rsp + 0x70]
test al, 3
je 0x140095b95
nop word [rax + rax]
mov rax, r8
dec r8
test rax, rax
je 0x140095bd1
mov byte [rdx], bl
inc rdx
test dl, 3
jne 0x140095b80
mov r9, r8
shr r8, 2
and r9d, 3
test r8, r8
je 0x140095bb3
mov rdi, rdx
xor eax, eax
mov rcx, r8
lea rdx, [rdx + r8*4]
rep stosd dword [rdi], eax
sub r9, 1
je 0x140095bcf
sub r9, 1
je 0x140095bca
cmp r9, 1
jne 0x140095bd1
mov byte [rdx], bl
inc rdx
mov byte [rdx], bl
inc rdx
mov byte [rdx], bl
movups xmm0, xmmword [0x140137298]
xor r8d, r8d
mov dword [rsp + 0x70], 0x20
lea rdx, [rsp + 0x70]
mov dword [rsp + 0x74], 5
mov rcx, r10
movups xmmword [rsp + 0x7c], xmm0
call qword [sym.imp.USER32.dll_RegisterDeviceNotificationW]
mov qword [0x140185df0], rax
test rax, rax
jne 0x140095c39
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_create_notify_device_for_joystick_autodetect
call fcn.140075890
call fcn.140095910
mov eax, 0xffffffff
mov rbx, qword [rsp + 0xa0]
add rsp, 0x90
pop rdi
ret
mov r8, qword [0x140185de8]
lea rcx, [rsp + 0x62]
lea rdi, [0x140139290]
mov edx, 1
nop dword [rax]
nop word [rax + rax]
movzx eax, word [rdi]
inc ebx
mov word [rcx], ax
lea rdi, [rdi + 2]
mov word [rcx - 2], dx
mov dword [rcx + 2], 0x2100
mov qword [rcx + 6], r8
lea rcx, [rcx + 0x10]
cmp ebx, edx
jb 0x140095c60
mov r8d, 0x10
lea rcx, [rsp + 0x60]
call qword [sym.imp.USER32.dll_RegisterRawInputDevices]
test eax, eax
jne 0x140095ca4
lea rcx, str.Couldnt_register_for_raw_input_events
call fcn.14005ec50
mov rbx, qword [rsp + 0xa0]
xor eax, eax
add rsp, 0x90
pop rdi
ret