Function at 0x14001a770
Capabilities:
Terminate thread

Disassembly:
push rbp
push rbx
push rsi
push rdi
lea rbp, [rsp - 0x3f]
sub rsp, 0xb8
mov rsi, rcx
mov eax, 1
xchg dword [rcx + 0x3c], eax
xor edi, edi
cmp qword [rcx + 0x48], rdi
je 0x14001a7ba
mov qword [rbp + 0x77], 1
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rdi
xor r9d, r9d
lea r8d, [rdi + 1]
lea rdx, [rbp + 0x77]
mov rcx, qword [rcx + 0x50]
call qword [sym.imp.KERNEL32.dll_SetWaitableTimer]
cmp qword [rsi + 0xa8], rdi
je 0x14001a873
mov rcx, rsi
call fcn.14001ab00
mov rbx, qword [rsi + 0xa8]
mov rax, qword [rbx + 0x10]
mov qword [rbp - 0x39], rax
mov rax, qword [rbx + 8]
mov qword [rbp - 0x31], rax
mov r9d, 0xffffffff
xor r8d, r8d
lea rdx, [rbp - 0x39]
lea ecx, [r8 + 2]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
lock xadd dword [0x14026aed0], eax
mov rcx, qword [rbx + 8]
test eax, eax
je 0x14001a823
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
jmp 0x14001a845
xor r8d, r8d
mov rdx, rcx
lea rcx, [fcn.140002df0]
call qword [sym.imp.KERNEL32.dll_QueueUserAPC]
mov edx, 0xffffffff
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rbx, qword [rsi + 0xa8]
test rbx, rbx
je 0x14001a868
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 0x18
mov rcx, rbx
call fcn.14015ae00
mov qword [rsi + 0xa8], rdi
lock dec dword [rsi + 0x30]
mov eax, edi
lock xadd dword [rsi + 0x30], eax
test eax, eax
jle 0x14001aa20
nop dword [rax]
nop word [rax + rax]
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x49], xmm0
mov rbx, qword [rsi + 0x88]
test rbx, rbx
je 0x14001a8c6
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rbx]
lea rdx, [rbp - 0x49]
mov rcx, rbx
call qword [rax + 0x28]
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x14001a8b0
mov rdx, qword [rsi + 0x90]
test rdx, rdx
je 0x14001a904
mov rax, qword [rbp - 0x41]
test rax, rax
je 0x14001a8e5
mov qword [rax + 0x20], rdx
mov rdx, qword [rbp - 0x49]
jmp 0x14001a8e9
mov qword [rbp - 0x49], rdx
mov rax, qword [rsi + 0x98]
mov qword [rbp - 0x41], rax
mov qword [rsi + 0x90], rdi
mov qword [rsi + 0x98], rdi
jmp 0x14001a908
mov rdx, qword [rbp - 0x49]
test rdx, rdx
je 0x14001a965
mov r10, rdx
mov rax, rdx
test rax, rax
je 0x14001a933
mov rax, qword [rdx + 0x20]
mov qword [rbp - 0x49], rax
mov rcx, qword [rbp - 0x41]
test rax, rax
cmove rcx, rdi
mov qword [rbp - 0x41], rcx
mov qword [rdx + 0x20], rdi
lock dec dword [rsi + 0x30]
mov rax, qword [r10 + 0x28]
xorps xmm0, xmm0
movups xmmword [rbp - 0x19], xmm0
mov qword [rbp - 9], rdi
xor r9d, r9d
lea r8, [rbp - 0x19]
mov rdx, r10
xor ecx, ecx
call rax
mov rdx, qword [rbp - 0x49]
mov r10, rdx
mov rax, rdx
test rdx, rdx
jne 0x14001a913
jmp 0x14001a9ba
mov dword [rbp + 0x67], edi
mov qword [rbp + 0x7f], rdi
mov qword [rbp + 0x6f], rdi
mov eax, dword [rsi + 0x40]
mov dword [rsp + 0x20], eax
lea r9, [rbp + 0x6f]
lea r8, [rbp + 0x7f]
lea rdx, [rbp + 0x67]
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetQueuedCompletionStatus]
cmp qword [rbp + 0x6f], 0
je 0x14001a9b6
lock dec dword [rsi + 0x30]
mov rdx, qword [rbp + 0x6f]
mov rax, qword [rdx + 0x28]
xorps xmm0, xmm0
movups xmmword [rbp - 1], xmm0
mov qword [rbp + 0xf], rdi
xor r9d, r9d
lea r8, [rbp - 1]
xor ecx, ecx
call rax
mov rdx, qword [rbp - 0x49]
mov r10, rdx
test rdx, rdx
je 0x14001aa11
mov rax, rdx
test rax, rax
je 0x14001a9e5
mov rax, qword [rdx + 0x20]
mov qword [rbp - 0x49], rax
mov rcx, qword [rbp - 0x41]
test rax, rax
cmove rcx, rdi
mov qword [rbp - 0x41], rcx
mov qword [rdx + 0x20], rdi
mov rax, qword [r10 + 0x28]
xorps xmm0, xmm0
movups xmmword [rbp + 0x17], xmm0
mov qword [rbp + 0x27], rdi
xor r9d, r9d
lea r8, [rbp + 0x17]
mov rdx, r10
xor ecx, ecx
call rax
mov rdx, qword [rbp - 0x49]
mov r10, rdx
mov rax, rdx
test rdx, rdx
jne 0x14001a9c5
mov eax, edi
lock xadd dword [rsi + 0x30], eax
test eax, eax
jg 0x14001a890
mov rbx, qword [rsi + 0x48]
test rbx, rbx
je 0x14001aaa3
mov rax, qword [rbx + 0x10]
mov qword [rbp - 0x29], rax
mov rax, qword [rbx + 8]
mov qword [rbp - 0x21], rax
mov r9d, 0xffffffff
xor r8d, r8d
lea rdx, [rbp - 0x29]
lea ecx, [r8 + 2]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lock xadd dword [0x14026aed0], edi
mov rax, qword [rbx + 8]
test edi, edi
je 0x14001aa81
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateThread]
add rsp, 0xb8
pop rdi
pop rsi
pop rbx
pop rbp
ret
xor r8d, r8d
mov rdx, rax
lea rcx, [fcn.140002df0]
call qword [sym.imp.KERNEL32.dll_QueueUserAPC]
mov edx, 0xffffffff
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add rsp, 0xb8
pop rdi
pop rsi
pop rbx
pop rbp
ret