Function at 0x14009b040
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 0x14009b0a4
test edx, edx
jle 0x14009b481
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 0x14009b180
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 0x14009b14a
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 0x14009b1a8
lea rax, [rsi + rdx]
jmp 0x14009b1d8
jbe 0x14009b1dc
mov rax, qword [rdi + 0x18]
sub rax, rdx
cmp rsi, rax
jbe 0x14009b1c4
mov rdx, rsi
lea rcx, [rdi + 8]
call fcn.14009cfe0
jmp 0x14009b1dc
sub rsi, rcx
xor edx, edx
mov r8, rsi
mov rcx, r14
call fcn.14013b860
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 0x14009b228
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x14009b298
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x14009b298
mov rdx, qword [rdi + 8]
test r14d, r14d
jle 0x14009b2f5
lea eax, [r14 + rbp]
mov r14, qword [rdi + 0x10]
mov rcx, r14
movsxd rsi, eax
sub rcx, rdx
cmp rsi, rcx
jae 0x14009b258
lea rax, [rsi + rdx]
mov qword [rdi + 0x10], rax
jmp 0x14009b180
jbe 0x14009b180
mov rax, qword [rdi + 0x18]
sub rax, rdx
cmp rsi, rax
jbe 0x14009b27b
mov rdx, rsi
lea rcx, [rdi + 8]
call fcn.14009cfe0
jmp 0x14009b180
sub rsi, rcx
xor edx, edx
mov r8, rsi
mov rcx, r14
call fcn.14013b860
lea rax, [r14 + rsi]
mov qword [rdi + 0x10], rax
jmp 0x14009b180
mov r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
sub rcx, rdx
cmp rsi, rcx
jae 0x14009b2b8
lea rax, [rsi + rdx]
mov qword [rdi + 0x10], rax
jmp 0x14009b36b
jbe 0x14009b36b
mov rax, qword [rdi + 0x18]
sub rax, rdx
cmp rsi, rax
jbe 0x14009b2db
mov rdx, rsi
lea rcx, [rdi + 8]
call fcn.14009cfe0
jmp 0x14009b36b
sub rsi, rcx
xor edx, edx
mov r8, rsi
mov rcx, r14
call fcn.14013b860
lea rax, [r14 + rsi]
mov qword [rdi + 0x10], rax
jmp 0x14009b36b
mov r15, qword [rdi + 0x10]
mov rcx, r15
sub rcx, rdx
cmp rsi, rcx
jae 0x14009b30a
lea rax, [rsi + rdx]
jmp 0x14009b33a
jbe 0x14009b33e
mov rax, qword [rdi + 0x18]
sub rax, rdx
cmp rsi, rax
jbe 0x14009b326
mov rdx, rsi
lea rcx, [rdi + 8]
call fcn.14009cfe0
jmp 0x14009b33e
sub rsi, rcx
xor edx, edx
mov r8, rsi
mov rcx, r15
call fcn.14013b860
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.14010ffa4
test r14d, r14d
mov rcx, r12
mov rdx, rax
cmovs rcx, r13
call fcn.1401207b4
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 0x14009b440
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 0x14009b3d7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x14009b440
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x14009b440
test ebx, ebx
jle 0x14009b414
mov rsi, qword [rdi + 0x20]
lea rdx, [rsi + rbx]
cmp rsi, rdx
je 0x14009b402
mov rbx, qword [rdi + 0x28]
mov rcx, rsi
sub rbx, rdx
mov r8, rbx
call fcn.14013b1c0
lea rax, [rbx + rsi]
mov qword [rdi + 0x28], rax
mov rdx, qword [rdi + 0x28]
mov rcx, qword [rdi + 0x20]
cmp rdx, rcx
je 0x14009b440
mov r8d, ecx
jmp 0x14009b3a0
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov ecx, 2
mov dword [rdi + 0x58], 1
call fcn.14010ffa4
test ebx, ebx
mov rdx, rax
cmovs r12, r13
mov rcx, r12
call fcn.1401207b4
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 0x14009b481
cmp dword [rdi + 0x58], 0
jne 0x14009b481
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [rdi + 0x58], 1
add rsp, 0x470
pop rdi
ret