Function at 0x14018c310
Capabilities:
Get socket status
Send data
Send data on socket

Disassembly:
push rbp
push rsi
push rdi
push r12
lea rbp, [rsp - 0x598]
sub rsp, 0x698
mov rax, qword [0x14024fa28]
xor rax, rsp
mov qword [rbp + 0x570], rax
mov dword [rsp + 0x30], r9d
mov rsi, r8
mov r12, rdx
mov rdi, rcx
cmp rcx, 0xffffffffffffffff
jne 0x14018c35a
lea ecx, [rdi + 0xb]
call fcn.14018f3e0
mov rax, rdi
jmp 0x14018c5bb
xor eax, eax
mov qword [rsp + 0x688], r14
xor r10d, r10d
mov qword [rsp + 0x680], r15
xor r15b, r15b
mov word [rsp + 0x54], ax
mov byte [rsp + 0x56], al
mov r14, r8
mov qword [rsp + 0x38], r10
test r8, r8
je 0x14018c5a8
mov qword [rsp + 0x690], r13
mov r13d, dword [rbp + 0x5e0]
mov qword [rsp + 0x6d8], rbx
cmp r14, 0xffffffffffffffff
je 0x14018c598
cmp byte [rsp + 0x54], 0
mov r8d, 0xffffffff
mov eax, dword [rsp + 0x58]
movzx ecx, byte [rsp + 0x55]
cmovne eax, r10d
mov edx, dword [rbp + 0x160]
test cl, cl
mov dword [rsp + 0x58], eax
mov eax, dword [rbp + 0x368]
cmovne edx, r10d
cmp byte [rsp + 0x56], 0
mov dword [rbp + 0x160], edx
cmovne eax, r10d
mov dword [rsp + 0x50], r8d
mov dword [rbp + 0x368], eax
test cl, cl
jne 0x14018c407
mov edx, r10d
mov byte [rsp + 0x55], 1
mov dword [rbp + 0x160], edx
mov eax, r10d
test edx, edx
je 0x14018c424
lea rcx, [rbp + 0x168]
cmp qword [rcx], rdi
je 0x14018c424
inc eax
add rcx, 8
cmp eax, edx
jb 0x14018c415
cmp eax, edx
jne 0x14018c442
cmp edx, 0x40
jae 0x14018c442
mov ecx, eax
mov qword [rbp + rcx*8 + 0x168], rdi
inc dword [rbp + 0x160]
mov r8d, dword [rsp + 0x50]
cmp edi, r8d
mov ebx, r13d
mov eax, r13d
cmovg r8d, edi
mov dword [rsp + 0x50], r8d
test r13d, r13d
jle 0x14018c48e
call qword [sym.imp.KERNEL32.dll_GetTickCount]
test r15b, r15b
je 0x14018c47f
mov rbx, qword [rsp + 0x38]
add ebx, r13d
sub ebx, eax
jns 0x14018c489
mov ecx, reloc.WS2_32.dll_ntohs
call fcn.14018f3e0
jmp 0x14018c582
mov eax, eax
mov r15b, 1
mov qword [rsp + 0x38], rax
xor r10d, r10d
jmp 0x14018c495
mov rcx, r10
test eax, eax
js 0x14018c4c9
cmp dword [0x140256d94], 0
lea rcx, [rsp + 0x40]
mov eax, 0x64
cmovne ebx, eax
mov eax, 0x10624dd3
mul ebx
shr edx, 6
imul eax, edx, 0x3e8
mov dword [rsp + 0x40], edx
sub ebx, eax
imul eax, ebx, 0x3e8
mov dword [rsp + 0x44], eax
cmp byte [rsp + 0x56], 0
lea r9, [rbp + 0x368]
mov qword [rsp + 0x20], rcx
lea r8, [rbp + 0x160]
cmove r9, r10
lea rdx, [rsp + 0x58]
cmp byte [rsp + 0x55], 0
cmove r8, r10
cmp byte [rsp + 0x54], 0
cmove rdx, r10
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x14018c582
test eax, eax
jne 0x14018c517
lea ecx, [rax + 0xf]
call fcn.14018f3e0
jmp 0x14018c582
jle 0x14018c582
cmp byte [rsp + 0x55], 0
je 0x14018c582
lea rdx, [rbp + 0x160]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x14018c582
mov ecx, dword [rsp + 0x30]
mov r8d, esi
mov eax, dword [rsp + 0x30]
and ecx, 1
mov r9d, ecx
mov rdx, r12
or r9d, 2
and al, 2
cmove r9d, ecx
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x14018c570
cdqe
cmp rax, 0xffffffffffffffff
je 0x14018c570
add r12, rax
sub rsi, rax
jmp 0x14018c589
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14018f710
cmp eax, 0x10
je 0x14018c589
mov r14, 0xffffffffffffffff
mov r10d, 0
test rsi, rsi
jne 0x14018c3a3
mov rbx, qword [rsp + 0x6d8]
mov r13, qword [rsp + 0x690]
mov r15, qword [rsp + 0x680]
mov rax, r14
mov r14, qword [rsp + 0x688]
mov rcx, qword [rbp + 0x570]
xor rcx, rsp
call fcn.1401c5190
add rsp, 0x698
pop r12
pop rdi
pop rsi
pop rbp
ret