Function at 0x41b990
Capabilities:
Register raw input devices

Disassembly:
sub esp, 0x6c
mov eax, dword [0x422a54]
xor eax, esp
mov dword [esp + 0x68], eax
mov al, byte [esp + 0x70]
push esi
mov esi, ecx
cmp byte [esi + 0x10], 0
mov byte [esi + 8], al
mov al, byte [esp + 0x78]
mov byte [esi + 9], al
mov al, byte [esp + 0x7c]
mov dword [esi + 4], 0
mov byte [esi + 0xa], al
je 0x41b9f4
push str.WARNING:_rawmouse_init_called_after_initialization_already_completed.
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0041c2e0
add esp, 8
mov byte [esi + 0x10], 1
xor eax, eax
pop esi
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0041c3e9
add esp, 0x6c
ret 0xc
push edi
mov edi, dword [sym.imp.USER32.dll_GetRawInputDeviceList]
lea eax, [esp + 8]
push 8
push eax
push 0
call edi
test eax, eax
je 0x41ba38
push str.ERROR:_Unable_to_count_raw_input_devices._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0041c2e0
add esp, 8
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0041c3e9
add esp, 0x6c
ret 0xc
mov eax, dword [esp + 8]
push ebx
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
shl eax, 3
push ebp
push eax
call ebx
mov ebp, eax
add esp, 4
mov dword [esp + 0x14], ebp
test ebp, ebp
jne 0x41ba87
push str.ERROR:_Unable_to_allocate_memory_for_raw_input_device_list._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0041c2e0
add esp, 8
xor eax, eax
pop ebp
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0041c3e9
add esp, 0x6c
ret 0xc
push 8
lea eax, [esp + 0x14]
push eax
push ebp
call edi
cmp eax, 0xffffffff
jne 0x41bac6
push str.ERROR:_Unable_to_get_raw_input_device_list._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0041c2e0
add esp, 8
xor eax, eax
pop ebp
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0041c3e9
add esp, 0x6c
ret 0xc
xor edi, edi
cmp dword [esp + 0x10], edi
jbe 0x41bb5c
cmp dword [ebp + edi*8 + 4], 0
jne 0x41bb51
lea eax, [esp + 0x18]
push eax
push 0
push 0x20000007
push dword [ebp + edi*8]
call dword [sym.imp.USER32.dll_GetRawInputDeviceInfoA]
test eax, eax
jne 0x41bc0a
push dword [esp + 0x18]
call ebx
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x41bbda
lea eax, [esp + 0x18]
push eax
mov eax, dword [sym.imp.USER32.dll_GetRawInputDeviceInfoA]
push ebx
push 0x20000007
push dword [ebp + edi*8]
call eax
test eax, eax
js 0x41bbaa
push ebx
call fcn.0041bf30
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
test al, al
je 0x41bb46
cmp byte [esi + 9], 0
je 0x41bb51
inc dword [esi + 4]
jmp 0x41bb51
inc dword [esi + 4]
cmp byte [esi + 0xa], 0
jne 0x41bb51
inc dword [esi]
inc edi
cmp edi, dword [esp + 0x10]
jb 0x41bad2
cmp byte [esi + 8], 0
je 0x41bb65
inc dword [esi + 4]
imul eax, dword [esi + 4], 0x2c
push eax
call ebx
add esp, 4
mov dword [esi + 0xc], eax
test eax, eax
jne 0x41bc3a
push str.ERROR:_Unable_to_allocate_memory_for_raw_input_mice._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0041c2e0
add esp, 8
xor eax, eax
pop ebp
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0041c3e9
add esp, 0x6c
ret 0xc
push str.ERROR:_Unable_to_get_raw_input_device_name._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0041c2e0
add esp, 8
xor eax, eax
pop ebp
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0041c3e9
add esp, 0x6c
ret 0xc
push str.ERROR:_Unable_to_allocate_memory_for_device_name._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0041c2e0
add esp, 8
xor eax, eax
pop ebp
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0041c3e9
add esp, 0x6c
ret 0xc
push str.ERROR:_Unable_to_get_size_of_raw_input_device_name._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0041c2e0
add esp, 8
xor eax, eax
pop ebp
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0041c3e9
add esp, 0x6c
ret 0xc
cmp byte [esi + 8], 0
je 0x41bc79
mov dword [eax], 0
mov eax, dword [esi + 0xc]
mov dword [eax + 4], 0
mov eax, dword [esi + 0xc]
mov dword [eax + 8], 0
mov eax, dword [esi + 0xc]
mov dword [eax + 0xc], 0
mov eax, dword [esi + 0xc]
mov byte [eax + 0x10], 0
mov eax, dword [esi + 0xc]
mov byte [eax + 0x11], 0
mov eax, 1
jmp 0x41bc7b
xor eax, eax
xor ebx, ebx
cmp dword [esp + 0x10], ebx
jbe 0x41bd57
imul edi, eax, 0x2c
nop word [eax + eax]
cmp dword [ebp + ebx*8 + 4], 0
jne 0x41bd4c
lea eax, [esp + 0x18]
push eax
mov eax, dword [sym.imp.USER32.dll_GetRawInputDeviceInfoA]
push 0
push 0x20000007
push dword [ebp + ebx*8]
call eax
test eax, eax
jne 0x41bede
push dword [esp + 0x18]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x41beae
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push ebp
push 0x20000007
push dword [eax + ebx*8]
call dword [sym.imp.USER32.dll_GetRawInputDeviceInfoA]
test eax, eax
js 0x41be7e
push ebp
call fcn.0041bf30
add esp, 4
test al, al
je 0x41bd04
cmp byte [esi + 9], 0
je 0x41bd48
mov ecx, dword [esi + 0xc]
mov ebp, dword [esp + 0x14]
mov eax, dword [ebp + ebx*8]
mov dword [edi + ecx], eax
mov eax, dword [esi + 0xc]
mov dword [edi + eax + 4], 0
mov eax, dword [esi + 0xc]
mov dword [edi + eax + 8], 0
mov eax, dword [esi + 0xc]
mov dword [edi + eax + 0xc], 0
mov eax, dword [esi + 0xc]
mov byte [edi + eax + 0x10], 0
mov eax, dword [esi + 0xc]
mov byte [edi + eax + 0x11], 0
add edi, 0x2c
jmp 0x41bd4c
mov ebp, dword [esp + 0x14]
inc ebx
cmp ebx, dword [esp + 0x10]
jb 0x41bc90
push ebp
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [esi + 4]
add esp, 4
mov dword [esp + 0x14], 0
test eax, eax
je 0x41be16
mov ebp, 0x20
nop dword [eax]
xor ebx, ebx
mov edi, ebp
mov eax, dword [esi + 0xc]
push ebx
push str.Button__i
push 0x50
mov dword [edi + eax - 0xc], 0
lea eax, [esp + 0x34]
push eax
call fcn.004045d0
lea ecx, [esp + 0x38]
add esp, 0x10
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41bdb0
sub ecx, edx
lea eax, [ecx + 1]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, dword [esi + 0xc]
add esp, 4
mov dword [edi + ecx], eax
lea eax, [esp + 0x28]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41bdd3
lea ecx, [esp + 0x28]
sub eax, edx
push ecx
inc eax
push 0x41e880
push eax
mov eax, dword [esi + 0xc]
push dword [edi + eax]
call fcn.004045d0
inc ebx
add esp, 0x10
add edi, 4
cmp ebx, 3
jb 0x41bd84
mov ecx, dword [esp + 0x14]
add ebp, 0x2c
mov eax, dword [esi + 4]
inc ecx
mov dword [esp + 0x14], ecx
cmp ecx, eax
jb 0x41bd80
sub eax, dword [esi]
mov edi, 1
push 0xc
mov dword [esi + 4], eax
lea eax, [esp + 0x20]
push edi
push eax
mov dword [esp + 0x28], 0x20001
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
call dword [sym.imp.USER32.dll_RegisterRawInputDevices]
test eax, eax
jne 0x41bf0e
push str.ERROR:_Unable_to_register_raw_input__2_._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0041c2e0
add esp, 8
xor eax, eax
pop ebp
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0041c3e9
add esp, 0x6c
ret 0xc
push str.ERROR:_Unable_to_get_raw_input_device_name__2_._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0041c2e0
add esp, 8
xor eax, eax
pop ebp
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0041c3e9
add esp, 0x6c
ret 0xc
push str.ERROR:_Unable_to_allocate_memory_for_raw_input_device_name__2_._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0041c2e0
add esp, 8
xor eax, eax
pop ebp
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0041c3e9
add esp, 0x6c
ret 0xc
push str.ERROR:_Unable_to_get_size_of_raw_input_device_name__2_._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.0041c2e0
add esp, 8
xor eax, eax
pop ebp
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0041c3e9
add esp, 0x6c
ret 0xc
mov ecx, dword [esp + 0x78]
mov eax, edi
pop ebp
pop ebx
pop edi
mov byte [esi + 0x10], 1
pop esi
xor ecx, esp
call fcn.0041c3e9
add esp, 0x6c
ret 0xc