Function at 0x14001cd60
Capabilities:
Create thread

Disassembly:
push rsi
push rdi
sub rsp, 0x38
mov rdi, rdx
mov rsi, rcx
test rcx, rcx
je 0x14001d0f2
cmp word [rcx + 0x214], 2
jb 0x14001d0e6
mov qword [rsp + 0x58], rbp
mov rbp, qword [rcx + 0x25c]
test rbp, rbp
je 0x14001d0e1
mov qword [rsp + 0x50], rbx
movzx ebx, byte [rbp + 1]
mov qword [rsp + 0x30], r15
mov rcx, qword [0x140079b70]
lea r15, [0x140079b70]
cmp rcx, r15
je 0x14001cde1
test byte [rcx + 0x1c], 4
je 0x14001cde1
mov rcx, qword [rcx + 0x10]
mov edx, 0xc
movzx eax, bl
mov dword [rsp + 0x28], eax
lea rax, str.Receive_custom_HID_event
mov qword [rsp + 0x20], rax
call fcn.14003f100
cmp bl, 0xcf
jbe 0x14001cdef
cmp bl, 0xf9
jne 0x14001d0d7
cmp bl, 0x4e
jne 0x14001ce01
cmp dword [0x14007c908], 0
jne 0x14001d0d7
movzx ecx, byte [0x14007b2d1]
test cl, cl
je 0x14001ce18
call fcn.14001d100
mov byte [0x14007b2d1], 0
test bl, bl
je 0x14001d0d7
mov qword [rsp + 0x60], r14
lea rcx, [0x140000000]
xor r14d, r14d
mov eax, r14d
cmp bl, byte [rax + rcx + 0x643d4]
je 0x14001d096
inc rax
cmp rax, 7
jl 0x14001ce32
mov rax, r14
nop dword [rax + rax]
cmp bl, byte [rax + rcx + 0x643c8]
je 0x14001d04f
inc rax
cmp rax, 9
jl 0x14001ce50
cmp bl, 0x3d
jne 0x14001cfad
cmp word [rsi + 0x214], 4
jb 0x14001d0d2
movsx eax, byte [rbp + 3]
xor r9d, r9d
movzx r8d, ax
movsx eax, byte [rbp + 2]
shl r8d, 8
lea edx, [r9 + 0x3d]
mov qword [rsp + 0x28], r14
lea ecx, [rdx + 0x48]
mov dword [rsp + 0x20], r14d
or r8d, eax
call fcn.1400242b0
mov eax, dword [0x140079924]
movzx ebx, byte [rbp + 2]
cmp eax, 2
jne 0x14001cedc
mov ecx, dword [0x1400799b4]
cmp ecx, eax
jne 0x14001cecd
call fcn.14002aa70
mov ecx, dword [0x1400799b4]
mov eax, r14d
cmp ecx, 1
sete al
mov dword [0x140079924], eax
cmp eax, 1
jne 0x14001d0d2
cmp bl, 0x64
ja 0x14001d0d2
mov rcx, qword [0x140079b70]
cmp rcx, r15
je 0x14001cf21
test byte [rcx + 0x1c], 4
je 0x14001cf21
mov rcx, qword [rcx + 0x10]
mov edx, 0xf
movzx eax, bl
mov dword [rsp + 0x28], eax
lea rax, str.Keyboard_battery_percentage_update
mov qword [rsp + 0x20], rax
call fcn.14003f100
mov byte [rdi + 0x2b0], bl
cmp dword [0x140079b24], r14d
je 0x14001cf4c
movzx eax, bl
cmp eax, dword [0x140079b28]
jae 0x14001cf4c
cmp byte [rdi + 0x2b1], r14b
jne 0x14001d0d2
mov al, 1
jmp 0x14001cf59
movzx eax, byte [rdi + 0x2b1]
cmp al, 1
jne 0x14001cf98
xor al, al
mov byte [rdi + 0x2b2], al
mov ecx, 0x208
mov byte [rdi + 0x2b1], al
call fcn.14004d694
mov rbx, rax
test rax, rax
je 0x14001d0d2
lea r8, [rdi + 0x18]
mov edx, 0x104
mov rcx, rax
call fcn.140044288
lea r8, [0x14001c990]
jmp 0x14001d021
cmp al, 2
jne 0x14001d0d2
mov word [rdi + 0x2b1], r14w
jmp 0x14001d0d2
mov byte [0x14007b2d1], bl
cmp bl, 0x85
jne 0x14001d0d2
cmp word [rsi + 0x214], 3
jb 0x14001d0d2
cmp dword [0x14007b31c], r14d
movzx edi, byte [rbp + 2]
je 0x14001d0d2
cmp dword [0x14007b300], r14d
je 0x14001d0d2
cmp dil, 1
je 0x14001cff8
cmp dil, 0x10
jne 0x14001d0d2
mov ecx, 4
call fcn.14004d694
mov rbx, rax
test rax, rax
je 0x14001d0d2
mov eax, r14d
lea r8, [0x14000c670]
cmp dil, 1
sete al
mov dword [rbx], eax
mov qword [rsp + 0x28], r14
mov r9, rbx
xor edx, edx
mov dword [rsp + 0x20], r14d
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_CreateThread]
test rax, rax
je 0x14001d0ca
mov rcx, rax
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
jmp 0x14001d0d2
cmp bl, 0x2a
jne 0x14001d082
mov edi, 0x2a
mov qword [rsp + 0x28], r14
xor r9d, r9d
mov dword [rsp + 0x20], r14d
xor r8d, r8d
mov edx, edi
lea ecx, [rdi + 0x5b]
call fcn.1400242b0
lea edx, [rdi - 0x29]
mov ecx, edi
call fcn.14000b0d0
jmp 0x14001cfb3
movzx edi, bl
mov edx, 1
mov ecx, edi
call fcn.14000b0d0
jmp 0x14001cfb3
movzx ecx, bl
call fcn.14001d100
cmp bl, 0x10
jne 0x14001d0b2
mov edx, 1
lea ecx, [rdx + 0x1f]
call fcn.14000b0d0
jmp 0x14001d0d2
cmp bl, 0x20
jne 0x14001cfb3
mov edx, 1
lea ecx, [rdx + 0x1e]
call fcn.14000b0d0
jmp 0x14001d0d2
mov rcx, rbx
call fcn.14004d69c
mov r14, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x50]
mov r15, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x58]
mov eax, 1
add rsp, 0x38
pop rdi
pop rsi
ret
xor eax, eax
add rsp, 0x38
pop rdi
pop rsi
ret