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

Disassembly:
mov r11, rsp
push rsi
sub rsp, 0x470
cmp dword [rcx + 0x58], 1
mov r8d, edx
mov rsi, rcx
jne 0x140084b84
test edx, edx
jle 0x140084f63
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 rsi
ret
mov qword [rsp + 0x488], rbx
mov qword [rsp + 0x490], rbp
mov qword [rsp + 0x498], rdi
mov qword [rsp + 0x468], r12
mov qword [rsp + 0x460], r13
mov qword [rsp + 0x458], r14
test r8d, r8d
je 0x140084c50
mov ecx, r8d
mov dword [rsp + 0x240], 1
xor r9d, r9d
mov eax, 0x10624dd3
imul r8d
mov dword [rsp + 0x30], r9d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x3e8
mov dword [rsp + 0x480], edx
mov rdx, qword [rsi + 0x28]
sub ecx, eax
imul eax, ecx, 0x3e8
mov rcx, qword [rsi + 0x50]
mov qword [rsp + 0x248], rcx
mov dword [rsp + 0x484], eax
sub rdx, qword [rsi + 0x20]
je 0x140084c24
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x30], 1
test r8d, r8d
lea rax, [rsp + 0x480]
lea r8, [rsp + 0x30]
cmovle rax, r9
lea rdx, [rsp + 0x240]
inc ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
nop dword [rax]
mov ebp, dword [rsi + 0x10]
sub ebp, dword [rsi + 8]
mov r14, qword [rsi + 0x10]
mov rdx, qword [rsi + 8]
mov rcx, r14
sub rcx, rdx
lea eax, [rbp + 0x5dc]
movsxd rdi, eax
cmp rdi, rcx
jae 0x140084c78
lea rax, [rdi + rdx]
jmp 0x140084ca8
jbe 0x140084cac
mov rax, qword [rsi + 0x18]
sub rax, rdx
cmp rdi, rax
jbe 0x140084c94
mov rdx, rdi
lea rcx, [rsi + 8]
call fcn.1400869e0
jmp 0x140084cac
sub rdi, rcx
xor edx, edx
mov r8, rdi
mov rcx, r14
call fcn.1400f52b0
lea rax, [r14 + rdi]
mov qword [rsi + 0x10], rax
mov rcx, qword [rsi + 0x50]
xor r9d, r9d
movsxd rdx, ebp
mov r8d, 0x5dc
add rdx, qword [rsi + 8]
call qword [sym.imp.WS2_32.dll_recv]
lea r13, str.Connection_error__n
mov edi, eax
lea r12, str.Connection_closed__n
test eax, eax
jns 0x140084cf4
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x140084d62
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x140084d62
mov rdx, qword [rsi + 8]
test edi, edi
jle 0x140084dc5
mov r14, qword [rsi + 0x10]
lea eax, [rdi + rbp]
mov rcx, r14
movsxd rdi, eax
sub rcx, rdx
cmp rdi, rcx
jae 0x140084d22
lea rax, [rdi + rdx]
mov qword [rsi + 0x10], rax
jmp 0x140084c50
jbe 0x140084c50
mov rax, qword [rsi + 0x18]
sub rax, rdx
cmp rdi, rax
jbe 0x140084d45
mov rdx, rdi
lea rcx, [rsi + 8]
call fcn.1400869e0
jmp 0x140084c50
sub rdi, rcx
xor edx, edx
mov r8, rdi
mov rcx, r14
call fcn.1400f52b0
lea rax, [r14 + rdi]
mov qword [rsi + 0x10], rax
jmp 0x140084c50
mov r14, qword [rsi + 0x10]
mov rdx, qword [rsi + 8]
mov rcx, r14
sub rcx, rdx
movsxd rdi, ebp
cmp rdi, rcx
jae 0x140084d85
lea rax, [rdi + rdx]
mov qword [rsi + 0x10], rax
jmp 0x140084e4d
jbe 0x140084e4d
mov rax, qword [rsi + 0x18]
sub rax, rdx
cmp rdi, rax
jbe 0x140084da8
mov rdx, rdi
lea rcx, [rsi + 8]
call fcn.1400869e0
jmp 0x140084e4d
sub rdi, rcx
xor edx, edx
mov r8, rdi
mov rcx, r14
call fcn.1400f52b0
lea rax, [r14 + rdi]
mov qword [rsi + 0x10], rax
jmp 0x140084e4d
mov qword [rsp + 0x450], r15
mov r15, qword [rsi + 0x10]
mov rcx, r15
movsxd r14, ebp
sub rcx, rdx
cmp r14, rcx
jae 0x140084de5
lea rax, [r14 + rdx]
jmp 0x140084e15
jbe 0x140084e19
mov rax, qword [rsi + 0x18]
sub rax, rdx
cmp r14, rax
jbe 0x140084e01
mov rdx, r14
lea rcx, [rsi + 8]
call fcn.1400869e0
jmp 0x140084e19
sub r14, rcx
xor edx, edx
mov r8, r14
mov rcx, r15
call fcn.1400f52b0
lea rax, [r15 + r14]
mov qword [rsi + 0x10], rax
mov rcx, qword [rsi + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov ecx, 2
mov dword [rsi + 0x58], 1
call fcn.1400fa208
test edi, edi
mov rcx, r12
mov rdx, rax
cmovs rcx, r13
call fcn.140107db0
mov r15, qword [rsp + 0x450]
mov rdx, qword [rsi + 0x28]
mov r8, qword [rsi + 0x20]
mov r14, qword [rsp + 0x458]
mov rbp, qword [rsp + 0x490]
cmp rdx, r8
je 0x140084f22
mov rcx, r8
nop dword [rax]
nop word [rax + rax]
sub edx, r8d
xor r9d, r9d
mov r8d, edx
mov rdx, rcx
mov rcx, qword [rsi + 0x50]
call qword [sym.imp.WS2_32.dll_send]
movsxd rbx, eax
test eax, eax
jns 0x140084eb7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x140084f22
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x140084f22
test ebx, ebx
jle 0x140084ef6
mov rdi, qword [rsi + 0x20]
lea rdx, [rdi + rbx]
cmp rdi, rdx
je 0x140084ee2
mov rbx, qword [rsi + 0x28]
mov rcx, rdi
sub rbx, rdx
mov r8, rbx
call fcn.1400f4c00
lea rax, [rbx + rdi]
mov qword [rsi + 0x28], rax
mov rax, qword [rsi + 0x28]
mov rcx, qword [rsi + 0x20]
mov edx, eax
mov r8d, ecx
cmp rax, rcx
jne 0x140084e80
jmp 0x140084f22
mov rcx, qword [rsi + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov ecx, 2
mov dword [rsi + 0x58], 1
call fcn.1400fa208
test ebx, ebx
mov rdx, rax
cmovs r12, r13
mov rcx, r12
call fcn.140107db0
mov rax, qword [rsi + 0x28]
mov r13, qword [rsp + 0x460]
mov r12, qword [rsp + 0x468]
mov rdi, qword [rsp + 0x498]
mov rbx, qword [rsp + 0x488]
cmp rax, qword [rsi + 0x20]
jne 0x140084f63
cmp dword [rsi + 0x58], 0
jne 0x140084f63
mov rcx, qword [rsi + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [rsi + 0x58], 1
add rsp, 0x470
pop rsi
ret