Function at 0x140081a80
Capabilities:
Terminate thread

Disassembly:
push rbp
push rsi
push rdi
push rbx
sub rsp, 0x48
lea rbp, [rsp + 0x40]
mov qword [rbp], 0xfffffffffffffffe
mov rsi, rcx
mov rcx, qword [rcx + 0x40]
test rcx, rcx
je 0x140081b14
mov rax, qword [rcx]
lock dec dword [rax + 0x30]
jne 0x140081b0f
mov r8d, 1
xchg dword [rax + 0x34], r8d
mov edx, 1
test r8d, r8d
jne 0x140081b0f
xchg dword [rax + 0x38], edx
test edx, edx
jne 0x140081b0f
mov rax, qword [rax + 0x28]
mov rdi, rcx
mov rcx, rax
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
mov rcx, rdi
test eax, eax
jne 0x140081b0f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x10], eax
lea rcx, str.P__
mov qword [rbp - 8], rcx
test eax, eax
je 0x140081b0c
lea rdx, str.pqcs
lea rcx, [rbp - 0x10]
call fcn.140077900
mov rcx, rdi
call fcn.1401c3b88
mov qword [rsi + 0x40], 0
mov rax, qword [rsi + 0x30]
test rax, rax
je 0x140081cc1
mov rax, qword [rax + 0x10]
mov edx, 1
xchg dword [rax + 0x34], edx
mov ecx, 1
test edx, edx
jne 0x140081b83
xchg dword [rax + 0x38], ecx
test ecx, ecx
jne 0x140081b83
mov rcx, qword [rax + 0x28]
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x140081b83
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x10], eax
lea rcx, str.P__
mov qword [rbp - 8], rcx
test eax, eax
je 0x140081b83
lea rdx, str.pqcs
lea rcx, [rbp - 0x10]
call fcn.140077900
mov rdi, qword [rsi + 0x48]
test rdi, rdi
je 0x140081c1e
vpermilps xmm0, xmmword [rdi + 8], 0x4e
vmovups xmmword [rbp - 0x10], xmm0
lea rdx, [rbp - 0x10]
mov ecx, 2
xor r8d, r8d
mov r9d, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mfence
mov eax, dword [0x14029c2d4]
mov rdx, qword [rdi + 8]
test eax, eax
je 0x140081bdc
mov rcx, rdx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
jmp 0x140081bfb
lea rcx, [fcn.140006120]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_QueueUserAPC]
mov rcx, qword [rdi + 8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rdi, qword [rsi + 0x48]
test rdi, rdi
je 0x140081c16
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call fcn.1401c3b88
mov qword [rsi + 0x48], 0
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x140081cb9
mov rdi, qword [rcx + 8]
test rdi, rdi
je 0x140081c9f
mov qword [rbp - 0x18], rcx
mov rbx, qword [rdi + 0x30]
test rbx, rbx
je 0x140081c8a
nop word cs:[rax + rax]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
mov rbx, qword [rbx + 0x20]
test rbx, rbx
jne 0x140081c50
mov rcx, qword [rdi + 0x30]
test rcx, rcx
je 0x140081c8a
nop dword [rax + rax]
mov rax, qword [rcx]
mov rbx, qword [rcx + 0x20]
mov edx, 1
call qword [rax]
mov qword [rdi + 0x30], rbx
mov rcx, rbx
test rbx, rbx
jne 0x140081c70
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rcx, rdi
call fcn.1401c3b88
mov rcx, qword [rbp - 0x18]
lock dec dword [0x14029c2c8]
jne 0x140081cb4
mov rdi, rcx
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov rcx, rdi
call fcn.1401c3b88
mov qword [rsi + 0x30], 0
add rsp, 0x48
pop rbx
pop rdi
pop rsi
pop rbp
ret