Function at 0x140004f70
Capabilities:
Terminate thread

Disassembly:
push rbp
push rbx
push rsi
push rdi
lea rbp, [rsp - 0x3f]
sub rsp, 0x88
mov rsi, rcx
mov eax, 1
xchg dword [rcx + 0x3c], eax
xor edi, edi
cmp qword [rcx + 0x48], rdi
je 0x140004fba
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]
mov eax, edi
lock xadd dword [rsi + 0x30], eax
test eax, eax
jle 0x140005164
nop dword [rax]
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x19], xmm0
mov rbx, qword [rsi + 0x88]
test rbx, rbx
je 0x140005006
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rbx]
lea rdx, [rbp - 0x19]
mov rcx, rbx
call qword [rax + 0x28]
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x140004ff0
mov rbx, qword [rsi + 0x90]
test rbx, rbx
je 0x140005044
mov rax, qword [rbp - 0x11]
test rax, rax
je 0x140005025
mov qword [rax + 0x20], rbx
mov rbx, qword [rbp - 0x19]
jmp 0x140005029
mov qword [rbp - 0x19], rbx
mov rax, qword [rsi + 0x98]
mov qword [rbp - 0x11], rax
mov qword [rsi + 0x90], rdi
mov qword [rsi + 0x98], rdi
jmp 0x140005048
mov rbx, qword [rbp - 0x19]
test rbx, rbx
je 0x1400050a9
mov rdx, rbx
mov rax, rbx
mov rcx, rbx
test rax, rax
je 0x140005076
mov rax, qword [rcx + 0x20]
mov qword [rbp - 0x19], rax
mov rcx, qword [rbp - 0x11]
test rax, rax
cmove rcx, rdi
mov qword [rbp - 0x11], rcx
mov qword [rdx + 0x20], rdi
lock dec dword [rsi + 0x30]
mov dword [rbp - 9], edi
call fcn.140066390
mov qword [rbp - 1], rax
xor r9d, r9d
lea r8, [rbp - 9]
mov rdx, rbx
xor ecx, ecx
call qword [rbx + 0x28]
mov rbx, qword [rbp - 0x19]
mov rdx, rbx
mov rax, rbx
mov rcx, rbx
test rbx, rbx
jne 0x140005056
jmp 0x1400050fc
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 0x1400050fc
lock dec dword [rsi + 0x30]
mov rbx, qword [rbp + 0x6f]
mov dword [rbp + 7], edi
call fcn.140066390
mov qword [rbp + 0xf], rax
xor r9d, r9d
lea r8, [rbp + 7]
mov rdx, rbx
xor ecx, ecx
call qword [rbx + 0x28]
nop
mov rbx, qword [rbp - 0x19]
test rbx, rbx
je 0x140005155
mov rdx, rbx
mov rax, rbx
nop dword [rax + rax]
mov rax, qword [rax + 0x20]
mov qword [rbp - 0x19], rax
mov rcx, qword [rbp - 0x11]
test rax, rax
cmove rcx, rdi
mov qword [rbp - 0x11], rcx
mov qword [rdx + 0x20], rdi
mov dword [rbp + 0x17], edi
call fcn.140066390
mov qword [rbp + 0x1f], rax
xor r9d, r9d
lea r8, [rbp + 0x17]
mov rdx, rbx
xor ecx, ecx
call qword [rbx + 0x28]
mov rbx, qword [rbp - 0x19]
mov rdx, rbx
mov rax, rbx
test rbx, rbx
jne 0x140005110
mov eax, edi
lock xadd dword [rsi + 0x30], eax
test eax, eax
jg 0x140004fd0
mov rbx, qword [rsi + 0x48]
test rbx, rbx
je 0x1400051e7
mov rax, qword [rbx + 0x10]
mov qword [rbp + 0x27], rax
mov rax, qword [rbx + 8]
mov qword [rbp + 0x2f], rax
mov r9d, 0xffffffff
xor r8d, r8d
lea rdx, [rbp + 0x27]
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 [0x14009dcd0], edi
mov rax, qword [rbx + 8]
test edi, edi
je 0x1400051c5
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateThread]
add rsp, 0x88
pop rdi
pop rsi
pop rbx
pop rbp
ret
xor r8d, r8d
mov rdx, rax
lea rcx, [fcn.140003d80]
call qword [sym.imp.KERNEL32.dll_QueueUserAPC]
mov edx, 0xffffffff
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add rsp, 0x88
pop rdi
pop rsi
pop rbx
pop rbp
ret