Function at 0x1800410b8
Capabilities:
Create thread

Disassembly:
mov rax, rsp
mov dword [rax + 0x20], r9d
mov dword [rax + 0x18], r8d
mov qword [rax + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0x98
xor ebx, ebx
mov rdi, rcx
mov r14, rdx
mov qword [rcx], rbx
lea rcx, [rbp - 0x19]
mov esi, ebx
call sub.HID.DLL_HidD_GetHidGuid
lea r9d, [rbx + 0x12]
lea rcx, [rbp - 0x19]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x1800413f6
mov r14d, ebx
mov dword [rbp + 0x67], ebx
lea rax, [rbp - 9]
lea r8, [rbp - 0x19]
mov r9d, r14d
xor edx, edx
mov rcx, r12
mov dword [rbp - 9], Ordinal_36
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
mov r13d, eax
mov dword [rbp - 0x35], eax
test eax, eax
je 0x1800413d7
lea rax, [rbp - 0x39]
lea rdx, [rbp - 9]
xor r9d, r9d
xor r8d, r8d
mov rcx, r12
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x39], ebx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
jne 0x1800413d7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1800413d7
mov edx, dword [rbp - 0x39]
lea ecx, [rax - 0x3a]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test rax, rax
je 0x1800413d7
mov dword [rax], 8
mov r9d, dword [rbp - 0x39]
lea rax, [rbp - 0x39]
lea rdx, [rbp - 9]
mov r8, r15
mov rcx, r12
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
je 0x1800413ce
mov ecx, 3
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ecx
mov r8d, ecx
lea rcx, [r15 + 4]
xor r9d, r9d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x1800413ca
lea rdx, [rbp - 0x29]
mov rcx, rax
mov dword [rbp - 0x29], reloc.WLDAP32.dll_Ordinal_12
call sub.HID.DLL_HidD_GetAttributes
test al, al
je 0x1800413c1
lea rcx, [rbp - 0x29]
call fcn.18004106c
mov r14, rax
test rax, rax
je 0x1800413bd
movzx eax, byte [rax + 4]
and eax, dword [rbp + 0x77]
cmp eax, dword [rbp + 0x77]
jne 0x1800413bd
mov edx, 0xa0
lea ecx, [rdx - 0x60]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rdi], rax
test rax, rax
je 0x1800413bd
lea rdx, [rbp - 0x31]
mov rcx, r13
call sub.HID.DLL_HidD_GetPreparsedData
test al, al
je 0x180041293
mov rdx, qword [rdi]
mov rcx, qword [rbp - 0x31]
add rdx, 0x24
call sub.HID.DLL_HidP_GetCaps
test eax, eax
jns 0x18004128a
lea rcx, str.ERROR_kull_m_busylight_devices_get___HidP_GetCaps___08x__n
mov edx, eax
call fcn.18004d68c
mov rcx, qword [rbp - 0x31]
call sub.HID.DLL_HidD_FreePreparsedData
lea rcx, [r15 + 4]
call fcn.1800cb654
mov rdx, rbx
mov rcx, rax
mov rax, qword [rdi]
mov qword [rax + 0x10], rcx
mov rcx, qword [rdi]
movsd xmm0, qword [rbp - 0x29]
movsd qword [rcx + 0x18], xmm0
mov eax, dword [rbp - 0x21]
mov dword [rcx + 0x20], eax
mov rax, qword [rdi]
mov qword [rax + 0x68], r14
mov rax, qword [rdi]
inc rdx
mov byte [rax + rdx + 0x6f], 4
cmp rdx, 2
jl 0x1800412c3
mov rax, qword [rdi]
mov qword [rsp + 0x30], rbx
lea rcx, [r15 + 4]
mov byte [rax + 0x72], Ordinal_88
mov rax, qword [rdi]
xor r9d, r9d
mov dword [rax + 8], esi
mov eax, 3
mov dword [rsp + 0x28], ebx
mov r8d, eax
mov edx, eax
mov dword [rsp + 0x20], eax
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 0x18004138c
cmp dword [rbp + 0x7f], ebx
je 0x180041387
mov dword [rcx + 0x80], 0x1388
mov r9, qword [rdi]
lea r8, [0x1800417e4]
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], rbx
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 0x180041364
mov rdi, qword [rdi]
inc esi
jmp 0x1800413bd
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_busylight_devices_get___CreateThread__hKeepAliveThread___0x_08x__n
mov edx, eax
call fcn.18004d68c
mov rcx, qword [rdi]
mov rcx, qword [rcx + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1800413a0
mov rdi, rcx
jmp 0x180041360
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_busylight_devices_get___CreateFile__hBusy___0x_08x__n
mov edx, eax
call fcn.18004d68c
mov rax, qword [rdi]
mov rcx, qword [rax + 0x10]
test rcx, rcx
je 0x1800413b1
call fcn.1800cb3fc
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rdi], rax
mov r14d, dword [rbp + 0x67]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r13d, dword [rbp - 0x35]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
inc r14d
mov dword [rbp + 0x67], r14d
test r13d, r13d
jne 0x18004111a
mov rcx, r12
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov r14, qword [rbp + 0x6f]
jmp 0x18004140a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_busylight_devices_get___SetupDiGetClassDevs__0x_08x__n
mov edx, eax
call fcn.18004d68c
test r14, r14
je 0x180041412
mov dword [r14], esi
test esi, esi
setne bl
mov eax, ebx
add rsp, 0x98
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret