Function at 0x140061210
Capabilities:
Check if file exists

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xc8
mov rsi, qword [rdx + 0x40]
mov qword [rsp + 0x40], 0
cmp qword [0x14014a938], 0
je 0x14006134b
cmp qword [rsi + 0x5a0], 0
je 0x140061607
mov rbx, rdx
lea r13, [rsi + 0xa0]
lea rbp, [rdx + 0x60]
mov rdi, 0xffffffffffffffff
xor r12d, r12d
lea r14, str.hid_open
lea r15, str.could_not_open_HID_device_in_R_W_mode__keyboard_or_mouse_____trying_without
jmp 0x140061295
mov rdi, rax
mov byte [r13 + 0x24], 1
mov qword [rbp], rdi
inc r12
add r13, 0x28
add rbp, 0x10
cmp r12, 0x20
je 0x140061355
mov rdx, qword [r13]
test rdx, rdx
je 0x140061280
mov rax, qword [r13 + 8]
cmp byte [rax], 4
jne 0x140061280
mov rcx, rsi
mov r8d, 0xc0000000
call fcn.140062790
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14006127c
mov rax, qword [rbx + 0x40]
mov rcx, qword [rax + 0x30]
mov edx, 2
mov r8, r14
mov r9, r15
call fcn.140055400
mov rdx, qword [r13]
mov rcx, rsi
xor r8d, r8d
call fcn.140062790
cmp rax, 0xffffffffffffffff
jne 0x140061274
xor ecx, ecx
call fcn.14006efa0
mov rdx, qword [rsi + 0x90]
mov rcx, qword [rbx + 0x40]
mov rcx, qword [rcx + 0x30]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], rdx
lea r8, str.hid_open
lea r9, str.could_not_open_device__s__interface__d_:__s
mov edx, 1
call fcn.140055400
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 5
setne cl
neg ecx
or ecx, 0xfffffffd
cmp eax, 2
mov esi, 0xfffffffc
cmovne esi, ecx
jmp 0x14006168c
mov esi, 0xfffffffd
jmp 0x14006168c
mov dword [rsp + 0x60], 0xa
lea rdx, [rsp + 0x60]
mov rcx, rdi
call qword [0x14014a940]
test eax, eax
je 0x14006162a
movzx eax, word [rsp + 0x64]
mov rcx, qword [rsi + 0x5a0]
mov word [rcx], ax
movzx eax, word [rsp + 0x66]
mov rcx, qword [rsi + 0x5a0]
mov word [rcx + 2], ax
mov ecx, 0x20
nop word [rax + rax]
mov r14d, ecx
mov rcx, rdi
mov edx, r14d
call qword [0x14014a980]
lea ecx, [r14 + r14]
test eax, eax
jne 0x1400613a0
shr r14d, 1
mov dword [rsp + 0x20], r14d
lea r8, str.hid_open
lea r9, str.set_maximum_input_buffer_size_to__d
xor ecx, ecx
mov edx, 4
call fcn.140055400
lea rdx, [rsp + 0x40]
mov rcx, rdi
call qword [0x14014a948]
test eax, eax
je 0x140061642
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x140061642
lea rdx, [rsp + 0x88]
call qword [0x14014a978]
cmp eax, 0x110000
jne 0x14006165a
movzx eax, word [rsp + 0xb8]
mov dword [rsp + 0x54], eax
movzx eax, word [rsp + 0xbe]
mov dword [rsp + 0x58], eax
movzx eax, word [rsp + 0xc4]
mov dword [rsp + 0x5c], eax
xor r14d, r14d
lea r13, str.input
lea r15, str.hid_open
lea rbp, str._lu_HID__s_report_value_s__found
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x78], rbx
jmp 0x1400614b5
mov rax, qword [rbx + 0x40]
mov rcx, qword [rax + 0x30]
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov edx, 2
mov r8, r15
lea r9, str.__could_not_process__s_report_IDs
call fcn.140055400
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea r15, str.hid_open
inc r14
cmp r14, 3
je 0x1400616a2
mov r12, qword [r13 + r14*8]
mov eax, dword [rsp + r14*4 + 0x54]
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], eax
xor ecx, ecx
mov edx, 4
mov r8, r15
mov r9, rbp
call fcn.140055400
mov rax, qword [rsi + 0x5a0]
mov byte [rax + r14 + 6], 0
mov ecx, dword [rsp + r14*4 + 0x54]
test rcx, rcx
je 0x1400614a8
mov qword [rsp + 0x70], r12
mov edx, 0x48
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov qword [rsp + 0x48], rax
test rax, rax
je 0x140061470
lea r12, [rsp + r14*4]
add r12, 0x54
mov r9, qword [rsp + 0x40]
mov ecx, r14d
mov rdx, qword [rsp + 0x48]
mov r8, r12
call qword [0x14014a998]
cmp eax, 0x110000
jne 0x140061470
cmp dword [r12], 0
je 0x140061470
jle 0x140061496
mov r13, qword [rsp + 0x48]
add r13, 2
xor esi, esi
xor r15d, r15d
xor ebx, ebx
lea rbp, str.__Report_ID:_0x_02X
movzx eax, byte [r13]
mov dword [rsp + 0x20], eax
xor ecx, ecx
mov edx, 4
lea r8, str.hid_open
mov r9, rbp
call fcn.140055400
xor eax, eax
xor ecx, ecx
cmp byte [r13], 0
sete al
setne cl
add ebx, ecx
add r15d, eax
inc rsi
movsxd rax, dword [r12]
add r13, 0x48
cmp rsi, rax
jl 0x140061560
test ebx, ebx
mov rsi, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x78]
lea r13, str.input
lea rbp, str._lu_HID__s_report_value_s__found
je 0x140061496
test r15d, r15d
je 0x1400615f5
mov rax, qword [rbx + 0x40]
mov rcx, qword [rax + 0x30]
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov edx, 2
lea r8, str.hid_open
lea r9, str.program_assertion_failed___zero_and_nonzero_report_IDs_used_for__s
call fcn.140055400
mov rax, qword [rsi + 0x5a0]
mov byte [rax + r14 + 6], 1
jmp 0x140061496
mov rcx, qword [rsi + 0x30]
lea r8, str.hid_open
lea r9, str.program_assertion_failed___private_HID_structure_is_uninitialized
mov edx, 1
call fcn.140055400
mov esi, 0xfffffffb
jmp 0x14006168c
mov rax, qword [rbx + 0x40]
mov rcx, qword [rax + 0x30]
lea r8, str.hid_open
lea r9, str.could_not_gain_access_to_HID_top_collection__HidD_GetAttributes_
jmp 0x140061670
mov rax, qword [rbx + 0x40]
mov rcx, qword [rax + 0x30]
lea r8, str.hid_open
lea r9, str.could_not_read_HID_preparsed_data__HidD_GetPreparsedData_
jmp 0x140061670
mov rax, qword [rbx + 0x40]
mov rcx, qword [rax + 0x30]
lea r8, str.hid_open
lea r9, str.could_not_parse_HID_capabilities__HidP_GetCaps_
mov edx, 1
call fcn.140055400
mov rcx, qword [rsp + 0x40]
xor esi, esi
test rcx, rcx
je 0x14006168c
call qword [0x14014a950]
mov eax, esi
add rsp, 0xc8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
movzx eax, word [rsp + 0x8c]
mov rcx, qword [rsi + 0x5a0]
mov word [rcx + 0xa], ax
movzx eax, word [rsp + 0x8e]
mov rcx, qword [rsi + 0x5a0]
mov word [rcx + 0xc], ax
movzx eax, word [rsp + 0x90]
mov rcx, qword [rsi + 0x5a0]
mov word [rcx + 0xe], ax
movzx eax, word [rsp + 0x88]
mov rcx, qword [rsi + 0x5a0]
mov word [rcx + 0x10], ax
movzx eax, word [rsp + 0x8a]
mov rcx, qword [rsi + 0x5a0]
mov word [rcx + 0x12], ax
movzx eax, byte [rsi + 0x6a]
mov rcx, qword [rsi + 0x5a0]
mov byte [rcx + 0x314], al
mov rdx, qword [rsi + 0x5a0]
cmp byte [rdx + 0x314], 0
je 0x140061737
add rdx, 0x14
mov rcx, rdi
mov r8d, 0x100
call qword [0x14014a958]
jmp 0x14006173d
mov word [rdx + 0x14], 0
movzx eax, byte [rsi + 0x6b]
mov rcx, qword [rsi + 0x5a0]
mov byte [rcx + 0x315], al
mov rdx, qword [rsi + 0x5a0]
cmp byte [rdx + 0x315], 0
je 0x140061776
add rdx, 0x114
mov rcx, rdi
mov r8d, 0x100
call qword [0x14014a960]
jmp 0x14006177f
mov word [rdx + 0x114], 0
movzx eax, byte [rsi + 0x6c]
mov rcx, qword [rsi + 0x5a0]
mov byte [rcx + 0x316], al
mov rdx, qword [rsi + 0x5a0]
cmp byte [rdx + 0x316], 0
je 0x1400617bb
add rdx, 0x214
mov rcx, rdi
mov r8d, 0x100
call qword [0x14014a968]
jmp 0x14006167a
mov word [rdx + 0x214], 0
jmp 0x14006167a