Function at 0x140001514
Capabilities:
Create thread

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov dword [rax + 0x20], r9d
mov dword [rax + 0x18], r8d
mov qword [rax + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
xor ebx, ebx
lea rcx, [rbp - 0x30]
mov esi, ebx
mov dword [rbp + 0x50], ebx
mov qword [0x140145d08], rbx
lea rdi, [0x140145d08]
call qword [sym.imp.HID.DLL_HidD_GetHidGuid]
lea r9d, [rbx + 0x12]
xor r8d, r8d
xor edx, edx
lea rcx, [rbp - 0x30]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x140001868
mov r14d, ebx
lea rax, [rbp - 0x20]
mov dword [rbp - Ordinal_36], 0x20
mov r9d, r14d
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x30]
xor edx, edx
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
mov esi, eax
test eax, eax
je 0x14000184f
lea rax, [rbp + 0x58]
mov qword [rsp + 0x28], rbx
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rbp + 0x58], ebx
lea rdx, [rbp - 0x20]
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
jne 0x14000184f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14000184f
mov edx, dword [rbp + 0x58]
lea ecx, [rax - 0x3a]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r12, rax
test rax, rax
je 0x14000184f
mov dword [rax], 8
lea rdx, [rbp - 0x20]
mov r9d, dword [rbp + 0x58]
lea rax, [rbp + 0x58]
mov qword [rsp + 0x28], rbx
mov r8, r12
mov rcx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
je 0x14000183e
xor r9d, r9d
mov qword [rsp + 0x30], rbx
lea rcx, [r12 + 4]
mov dword [rsp + 0x28], ebx
xor edx, edx
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x14000183e
lea rdx, [rbp - 0x40]
mov dword [rbp - 0x40], reloc.WLDAP32.dll_Ordinal_12
mov rcx, rax
call qword [sym.imp.HID.DLL_HidD_GetAttributes]
test al, al
je 0x140001835
movzx edx, word [rbp - 0x3a]
lea rax, [0x1400f3d22]
movzx r8d, word [rbp - 0x3c]
mov ecx, ebx
cmp word [rax - 2], r8w
jne 0x140001699
cmp word [rax], dx
je 0x1400016a9
inc ecx
add rax, 0x10
cmp ecx, 6
jb 0x14000168d
jmp 0x140001835
mov esi, ecx
lea rax, [0x1400f3d20]
shl rsi, 4
add rsi, rax
je 0x140001835
test byte [rsi + 4], 2
je 0x140001835
mov edx, 0xa0
lea ecx, [rdx - 0x60]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rdi], rax
test rax, rax
je 0x140001835
lea rdx, [rbp + 0x48]
mov rcx, r13
call qword [sym.imp.HID.DLL_HidD_GetPreparsedData]
test al, al
je 0x14000171f
mov rdx, qword [rdi]
mov rcx, qword [rbp + 0x48]
add rdx, 0x24
call qword [sym.imp.HID.DLL_HidP_GetCaps]
test eax, eax
jns 0x140001715
lea rcx, str.BigBad_:_kull_m_bUsYlIght_devices_get___ERROR
call fcn.14000b9e4
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.HID.DLL_HidD_FreePreparsedData]
lea rcx, [r12 + 4]
call fcn.1400cc7ec
mov rcx, rax
mov rax, qword [rdi]
mov qword [rax + 0x10], rcx
mov rcx, qword [rdi]
movsd xmm0, qword [rbp - 0x40]
movsd qword [rcx + 0x18], xmm0
mov eax, dword [rbp - 0x38]
mov dword [rcx + 0x20], eax
mov rcx, rbx
mov rax, qword [rdi]
mov qword [rax + 0x68], rsi
mov rax, qword [rdi]
mov byte [rax + rcx + 0x70], 4
inc rcx
cmp rcx, 2
jl 0x140001750
mov rax, qword [rdi]
lea rcx, [r12 + 4]
mov esi, dword [rbp + 0x50]
mov edx, 3
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], ebx
mov r8d, edx
mov byte [rax + 0x72], Ordinal_88
mov rax, qword [rdi]
mov dword [rsp + 0x20], edx
mov dword [rax + 8], esi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, rax
mov rax, qword [rdi]
mov qword [rax + 0x78], rcx
mov rcx, qword [rdi]
mov rax, qword [rcx + 0x78]
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x14000180c
mov dword [rcx + 0x80], 0x1388
lea r8, [0x140001950]
mov r9, qword [rdi]
xor ecx, ecx
mov qword [rsp + 0x28], rbx
xor edx, edx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, rax
mov rax, qword [rdi]
mov qword [rax + 0x88], rcx
test rcx, rcx
je 0x1400017f1
mov rdi, qword [rdi]
inc esi
mov dword [rbp + 0x50], esi
jmp 0x140001835
lea rcx, str.BigBad_:_kull_m_bUsYlIght_devices_get___ERROR
call fcn.14000b9e4
mov rcx, qword [rdi]
mov rcx, qword [rcx + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140001818
lea rcx, str.BigBad_:_kull_m_bUsYlIght_devices_get___ERROR
call fcn.14000b9e4
mov rax, qword [rdi]
mov rcx, qword [rax + 0x10]
test rcx, rcx
je 0x140001829
call fcn.1400cc870
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rdi], rax
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LocalFree]
inc r14d
jmp 0x14000157e
inc r14d
test esi, esi
jne 0x14000157e
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov esi, dword [rbp + 0x50]
jmp 0x140001874
lea rcx, str.BigBad_:_kull_m_bUsYlIght_devices_get___ERROR
call fcn.14000b9e4
test esi, esi
setne bl
mov eax, ebx
mov rbx, qword [rsp + 0xc0]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret