Function at 0x18000124c
Capabilities:
Create thread

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0x88
xor ebx, ebx
lea rcx, [rbp - 0x19]
lea rdi, [0x1800d7ad8]
mov r15d, ebx
mov qword [0x1800d7ad8], rbx
call qword [sym.imp.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 0x1800015ad
mov esi, ebx
mov dword [rbp + 0x67], ebx
lea rax, [rbp - 9]
lea r8, [rbp - 0x19]
mov r9d, esi
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 r14d, eax
mov dword [rbp + 0x77], eax
test eax, eax
je 0x180001594
lea rax, [rbp + 0x6f]
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 + 0x6f], ebx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
jne 0x180001594
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x180001594
mov edx, dword [rbp + 0x6f]
lea ecx, [rax - 0x3a]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r13, rax
test rax, rax
je 0x180001594
mov dword [rax], 8
mov r9d, dword [rbp + 0x6f]
lea rax, [rbp + 0x6f]
lea rdx, [rbp - 9]
mov r8, r13
mov rcx, r12
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
je 0x18000158b
mov ecx, 3
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ecx
mov r8d, ecx
lea rcx, [r13 + 4]
xor r9d, r9d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x180001573
lea rdx, [rbp - 0x29]
mov rcx, rax
mov dword [rbp - 0x29], reloc.WLDAP32.dll_Ordinal_12
call qword [sym.imp.HID.DLL_HidD_GetAttributes]
test al, al
je 0x180001568
movzx edx, word [rbp - 0x23]
movzx r8d, word [rbp - 0x25]
mov ecx, ebx
lea rax, [0x1800956f2]
cmp word [rax - 2], r8w
jne 0x1800013c9
cmp word [rax], dx
je 0x180001510
inc ecx
add rax, 0x10
cmp ecx, 6
jb 0x1800013b9
mov rsi, rbx
test rsi, rsi
je 0x180001565
test byte [rsi + 4], 2
je 0x180001565
mov edx, 0xa0
lea ecx, [rdx - 0x60]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rdi], rax
test rax, rax
je 0x180001565
lea rdx, [rbp + 0x7f]
mov rcx, r14
call qword [sym.imp.HID.DLL_HidD_GetPreparsedData]
test al, al
je 0x180001442
mov rdx, qword [rdi]
mov rcx, qword [rbp + 0x7f]
add rdx, 0x24
call qword [sym.imp.HID.DLL_HidP_GetCaps]
test eax, eax
jns 0x180001438
lea rcx, str.ERROR_kull_m_busylight_devices_get___HidP_GetCaps___08x__n
mov edx, eax
call fcn.180008f6c
mov rcx, qword [rbp + 0x7f]
call qword [sym.imp.HID.DLL_HidD_FreePreparsedData]
lea rcx, [r13 + 4]
call fcn.180074c34
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov r11, rax
mov rax, qword [rdi]
mov dword [rsp + 0x28], ebx
mov qword [rax + 0x10], r11
mov eax, dword [rbp - 0x29]
mov rcx, qword [rdi]
mov dword [rcx + 0x18], eax
mov eax, dword [rbp - 0x25]
mov dword [rcx + 0x1c], eax
mov eax, dword [rbp - 0x21]
mov dword [rcx + 0x20], eax
mov rax, qword [rdi]
lea rcx, [r13 + 4]
mov qword [rax + 0x68], rsi
mov rax, qword [rdi]
mov byte [rax + 0x70], 4
mov rax, qword [rdi]
mov byte [rax + 0x71], 4
mov rax, qword [rdi]
mov byte [rax + 0x72], Ordinal_88
mov rax, qword [rdi]
mov dword [rax + 8], r15d
mov eax, 3
mov r8d, eax
mov edx, eax
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r11, rax
mov rax, qword [rdi]
mov qword [rax + 0x78], r11
mov rax, qword [rdi]
cmp qword [rax + 0x78], rbx
je 0x180001548
cmp qword [rax + 0x78], 0xffffffffffffffff
je 0x180001548
mov dword [rax + 0x80], 0x1388
mov r9, qword [rdi]
lea r8, [0x1800015e0]
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov r11, rax
mov rax, qword [rdi]
mov qword [rax + 0x88], r11
test r11, r11
je 0x180001525
mov rdi, qword [rdi]
inc r15d
jmp 0x180001565
mov esi, ecx
lea rax, [0x1800956f0]
shl rsi, 4
add rsi, rax
jmp 0x1800013d7
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.180008f6c
mov rcx, qword [rdi]
mov rcx, qword [rcx + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x18000155c
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.180008f6c
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [rbp + 0x67]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x180001587
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_busylight_devices_get___CreateFile__deviceHandle___0x_08x__n
mov edx, eax
call fcn.180008f6c
mov r14d, dword [rbp + 0x77]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LocalFree]
inc esi
mov dword [rbp + 0x67], esi
test r14d, r14d
jne 0x1800012a7
mov rcx, r12
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
jmp 0x1800015c1
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.180008f6c
test r15d, r15d
setne bl
mov eax, ebx
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret