Function at 0x1801358f0
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 [0x180594240]
xor rax, rsp
mov qword [rsp + 0x460], rax
cmp dword [rcx + 0x58], 1
mov r8d, edx
mov rdi, rcx
jne 0x180135961
test edx, edx
jle 0x180135d32
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 0x180135d32
mov qword [rsp + 0x4c0], rbx
mov qword [rsp + 0x498], rbp
mov qword [rsp + 0x488], r12
mov qword [rsp + 0x480], r13
mov qword [rsp + 0x478], r14
mov qword [rsp + 0x470], r15
test r8d, r8d
je 0x180135a22
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 0x1801359f9
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]
mov qword [rsp + 0x490], rsi
nop word [rax + rax]
mov ebp, dword [rdi + 0x10]
sub ebp, dword [rdi + 8]
mov r8, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
lea eax, [rbp + 0x5dc]
movsxd rcx, eax
mov rax, r8
sub rax, rdx
cmp rcx, rax
jae 0x180135a5c
lea rax, [rdx + rcx]
mov qword [rdi + 0x10], rax
jmp 0x180135a8b
jbe 0x180135a8b
mov rax, qword [rdi + 0x18]
sub rax, rdx
cmp rcx, rax
jbe 0x180135a78
mov rdx, rcx
lea rcx, [rdi + 8]
call fcn.180137850
jmp 0x180135a8b
lea rbx, [rdx + rcx]
mov rcx, r8
mov rdx, rbx
call fcn.18010bf90
mov qword [rdi + 0x10], rbx
mov rdx, qword [rdi + 8]
xor r9d, r9d
mov rcx, qword [rdi + 0x50]
mov r8d, 0x5dc
movsxd rbx, ebp
add rdx, rbx
call qword [sym.imp.WS2_32.dll_recv]
lea r12, str.Connection_closed__n
mov r15d, eax
test eax, eax
jns 0x180135ad0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x180135b3b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x180135b3b
mov r8, qword [rdi + 0x10]
test r15d, r15d
jle 0x180135c4d
mov rdx, qword [rdi + 8]
lea eax, [r15 + rbp]
movsxd rcx, eax
mov rax, r8
sub rax, rdx
cmp rcx, rax
jae 0x180135b00
lea rax, [rdx + rcx]
mov qword [rdi + 0x10], rax
jmp 0x180135a30
jbe 0x180135a30
mov rax, qword [rdi + 0x18]
sub rax, rdx
cmp rcx, rax
jbe 0x180135b23
mov rdx, rcx
lea rcx, [rdi + 8]
call fcn.180137850
jmp 0x180135a30
lea rbx, [rdx + rcx]
mov rcx, r8
mov rdx, rbx
call fcn.18010bf90
mov qword [rdi + 0x10], rbx
jmp 0x180135a30
mov r8, qword [rdi + 0x10]
mov rcx, qword [rdi + 8]
mov rax, r8
sub rax, rcx
cmp rbx, rax
jae 0x180135c13
lea rax, [rbx + rcx]
mov qword [rdi + 0x10], rax
lea rsi, str.Connection_error__n
mov r8, qword [rdi + 0x28]
mov rdx, qword [rdi + 0x20]
mov r15, qword [rsp + 0x470]
mov r14, qword [rsp + 0x478]
mov r13, qword [rsp + 0x480]
mov rbp, qword [rsp + 0x498]
cmp r8, rdx
je 0x180135cf9
mov rcx, rdx
nop word [rax + rax]
sub r8d, edx
xor r9d, r9d
mov rdx, rcx
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.WS2_32.dll_send]
movsxd rbx, eax
test eax, eax
jns 0x180135bdc
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x180135cf9
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x180135cf9
test ebx, ebx
jle 0x180135ccd
mov r8, qword [rdi + 0x20]
lea rcx, [r8 + rbx]
cmp r8, rcx
je 0x180135bfe
mov rdx, qword [rdi + 0x28]
call fcn.18010bf60
mov qword [rdi + 0x28], rax
mov r8, qword [rdi + 0x28]
mov rcx, qword [rdi + 0x20]
cmp r8, rcx
je 0x180135cf9
mov edx, ecx
jmp 0x180135ba0
jbe 0x180135b5a
mov rax, qword [rdi + 0x18]
sub rax, rcx
cmp rbx, rax
jbe 0x180135c36
mov rdx, rbx
lea rcx, [rdi + 8]
call fcn.180137850
jmp 0x180135b5a
add rbx, rcx
mov rcx, r8
mov rdx, rbx
call fcn.18010bf90
mov qword [rdi + 0x10], rbx
jmp 0x180135b5a
mov rcx, qword [rdi + 8]
mov rax, r8
sub rax, rcx
cmp rbx, rax
jae 0x180135c66
lea rax, [rbx + rcx]
mov qword [rdi + 0x10], rax
jmp 0x180135c94
jbe 0x180135c94
mov rax, qword [rdi + 0x18]
sub rax, rcx
cmp rbx, rax
jbe 0x180135c82
mov rdx, rbx
lea rcx, [rdi + 8]
call fcn.180137850
jmp 0x180135c94
add rbx, rcx
mov rcx, r8
mov rdx, rbx
call fcn.18010bf90
mov qword [rdi + 0x10], rbx
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov ecx, 2
mov dword [rdi + 0x58], 1
call fcn.18040f100
test r15d, r15d
lea rsi, str.Connection_error__n
mov rcx, r12
mov rdx, rax
cmovs rcx, rsi
call fcn.18040f294
jmp 0x180135b61
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov ecx, 2
mov dword [rdi + 0x58], 1
call fcn.18040f100
test ebx, ebx
mov rdx, rax
cmovs r12, rsi
mov rcx, r12
call fcn.18040f294
mov rax, qword [rdi + 0x28]
mov r12, qword [rsp + 0x488]
mov rsi, qword [rsp + 0x490]
mov rbx, qword [rsp + 0x4c0]
cmp rax, qword [rdi + 0x20]
jne 0x180135d32
cmp dword [rdi + 0x58], 0
jne 0x180135d32
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.1803fd0a0
add rsp, 0x4a0
pop rdi
ret