Function at 0x140001dd4
Capabilities:
Create thread

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xb8
mov r14d, r9d
mov edi, r8d
mov rbx, rdx
mov qword [rsp + 0x50], rcx
mov qword [rcx], 0
lea rsi, [rsp + 0xa8]
mov rcx, rsi
call sub.HID.DLL_HidD_GetHidGuid
xor ebp, ebp
mov rcx, rsi
xor edx, edx
xor r8d, r8d
mov r9d, 0x12
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
cmp rax, 0xffffffffffffffff
je 0x14000220a
mov r12, rax
mov qword [rsp + 0x80], rbx
mov dword [rsp + 0x74], edi
mov dword [rsp + 0x70], r14d
lea rsi, [rsp + 0x88]
lea r15, [rsp + 0xa8]
mov rdi, qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
lea rbx, [rsp + 0x40]
lea r13, [0x14011b1b0]
mov dword [rsp + 0x44], 0
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x88], Ordinal_36
mov qword [rsp + 0x20], rsi
mov rcx, r12
xor edx, edx
mov r8, r15
mov r9d, ebp
call rdi
test eax, eax
je 0x1400021f3
mov r14d, eax
mov dword [rsp + 0x40], 0
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x28], 0
mov rcx, r12
mov rdx, rsi
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
jne 0x14000213e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14000213e
mov edx, dword [rsp + 0x40]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
test rax, rax
je 0x140002139
mov rbx, rax
mov dword [rax], 8
mov r9d, dword [rsp + 0x40]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], 0
mov rcx, qword [rsp + 0x58]
lea rdx, [rsp + 0x88]
mov r8, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
je 0x140002130
mov rdi, rbx
add rdi, 4
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov rcx, rdi
xor edx, edx
mov r8d, 3
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x140001fb7
mov rsi, rax
mov dword [rsp + 0x60], reloc.WLDAP32.dll_Ordinal_12
mov rcx, rax
lea rdx, [rsp + 0x60]
call sub.HID.DLL_HidD_GetAttributes
test al, al
je 0x140001fd7
mov qword [rsp + 0x48], rsi
movzx eax, word [rsp + 0x64]
movzx ecx, word [rsp + 0x66]
xor r12d, r12d
mov rdx, r13
cmp word [r12 + rdx], ax
jne 0x140001fa8
cmp word [r12 + rdx + 2], cx
je 0x140001fe3
add r12, 0x10
cmp r12, 0x60
jne 0x140001f99
jmp 0x14000211b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x14013b6f0]
mov edx, eax
call fcn.140016430
mov rdi, qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
jmp 0x140002130
mov rdi, qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
jmp 0x140002127
movzx eax, byte [r12 + rdx + 4]
mov ecx, dword [rsp + 0x74]
and eax, ecx
cmp eax, ecx
jne 0x14000211b
mov edx, 0xa0
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rcx, qword [rsp + 0x50]
mov qword [rcx], rax
test rax, rax
je 0x14000211b
add r12, r13
mov rcx, qword [rsp + 0x48]
lea rdx, [rsp + 0x78]
call sub.HID.DLL_HidD_GetPreparsedData
test al, al
je 0x140002060
mov rax, qword [rsp + 0x50]
mov rdx, qword [rax]
add rdx, 0x24
mov rcx, qword [rsp + 0x78]
call sub.HID.DLL_HidP_GetCaps
test eax, eax
jns 0x140002056
lea rcx, [0x14013b5f0]
mov edx, eax
call fcn.140016430
mov rcx, qword [rsp + 0x78]
call sub.HID.DLL_HidD_FreePreparsedData
mov rcx, rdi
call fcn.140103e10
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rdx]
mov qword [rcx + 0x10], rax
mov rax, qword [rdx]
mov rcx, qword [rsp + 0x60]
mov qword [rax + 0x18], rcx
mov ecx, dword [rsp + 0x68]
mov dword [rax + 0x20], ecx
mov rax, qword [rdx]
mov qword [rax + 0x68], r12
mov r12, rdx
mov rax, qword [rdx]
mov cl, 4
mov byte [rax + 0x70], cl
mov rax, qword [rdx]
mov byte [rax + 0x71], cl
mov rax, qword [rdx]
mov byte [rax + 0x72], Ordinal_88
mov rax, qword [rdx]
mov ecx, dword [rsp + 0x44]
mov dword [rax + 8], ecx
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov rcx, rdi
mov edx, 3
mov r8d, 3
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, qword [r12]
mov qword [rcx + 0x78], rax
mov rax, qword [r12]
mov rcx, qword [rax + 0x78]
inc rcx
cmp rcx, 2
jae 0x14000215b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x14013b6a0]
mov edx, eax
call fcn.140016430
mov rcx, qword [r12]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [r12], rax
mov rdi, qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
mov rsi, qword [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rbx, [rsp + 0x40]
lea rsi, [rsp + 0x88]
mov r12, qword [rsp + 0x58]
inc ebp
test r14d, r14d
jne 0x140001e70
jmp 0x1400021f3
cmp dword [rsp + 0x70], 0
je 0x1400021b6
mov dword [rax + 0x80], 0x1388
mov rdi, qword [rsp + 0x50]
mov r9, qword [rdi]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor ecx, ecx
xor edx, edx
lea r8, [0x140002242]
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, qword [rdi]
mov qword [rcx + 0x88], rax
test rax, rax
je 0x1400021c4
mov rdi, qword [rdi]
mov qword [rsp + 0x50], rdi
inc dword [rsp + 0x44]
jmp 0x14000211b
inc dword [rsp + 0x44]
mov qword [rsp + 0x50], rax
jmp 0x14000211b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x14013b630]
mov edx, eax
call fcn.140016430
mov rax, qword [rdi]
mov rcx, qword [rax + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14000211b
mov rcx, r12
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, dword [rsp + 0x44]
mov rbx, qword [rsp + 0x80]
jmp 0x140002220
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x14013b750]
mov edx, eax
call fcn.140016430
xor ecx, ecx
test rbx, rbx
je 0x140002227
mov dword [rbx], ecx
xor eax, eax
test ecx, ecx
setne al
add rsp, 0xb8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret