Function at 0x140004c50
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 0x140004cd1
xor r15d, r15d
mov ebx, r15d
xor eax, eax
lock cmpxchg dword [rdi + 0x1b0], ebp
je 0x140004cb6
mov eax, ebx
and eax, 0xfff
cmp eax, 0xfff
jne 0x140004ca7
call qword [sym.imp.KERNEL32.dll_SwitchToThread]
inc ebx
jmp 0x140004c83
mov eax, ebx
and eax, 0x3f
cmp al, 0x3f
jne 0x140004cb2
pause
inc ebx
jmp 0x140004c83
mov eax, dword [rdi + 0x8c]
cmp eax, ebp
je 0x140004ce9
mov eax, dword [rdi + 0x8c]
test eax, eax
je 0x140004ce9
mov dword [rdi + 0x1b0], r15d
mov ecx, 0x139f
mov dword [rdi + 0x84], ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x140004f49
mov dword [rdi + 0x8c], 2
mov dword [rdi + 0x1b0], r15d
cmp qword [rdi + 0x78], r15
je 0x140004dd5
cmp esi, dword [rdi + 0x80]
je 0x140004dc0
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 0x140004da3
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 0x140004d30
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 0x140004d70
jmp 0x140004d30
test eax, eax
je 0x140004dc0
cmp eax, 0x102
je 0x140004f74
cmp eax, 0xffffffff
jne 0x140004f69
jmp 0x140004f7f
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 0x140004e0e
cmp dword [rdi + 0x54], r15d
je 0x140004e07
mov rcx, qword [rdi + 0x58]
lea rdx, [0x14004abe0]
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 0x140004e24
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 0x140004e37
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 0x140004e5d
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.1400056c0
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.140001bd0
lea rcx, [rdi + 0xb8]
call fcn.140001a90
mov rax, qword [rdi + 0xa8]
lea rdx, [rax - 0x18]
mov r14, qword [rdx]
cmp dword [rdx + 8], r15d
je 0x140004f0f
cmp dword [rdx + 0x10], r15d
jge 0x140004ee9
cmp dword [rax - 0xc], r15d
jl 0x140004f5e
mov dword [rax - 0x10], r15d
mov rax, qword [rdi + 0xa8]
mov byte [rax], r15b
jmp 0x140004f0f
lock xadd dword [rdx + 0x10], esi
sub esi, ebp
jg 0x140004efb
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.1400010f0
int3
mov ecx, 0x80004005
call fcn.1400010f0
int3
mov ecx, 0x5b4
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, 0x80004005
call fcn.1400010f0
int3