Function at 0x140004720
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push rbp
push rbx
push rdi
push r14
lea rbp, [rsp - 0x598]
sub rsp, 0x698
mov rax, qword [0x140064100]
xor rax, rsp
mov qword [rbp + 0x580], rax
mov rdi, rdx
mov dword [rsp + 0x30], 1
mov rbx, r8
mov r14, rcx
mov rcx, rdi
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r8d, dword [rbx + 0x10]
mov rcx, rdi
mov rdx, qword [rbx + 0x20]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x14000495a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x140004949
mov rax, qword [r14 + 0x10]
lea rcx, [rbp + 0x160]
mov qword [rsp + 0x690], rsi
mov edx, 4
mov qword [rsp + 0x58], rdi
mov dword [rsp + 0x50], 1
mov r8, qword [rax]
mov rax, qword [r14 + 8]
mov r9, qword [rax]
lea rax, [rsp + 0x50]
nop dword [rax + rax]
lea rcx, [rcx + 0x80]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
lea rax, [rax + 0x80]
movups xmmword [rcx - 0x80], xmm0
movups xmm0, xmmword [rax - 0x60]
movups xmmword [rcx - 0x70], xmm1
movups xmm1, xmmword [rax - 0x50]
movups xmmword [rcx - 0x60], xmm0
movups xmm0, xmmword [rax - 0x40]
movups xmmword [rcx - 0x50], xmm1
movups xmm1, xmmword [rax - 0x30]
movups xmmword [rcx - 0x40], xmm0
movups xmm0, xmmword [rax - 0x20]
movups xmmword [rcx - 0x30], xmm1
movups xmm1, xmmword [rax - 0x10]
movups xmmword [rcx - 0x20], xmm0
movups xmmword [rcx - 0x10], xmm1
sub rdx, 1
jne 0x1400047d0
mov rax, qword [rax]
mov edx, 4
mov qword [rcx], rax
lea rcx, [rbp + 0x370]
lea rax, [rsp + 0x50]
nop word [rax + rax]
lea rcx, [rcx + 0x80]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
lea rax, [rax + 0x80]
movups xmmword [rcx - 0x80], xmm0
movups xmm0, xmmword [rax - 0x60]
movups xmmword [rcx - 0x70], xmm1
movups xmm1, xmmword [rax - 0x50]
movups xmmword [rcx - 0x60], xmm0
movups xmm0, xmmword [rax - 0x40]
movups xmmword [rcx - 0x50], xmm1
movups xmm1, xmmword [rax - 0x30]
movups xmmword [rcx - 0x40], xmm0
movups xmm0, xmmword [rax - 0x20]
movups xmmword [rcx - 0x30], xmm1
movups xmm1, xmmword [rax - 0x10]
movups xmmword [rcx - 0x20], xmm0
movups xmmword [rcx - 0x10], xmm1
sub rdx, 1
jne 0x140004840
mov rax, qword [rax]
mov qword [rcx], rax
mov dword [rsp + 0x38], r9d
mov dword [rsp + 0x3c], r8d
lea rax, [rsp + 0x38]
lea r9, [rbp + 0x370]
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x160]
lea rdx, [rsp + 0x50]
lea ecx, [rdi + 1]
call qword [sym.imp.WS2_32.dll_select]
mov ebx, eax
test eax, eax
jns 0x1400048d9
call fcn.140030510
cmp dword [rax], 4
je 0x1400048a3
mov rsi, qword [rsp + 0x690]
test ebx, ebx
jle 0x140004949
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x14000490b
lea rdx, [rbp + 0x160]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x140004949
lea rax, [rsp + 0x40]
mov dword [rsp + 0x30], 0
lea r9, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov dword [rsp + 0x40], 4
mov r8d, 0x1007
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
js 0x140004949
cmp dword [rsp + 0x30], 0
je 0x14000495a
mov rax, qword [r14 + 0x18]
mov dword [rax], 2
xor al, al
jmp 0x1400049eb
lea r8, [rsp + 0x40]
mov dword [rsp + 0x40], 0
mov edx, 0x8004667e
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov rax, qword [r14 + 0x20]
lea r9, [rsp + 0x38]
mov edx, 0xffff
mov dword [rsp + 0x20], 8
mov r8d, 0x1006
mov ecx, dword [rax]
mov rax, qword [r14 + 0x28]
mov dword [rsp + 0x38], ecx
mov ecx, dword [rax]
mov dword [rsp + 0x3c], ecx
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, qword [r14 + 0x30]
lea r9, [rsp + 0x38]
mov edx, 0xffff
mov dword [rsp + 0x20], 8
mov r8d, 0x1005
mov ecx, dword [rax]
mov rax, qword [r14 + 0x38]
mov dword [rsp + 0x38], ecx
mov ecx, dword [rax]
mov dword [rsp + 0x3c], ecx
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, qword [r14 + 0x18]
mov dword [rax], 0
mov al, 1
mov rcx, qword [rbp + 0x580]
xor rcx, rsp
call fcn.140027f90
add rsp, 0x698
pop r14
pop rdi
pop rbx
pop rbp
ret