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

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x580]
sub rsp, 0x680
mov rax, qword [0x140025010]
xor rax, rsp
mov qword [rbp + 0x570], rax
mov rdi, rdx
mov dword [rsp + 0x30], 1
mov rbx, r8
mov rsi, 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 0x140002a17
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x140002a0a
mov rax, qword [rsi + 8]
lea rcx, [rbp + 0x150]
mov esi, 4
mov qword [rsp + 0x48], rdi
mov dword [rsp + 0x40], 1
mov edx, esi
mov r8, qword [rax]
lea rax, [rsp + 0x40]
lea r9d, [rsi + 0x7c]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rcx], xmm0
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rcx + 0x10], xmm1
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rcx + 0x20], xmm0
movups xmm0, xmmword [rax + 0x40]
movups xmmword [rcx + 0x30], xmm1
movups xmm1, xmmword [rax + 0x50]
movups xmmword [rcx + 0x40], xmm0
movups xmm0, xmmword [rax + 0x60]
movups xmmword [rcx + 0x50], xmm1
movups xmm1, xmmword [rax + 0x70]
add rax, r9
movups xmmword [rcx + 0x60], xmm0
add rcx, r9
movups xmmword [rcx - 0x10], xmm1
sub rdx, 1
jne 0x1400028b9
mov rax, qword [rax]
mov rdx, rsi
mov qword [rcx], rax
lea rcx, [rbp + 0x360]
lea rax, [rsp + 0x40]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rcx], xmm0
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rcx + 0x10], xmm1
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rcx + 0x20], xmm0
movups xmm0, xmmword [rax + 0x40]
movups xmmword [rcx + 0x30], xmm1
movups xmm1, xmmword [rax + 0x50]
movups xmmword [rcx + 0x40], xmm0
movups xmm0, xmmword [rax + 0x60]
movups xmmword [rcx + 0x50], xmm1
movups xmm1, xmmword [rax + 0x70]
add rax, r9
movups xmmword [rcx + 0x60], xmm0
add rcx, r9
movups xmmword [rcx - 0x10], xmm1
sub rdx, 1
jne 0x140002918
mov rax, qword [rax]
and dword [rsp + 0x3c], edx
mov qword [rcx], rax
mov dword [rsp + 0x38], r8d
lea rax, [rsp + 0x38]
lea ecx, [rdi + 1]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x360]
lea r8, [rbp + 0x150]
lea rdx, [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_select]
movsxd rbx, eax
test eax, eax
jns 0x1400029a8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], esi
je 0x140002971
test rbx, rbx
jle 0x140002a0a
lea rdx, [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x1400029d3
lea rdx, [rbp + 0x150]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x140002a0a
and dword [rsp + 0x30], 0
lea rax, [rsp + 0x34]
lea r9, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov dword [rsp + 0x34], esi
mov r8d, 0x1007
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
js 0x140002a0a
cmp dword [rsp + 0x30], 0
je 0x140002a17
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
xor al, al
jmp 0x140002a31
and dword [rsp + 0x34], 0
lea r8, [rsp + 0x34]
mov edx, 0x8004667e
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov al, 1
mov rcx, qword [rbp + 0x570]
xor rcx, rsp
call fcn.140019400
mov rbx, qword [rsp + 0x6a0]
add rsp, 0x680
pop rdi
pop rsi
pop rbp
ret