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

Disassembly:
mov r11, rsp
push rdi
sub rsp, 0x470
cmp dword [rcx + 0x58], 1
mov r8d, edx
mov rdi, rcx
jne 0x140027e04
test edx, edx
jle 0x1400281e1
mov eax, 0x10624dd3
xor r9d, r9d
mul r8d
xor ecx, ecx
shr edx, 6
imul eax, edx, 0x3e8
mov dword [r11 + 8], edx
xor edx, edx
sub r8d, eax
imul eax, r8d, 0x3e8
xor r8d, r8d
mov dword [r11 + 0xc], eax
lea rax, [r11 + 8]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
add rsp, 0x470
pop rdi
ret
mov qword [rsp + 0x488], rbx
mov qword [rsp + 0x490], rbp
mov qword [rsp + 0x498], rsi
mov qword [rsp + 0x468], r12
mov qword [rsp + 0x460], r13
mov qword [rsp + 0x458], r14
mov qword [rsp + 0x450], r15
test r8d, r8d
je 0x140027ee0
mov eax, 0x10624dd3
mov dword [rsp + 0x240], 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 + 0x480], edx
xor edx, edx
mov dword [rsp + 0x30], edx
sub ecx, eax
imul eax, ecx, 0x3e8
mov rcx, qword [rdi + 0x50]
mov qword [rsp + 0x248], rcx
mov dword [rsp + 0x484], eax
mov rax, qword [rdi + 0x28]
cmp rax, qword [rdi + 0x20]
je 0x140027eaa
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x30], 1
test r8d, r8d
lea rax, [rsp + 0x480]
lea r8, [rsp + 0x30]
cmovle rax, rdx
inc ecx
xor r9d, r9d
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x240]
call qword [sym.imp.WS2_32.dll_select]
nop word [rax + rax]
mov ebp, dword [rdi + 0x10]
sub ebp, dword [rdi + 8]
mov r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
sub rcx, rdx
lea eax, [rbp + 0x5dc]
movsxd rsi, eax
cmp rsi, rcx
jae 0x140027f08
lea rax, [rsi + rdx]
jmp 0x140027f38
jbe 0x140027f3c
mov rax, qword [rdi + 0x18]
sub rax, rdx
cmp rsi, rax
jbe 0x140027f24
mov rdx, rsi
lea rcx, [rdi + 8]
call fcn.14001eff0
jmp 0x140027f3c
sub rsi, rcx
xor edx, edx
mov r8, rsi
mov rcx, r14
call fcn.140076ff0
lea rax, [r14 + rsi]
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 r13, str.Connection_error__n
mov r14d, eax
lea r12, str.Connection_closed__n
test eax, eax
jns 0x140027f88
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x140027ff8
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x140027ff8
mov rdx, qword [rdi + 8]
test r14d, r14d
jle 0x140028055
lea eax, [r14 + rbp]
mov r14, qword [rdi + 0x10]
mov rcx, r14
movsxd rsi, eax
sub rcx, rdx
cmp rsi, rcx
jae 0x140027fb8
lea rax, [rsi + rdx]
mov qword [rdi + 0x10], rax
jmp 0x140027ee0
jbe 0x140027ee0
mov rax, qword [rdi + 0x18]
sub rax, rdx
cmp rsi, rax
jbe 0x140027fdb
mov rdx, rsi
lea rcx, [rdi + 8]
call fcn.14001eff0
jmp 0x140027ee0
sub rsi, rcx
xor edx, edx
mov r8, rsi
mov rcx, r14
call fcn.140076ff0
lea rax, [r14 + rsi]
mov qword [rdi + 0x10], rax
jmp 0x140027ee0
mov r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
sub rcx, rdx
cmp rsi, rcx
jae 0x140028018
lea rax, [rsi + rdx]
mov qword [rdi + 0x10], rax
jmp 0x1400280cb
jbe 0x1400280cb
mov rax, qword [rdi + 0x18]
sub rax, rdx
cmp rsi, rax
jbe 0x14002803b
mov rdx, rsi
lea rcx, [rdi + 8]
call fcn.14001eff0
jmp 0x1400280cb
sub rsi, rcx
xor edx, edx
mov r8, rsi
mov rcx, r14
call fcn.140076ff0
lea rax, [r14 + rsi]
mov qword [rdi + 0x10], rax
jmp 0x1400280cb
mov r15, qword [rdi + 0x10]
mov rcx, r15
sub rcx, rdx
cmp rsi, rcx
jae 0x14002806a
lea rax, [rsi + rdx]
jmp 0x14002809a
jbe 0x14002809e
mov rax, qword [rdi + 0x18]
sub rax, rdx
cmp rsi, rax
jbe 0x140028086
mov rdx, rsi
lea rcx, [rdi + 8]
call fcn.14001eff0
jmp 0x14002809e
sub rsi, rcx
xor edx, edx
mov r8, rsi
mov rcx, r15
call fcn.140076ff0
lea rax, [r15 + 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.14005ec28
test r14d, r14d
mov rcx, r12
mov rdx, rax
cmovs rcx, r13
call fcn.14005ed74
mov rdx, qword [rdi + 0x28]
mov r8, qword [rdi + 0x20]
mov r15, qword [rsp + 0x450]
mov r14, qword [rsp + 0x458]
mov rbp, qword [rsp + 0x490]
cmp rdx, r8
je 0x1400281a0
mov rcx, r8
nop word [rax + rax]
sub edx, r8d
xor r9d, r9d
mov r8d, edx
mov rdx, rcx
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.WS2_32.dll_send]
movsxd rbx, eax
test eax, eax
jns 0x140028137
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x1400281a0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x1400281a0
test ebx, ebx
jle 0x140028174
mov rsi, qword [rdi + 0x20]
lea rdx, [rsi + rbx]
cmp rsi, rdx
je 0x140028162
mov rbx, qword [rdi + 0x28]
mov rcx, rsi
sub rbx, rdx
mov r8, rbx
call fcn.140076950
lea rax, [rbx + rsi]
mov qword [rdi + 0x28], rax
mov rdx, qword [rdi + 0x28]
mov rcx, qword [rdi + 0x20]
cmp rdx, rcx
je 0x1400281a0
mov r8d, ecx
jmp 0x140028100
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov ecx, 2
mov dword [rdi + 0x58], 1
call fcn.14005ec28
test ebx, ebx
mov rdx, rax
cmovs r12, r13
mov rcx, r12
call fcn.14005ed74
mov rax, qword [rdi + 0x28]
mov r13, qword [rsp + 0x460]
mov r12, qword [rsp + 0x468]
mov rsi, qword [rsp + 0x498]
mov rbx, qword [rsp + 0x488]
cmp rax, qword [rdi + 0x20]
jne 0x1400281e1
cmp dword [rdi + 0x58], 0
jne 0x1400281e1
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [rdi + 0x58], 1
add rsp, 0x470
pop rdi
ret