Function at 0x140005800
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r15
sub rsp, 0x60
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [rdi + 0x8c]
mov ebp, 1
mov esi, eax
cmp edx, 3
je 0x140005881
xor r15d, r15d
mov ebx, r15d
xor eax, eax
lock cmpxchg dword [rdi + 0x1b0], ebp
je 0x140005866
mov eax, ebx
and eax, 0xfff
cmp eax, 0xfff
jne 0x140005857
call qword [sym.imp.KERNEL32.dll_SwitchToThread]
inc ebx
jmp 0x140005833
mov eax, ebx
and eax, 0x3f
cmp al, 0x3f
jne 0x140005862
pause
inc ebx
jmp 0x140005833
mov eax, dword [rdi + 0x8c]
cmp eax, ebp
je 0x140005899
mov eax, dword [rdi + 0x8c]
test eax, eax
je 0x140005899
mov dword [rdi + 0x1b0], r15d
mov ecx, 0x139f
mov dword [rdi + 0x84], ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140005af9
mov dword [rdi + 0x8c], 2
mov dword [rdi + 0x1b0], r15d
cmp qword [rdi + 0x78], r15
je 0x140005985
cmp esi, dword [rdi + 0x80]
je 0x140005970
mov rcx, qword [rdi + 0x208]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rax, qword [rdi + 0x78]
mov qword [rsp + 0x80], rax
nop dword [rax]
mov r9d, 0xffffffff
mov dword [rsp + 0x20], 0x1cff
xor r8d, r8d
lea rdx, [rsp + 0x80]
mov ecx, ebp
call qword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
cmp eax, ebp
jne 0x140005953
xor r9d, r9d
mov dword [rsp + 0x20], ebp
xor r8d, r8d
lea rcx, [rsp + 0x30]
xor edx, edx
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x1400058e0
lea rcx, [rsp + 0x30]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0x30]
call qword [sym.imp.USER32.dll_DispatchMessageW]
xor r9d, r9d
mov dword [rsp + 0x20], ebp
xor r8d, r8d
lea rcx, [rsp + 0x30]
xor edx, edx
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
jne 0x140005920
jmp 0x1400058e0
test eax, eax
je 0x140005970
cmp eax, 0x102
je 0x140005b24
cmp eax, 0xffffffff
jne 0x140005b19
jmp 0x140005b2f
mov rcx, qword [rdi + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x78], r15
mov dword [rdi + 0x80], r15d
mov eax, dword [rdi + 0x88]
mov qword [rsp + 0x88], r14
test eax, eax
je 0x1400059be
cmp dword [rdi + 0x54], r15d
je 0x1400059b7
mov rcx, qword [rdi + 0x58]
lea rdx, [0x14003ce18]
xor r9d, r9d
mov r8d, reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_send]
mov dword [rdi + 0x88], r15d
cmp dword [rdi + 0x48], r15d
je 0x1400059d4
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, r15d
xchg dword [rdi + 0x20], eax
mov rcx, qword [rdi + 0x60]
test rcx, rcx
je 0x1400059e7
call qword [sym.imp.WS2_32.dll_WSACloseEvent]
mov qword [rdi + 0x60], r15
mov rcx, qword [rdi + 0x58]
mov rsi, 0xffffffffffffffff
cmp rcx, rsi
je 0x140005a0d
mov edx, ebp
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rdi + 0x58]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rdi + 0x58], rsi
lea rcx, [rdi + 0x268]
call fcn.140006250
lea rcx, [rdi + 0x1b8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rdi + 0x200]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, qword [rdi + 0x208]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, qword [rdi + 0x210]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
lea rcx, [rdi + 0x1e0]
call fcn.140002830
lea rcx, [rdi + 0xb8]
call fcn.1400026f0
mov rax, qword [rdi + 0xa8]
lea rdx, [rax - 0x18]
mov r14, qword [rdx]
cmp dword [rdx + 8], r15d
je 0x140005abf
cmp dword [rdx + 0x10], r15d
jge 0x140005a99
cmp dword [rax - 0xc], r15d
jl 0x140005b0e
mov dword [rax - 0x10], r15d
mov rax, qword [rdi + 0xa8]
mov byte [rax], r15b
jmp 0x140005abf
lock xadd dword [rdx + 0x10], esi
sub esi, ebp
jg 0x140005aab
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + htons]
mov rdx, qword [r14]
mov rcx, r14
call qword [rdx + 0x18]
add rax, 0x18
mov qword [rdi + 0xa8], rax
mov rcx, qword [rdi + 0x40]
mov word [rdi + 0xb0], r15w
mov dword [rdi + 0x218], r15d
mov dword [rdi + 0x8c], 3
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea rcx, [rdi + 0x1b8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r14, qword [rsp + 0x88]
mov eax, ebp
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop rdi
pop rsi
ret
mov ecx, 0x80070057
call fcn.140001590
int3
mov ecx, 0x80004005
call fcn.140001590
int3
mov ecx, 0x5b4
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, 0x80004005
call fcn.140001590
int3