Function at 0x1400208b0
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rdi
sub rsp, 0x4a0
mov rax, qword [0x1400ee240]
xor rax, rsp
mov qword [rsp + 0x460], rax
cmp dword [rcx + 0x58], 1
mov r8d, edx
mov rdi, rcx
jne 0x140020921
test edx, edx
jle 0x140020cf7
mov eax, 0x10624dd3
xor r9d, r9d
mul r8d
xor ecx, ecx
shr edx, 6
imul eax, edx, 0x3e8
mov dword [rsp + 0x30], edx
xor edx, edx
sub r8d, eax
imul eax, r8d, 0x3e8
xor r8d, r8d
mov dword [rsp + 0x34], eax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
jmp 0x140020cf7
mov qword [rsp + 0x4c0], rbx
mov qword [rsp + 0x498], rbp
mov qword [rsp + 0x490], rsi
mov qword [rsp + 0x488], r12
mov qword [rsp + 0x480], r13
mov qword [rsp + 0x478], r14
mov qword [rsp + 0x470], r15
test r8d, r8d
je 0x1400209f0
mov eax, 0x10624dd3
mov dword [rsp + 0x250], 1
imul r8d
mov ecx, r8d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x3e8
mov dword [rsp + 0x30], edx
xor edx, edx
mov dword [rsp + 0x40], edx
sub ecx, eax
imul eax, ecx, 0x3e8
mov rcx, qword [rdi + 0x50]
mov qword [rsp + 0x258], rcx
mov dword [rsp + 0x34], eax
mov rax, qword [rdi + 0x28]
cmp rax, qword [rdi + 0x20]
je 0x1400209c1
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x40], 1
test r8d, r8d
lea rax, [rsp + 0x30]
lea r8, [rsp + 0x40]
cmovle rax, rdx
inc ecx
xor r9d, r9d
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x250]
call qword [sym.imp.WS2_32.dll_select]
nop word [rax + rax]
mov ebp, dword [rdi + 0x10]
sub ebp, dword [rdi + 8]
mov rsi, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, rsi
sub rcx, rdx
lea eax, [rbp + 0x5dc]
movsxd rbx, eax
cmp rbx, rcx
jae 0x140020a18
lea rax, [rdx + rbx]
jmp 0x140020a48
jbe 0x140020a4c
mov rax, qword [rdi + 0x18]
sub rax, rdx
cmp rbx, rax
jbe 0x140020a34
mov rdx, rbx
lea rcx, [rdi + 8]
call fcn.1400228e0
jmp 0x140020a4c
sub rbx, rcx
xor edx, edx
mov r8, rbx
mov rcx, rsi
call fcn.1400b8490
lea rax, [rsi + rbx]
mov qword [rdi + 0x10], rax
mov rdx, qword [rdi + 8]
xor r9d, r9d
mov rcx, qword [rdi + 0x50]
mov r8d, 0x5dc
movsxd rsi, ebp
add rdx, rsi
call qword [sym.imp.WS2_32.dll_recv]
lea r12, str.Connection_closed__n
mov r15d, eax
test eax, eax
jns 0x140020a91
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x140020b01
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x140020b01
mov rdx, qword [rdi + 8]
test r15d, r15d
jle 0x140020c08
lea eax, [r15 + rbp]
mov r15, qword [rdi + 0x10]
mov rcx, r15
movsxd rsi, eax
sub rcx, rdx
cmp rsi, rcx
jae 0x140020ac1
lea rax, [rdx + rsi]
mov qword [rdi + 0x10], rax
jmp 0x1400209f0
jbe 0x1400209f0
mov rax, qword [rdi + 0x18]
sub rax, rdx
cmp rsi, rax
jbe 0x140020ae4
mov rdx, rsi
lea rcx, [rdi + 8]
call fcn.1400228e0
jmp 0x1400209f0
sub rsi, rcx
xor edx, edx
mov r8, rsi
mov rcx, r15
call fcn.1400b8490
lea rax, [r15 + rsi]
mov qword [rdi + 0x10], rax
jmp 0x1400209f0
mov r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
sub rcx, rdx
cmp rsi, rcx
jae 0x140020bcc
lea rax, [rdx + rsi]
mov qword [rdi + 0x10], rax
lea rbp, str.Connection_error__n
mov rcx, qword [rdi + 0x28]
mov rdx, qword [rdi + 0x20]
mov r15, qword [rsp + 0x470]
mov r14, qword [rsp + 0x478]
mov r13, qword [rsp + 0x480]
cmp rcx, rdx
je 0x140020cb6
sub ecx, edx
xor r9d, r9d
mov r8d, ecx
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.WS2_32.dll_send]
movsxd rbx, eax
test eax, eax
jns 0x140020b8b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x140020cb6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x140020cb6
test ebx, ebx
jle 0x140020c8a
mov rsi, qword [rdi + 0x20]
lea rdx, [rsi + rbx]
cmp rsi, rdx
je 0x140020bba
mov rbx, qword [rdi + 0x28]
mov rcx, rsi
sub rbx, rdx
mov r8, rbx
call fcn.1400b7df0
lea rax, [rbx + rsi]
mov qword [rdi + 0x28], rax
mov rcx, qword [rdi + 0x28]
mov rdx, qword [rdi + 0x20]
cmp rcx, rdx
jne 0x140020b50
jmp 0x140020cb6
jbe 0x140020b20
mov rax, qword [rdi + 0x18]
sub rax, rdx
cmp rsi, rax
jbe 0x140020bef
mov rdx, rsi
lea rcx, [rdi + 8]
call fcn.1400228e0
jmp 0x140020b20
sub rsi, rcx
xor edx, edx
mov r8, rsi
mov rcx, r14
call fcn.1400b8490
lea rax, [r14 + rsi]
jmp 0x140020b1c
mov r14, qword [rdi + 0x10]
mov rcx, r14
sub rcx, rdx
cmp rsi, rcx
jae 0x140020c1d
lea rax, [rdx + rsi]
jmp 0x140020c4d
jbe 0x140020c51
mov rax, qword [rdi + 0x18]
sub rax, rdx
cmp rsi, rax
jbe 0x140020c39
mov rdx, rsi
lea rcx, [rdi + 8]
call fcn.1400228e0
jmp 0x140020c51
sub rsi, rcx
xor edx, edx
mov r8, rsi
mov rcx, r14
call fcn.1400b8490
lea rax, [r14 + rsi]
mov qword [rdi + 0x10], rax
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov ecx, 2
mov dword [rdi + 0x58], 1
call fcn.1400910a4
test r15d, r15d
lea rbp, str.Connection_error__n
mov rcx, r12
mov rdx, rax
cmovs rcx, rbp
call fcn.14009af8c
jmp 0x140020b27
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov ecx, 2
mov dword [rdi + 0x58], 1
call fcn.1400910a4
test ebx, ebx
mov rdx, rax
cmovs r12, rbp
mov rcx, r12
call fcn.14009af8c
mov rax, qword [rdi + 0x28]
mov r12, qword [rsp + 0x488]
mov rsi, qword [rsp + 0x490]
mov rbp, qword [rsp + 0x498]
mov rbx, qword [rsp + 0x4c0]
cmp rax, qword [rdi + 0x20]
jne 0x140020cf7
cmp dword [rdi + 0x58], 0
jne 0x140020cf7
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [rdi + 0x58], 1
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.140082310
add rsp, 0x4a0
pop rdi
ret