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

Disassembly:
push rsi
sub rsp, 0x490
mov rax, qword [0x1403c6030]
xor rax, rsp
mov qword [rsp + 0x460], rax
cmp dword [rcx + 0x58], 1
mov r8d, edx
mov rsi, rcx
jne 0x1400152e1
test edx, edx
jle 0x140015650
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 0x140015650
mov qword [rsp + 0x4b0], rbx
mov qword [rsp + 0x488], rbp
mov qword [rsp + 0x480], rdi
mov qword [rsp + 0x478], r14
mov qword [rsp + 0x470], r15
test r8d, r8d
je 0x140015399
mov ecx, r8d
mov dword [rsp + 0x250], 1
xor r9d, r9d
mov eax, 0x10624dd3
imul r8d
mov dword [rsp + 0x40], r9d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x3e8
mov dword [rsp + 0x30], edx
mov rdx, qword [rsi + 0x28]
sub ecx, eax
imul eax, ecx, 0x3e8
mov rcx, qword [rsi + 0x50]
mov qword [rsp + 0x258], rcx
mov dword [rsp + 0x34], eax
sub rdx, qword [rsi + 0x20]
je 0x140015373
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x40], 1
test r8d, r8d
lea rax, [rsp + 0x30]
lea r8, [rsp + 0x40]
cmovle rax, r9
lea rdx, [rsp + 0x250]
inc ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
mov r15, rsi
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 0x1400153c8
lea rax, [rdi + rdx]
jmp 0x1400153f8
jbe 0x1400153fc
mov rax, qword [rsi + 0x18]
sub rax, rdx
cmp rdi, rax
jbe 0x1400153e4
mov rdx, rdi
lea rcx, [rsi + 8]
call fcn.1402b5bb0
jmp 0x1400153fc
sub rdi, rcx
xor edx, edx
mov r8, rdi
mov rcx, r14
call sub.VCRUNTIME140.dll_memset
lea rax, [rdi + r14]
mov qword [rsi + 0x10], rax
mov rdx, qword [rsi + 8]
xor r9d, r9d
mov rcx, qword [r15 + 0x50]
mov r8d, 0x5dc
movsxd rdi, ebp
add rdx, rdi
call qword [sym.imp.WS2_32.dll_recv]
mov r14d, eax
test eax, eax
jns 0x14001543a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x1400154aa
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x1400154aa
mov rdx, qword [rsi + 8]
test r14d, r14d
jle 0x140015504
lea eax, [r14 + rbp]
mov rbp, qword [rsi + 0x10]
mov rcx, rbp
movsxd rdi, eax
sub rcx, rdx
cmp rdi, rcx
jae 0x14001546a
lea rax, [rdi + rdx]
mov qword [rsi + 0x10], rax
jmp 0x1400153a0
jbe 0x1400153a0
mov rax, qword [rsi + 0x18]
sub rax, rdx
cmp rdi, rax
jbe 0x14001548d
mov rdx, rdi
lea rcx, [rsi + 8]
call fcn.1402b5bb0
jmp 0x1400153a0
sub rdi, rcx
xor edx, edx
mov r8, rdi
mov rcx, rbp
call sub.VCRUNTIME140.dll_memset
lea rax, [rdi + rbp]
mov qword [rsi + 0x10], rax
jmp 0x1400153a0
mov rbp, qword [rsi + 0x10]
mov rdx, qword [rsi + 8]
mov rcx, rbp
sub rcx, rdx
cmp rdi, rcx
jae 0x1400154ca
lea rax, [rdi + rdx]
mov qword [rsi + 0x10], rax
jmp 0x14001555e
jbe 0x14001555e
mov rax, qword [rsi + 0x18]
sub rax, rdx
cmp rdi, rax
jbe 0x1400154ea
mov rdx, rdi
lea rcx, [rsi + 8]
call fcn.1402b5bb0
jmp 0x14001555e
sub rdi, rcx
xor edx, edx
mov r8, rdi
mov rcx, rbp
call sub.VCRUNTIME140.dll_memset
lea rax, [rdi + rbp]
mov qword [rsi + 0x10], rax
jmp 0x14001555e
mov rbp, qword [rsi + 0x10]
mov rcx, rbp
sub rcx, rdx
cmp rdi, rcx
jae 0x140015519
lea rax, [rdi + rdx]
jmp 0x140015549
jbe 0x14001554d
mov rax, qword [rsi + 0x18]
sub rax, rdx
cmp rdi, rax
jbe 0x140015535
mov rdx, rdi
lea rcx, [rsi + 8]
call fcn.1402b5bb0
jmp 0x14001554d
sub rdi, rcx
xor edx, edx
mov r8, rdi
mov rcx, rbp
call sub.VCRUNTIME140.dll_memset
lea rax, [rdi + rbp]
mov qword [rsi + 0x10], rax
mov rcx, qword [r15 + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [rsi + 0x58], 1
mov rdx, qword [rsi + 0x28]
mov r8, qword [rsi + 0x20]
mov r14, qword [rsp + 0x478]
mov rbp, qword [rsp + 0x488]
cmp rdx, r8
je 0x140015617
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 [r15 + 0x50]
call qword [sym.imp.WS2_32.dll_send]
movsxd rbx, eax
test eax, eax
jns 0x1400155c7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x140015617
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x140015617
test ebx, ebx
jle 0x140015606
mov rdi, qword [rsi + 0x20]
lea rdx, [rdi + rbx]
cmp rdi, rdx
je 0x1400155f2
mov rbx, qword [rsi + 0x28]
mov rcx, rdi
sub rbx, rdx
mov r8, rbx
call sub.VCRUNTIME140.dll_memmove
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 0x140015590
jmp 0x140015617
mov rcx, qword [r15 + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [rsi + 0x58], 1
mov rax, qword [rsi + 0x28]
mov rdi, qword [rsp + 0x480]
mov rbx, qword [rsp + 0x4b0]
cmp rax, qword [rsi + 0x20]
jne 0x140015648
cmp dword [rsi + 0x58], 0
jne 0x140015648
mov rcx, qword [r15 + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [rsi + 0x58], 1
mov r15, qword [rsp + 0x470]
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.1402d0d40
add rsp, 0x490
pop rsi
ret