Function at 0x1400198d8
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xa8
mov rdi, rdx
mov qword [rsp + 0x40], rcx
mov qword [rcx], 0
lea rsi, [rsp + 0x78]
mov rcx, rsi
call sub.HID.DLL_HidD_GetHidGuid
mov rcx, rsi
xor edx, edx
xor r8d, r8d
mov r9d, 0x12
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
cmp rax, 0xffffffffffffffff
je 0x140019c4d
mov r12, rax
xor eax, eax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x70], rdi
lea rsi, [rsp + 0x88]
mov dword [rsi], Ordinal_36
mov qword [rsp + 0x20], rsi
lea r8, [rsp + 0x78]
mov rcx, r12
xor edx, edx
xor r9d, r9d
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x140019c38
xor eax, eax
mov qword [rsp + 0x48], rax
mov ebp, 1
lea r15, [rsp + 0x3c]
mov r13, qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
mov r14, qword [sym.imp.KERNEL32.dll_LocalAlloc]
lea rbx, [rsp + 0x78]
mov rdi, qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
mov dword [rsp + 0x3c], 0
mov qword [rsp + 0x20], r15
mov qword [rsp + 0x28], 0
mov rcx, r12
mov rdx, rsi
xor r8d, r8d
xor r9d, r9d
call r13
test eax, eax
jne 0x140019c11
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140019c11
mov edx, dword [rsp + 0x3c]
mov ecx, 0x40
call r14
test rax, rax
je 0x140019c02
mov rdi, rax
mov dword [rax], 8
mov r9d, dword [rsp + 0x3c]
mov qword [rsp + 0x20], r15
mov qword [rsp + 0x28], 0
mov rcx, r12
lea rdx, [rsp + 0x88]
mov r8, rax
call r13
test eax, eax
je 0x140019bf9
mov r14, rdi
add r14, 4
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov rcx, r14
xor edx, edx
mov r8d, 3
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x140019baf
mov rsi, rax
mov dword [rsp + 0x50], reloc.WLDAP32.dll_Ordinal_12
mov rcx, rax
lea rdx, [rsp + 0x50]
call sub.HID.DLL_HidD_GetAttributes
test al, al
je 0x140019ba6
cmp word [rsp + 0x54], 0xffff
jne 0x140019ba6
cmp word [rsp + 0x56], 0x35
jne 0x140019ba6
mov edx, Ordinal_113
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rcx, qword [rsp + 0x40]
mov qword [rcx], rax
test rax, rax
je 0x140019ba6
mov r15, qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x60], rsi
mov rcx, rsi
lea rdx, [rsp + 0x68]
call sub.HID.DLL_HidD_GetPreparsedData
test al, al
je 0x140019af9
mov rax, qword [rsp + 0x40]
mov rdx, qword [rax]
add rdx, 0x24
mov rcx, qword [rsp + 0x68]
call sub.HID.DLL_HidP_GetCaps
test eax, eax
jns 0x140019aef
lea rcx, str.c1c1c_c1cCcCcXcCcc_nc_ac3c_c_c
mov edx, eax
call fcn.140016430
mov rcx, qword [rsp + 0x68]
call sub.HID.DLL_HidD_FreePreparsedData
mov rcx, r14
call fcn.140103e10
mov r13, qword [rsp + 0x40]
mov rcx, qword [r13]
mov qword [rcx + 0x10], rax
mov rax, qword [r13]
mov rcx, qword [rsp + 0x50]
mov qword [rax + 0x18], rcx
mov ecx, dword [rsp + 0x58]
mov dword [rax + 0x20], ecx
mov rax, qword [r13]
mov rsi, qword [rsp + 0x48]
mov dword [rax + 8], esi
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov rcx, r14
mov edx, 3
mov r8d, 3
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, qword [r13]
mov qword [rcx + 0x68], rax
mov rax, qword [r13]
mov rcx, qword [rax + 0x68]
inc rcx
cmp rcx, 2
jae 0x140019bcc
call r15
cmp eax, 5
je 0x140019b93
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.L_t__t__tF_t__t__t__t2_t__tJ_t_tl_th_t_tl_tO_t__te_tl_t__t__ta_tM_tl_t
mov edx, eax
call fcn.140016430
mov r14, qword [rsp + 0x40]
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [r14], rax
jmp 0x140019bd8
mov r14, qword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x140019bf0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140144010]
mov edx, eax
call fcn.140016430
mov r14, qword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x140019bf9
inc esi
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], rax
lea r15, [rsp + 0x3c]
mov r13, qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
mov r14, qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, qword [rsp + 0x60]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdi, qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
lea rsi, [rsp + 0x88]
mov dword [rsp + 0x88], Ordinal_36
mov qword [rsp + 0x20], rsi
mov rcx, r12
xor edx, edx
mov r8, rbx
mov r9d, ebp
call rdi
inc ebp
test eax, eax
jne 0x14001998d
mov rcx, r12
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov rdi, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x48]
jmp 0x140019c63
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140144070]
mov edx, eax
call fcn.140016430
xor ecx, ecx
test rdi, rdi
je 0x140019c6a
mov dword [rdi], ecx
xor eax, eax
test ecx, ecx
setne al
add rsp, 0xa8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret