Function at 0x502460
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x450
movaps xmmword [rsp + 0x440], xmm6
mov ebp, r9d
mov r14, r8
mov rdi, rdx
mov rsi, rcx
mov dword [rsp + 0x30], 1
mov rbx, qword [rcx]
lea r8, [rsp + 0x30]
mov rcx, rbx
mov edx, 0x8004667e
call sub.ws2_32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x5024fc
cmp word [rdi], 0
je 0x502510
movups xmm0, xmmword [rdi + 4]
movups xmm1, xmmword [rdi + 0x10]
movups xmmword [rsp + 0x3c], xmm1
movaps xmmword [rsp + 0x30], xmm0
lea r12, [rsp + 0x30]
mov rcx, r12
call fcn.00551bc0
mov edi, eax
rol di, 8
mov rcx, r12
call fcn.00551ba0
movups xmm6, xmmword [rax]
mov rcx, r12
call fcn.00551be0
mov r15d, eax
mov rcx, r12
call fcn.00551c00
mov r8d, 0x1c
mov cx, 0x17
jmp 0x50254b
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
shl rsi, 0x20
or rsi, 2
jmp 0x50277f
mov eax, dword [rdi + 2]
movzx ecx, word [rdi + 6]
mov word [rsp + 0x34], cx
mov dword [rsp + 0x30], eax
lea r15, [rsp + 0x30]
mov rcx, r15
call fcn.00551b60
mov edi, eax
rol di, 8
mov rcx, r15
call fcn.00551b40
mov r15d, dword [rax]
xorps xmm6, xmm6
mov r8d, 0x10
mov cx, 2
mov word [rsp + 0x30], cx
mov word [rsp + 0x32], di
mov dword [rsp + 0x34], r15d
movups xmmword [rsp + 0x38], xmm6
mov dword [rsp + 0x48], eax
lea rdx, [rsp + 0x30]
mov rcx, rbx
call sub.ws2_32.dll_connect
cmp eax, 0xffffffff
je 0x502579
xor edi, edi
jmp 0x502588
call sub.ws2_32.dll_WSAGetLastError
mov edi, eax
shl rdi, 0x20
or rdi, 2
mov dword [rsp + 0x30], 0
lea r8, [rsp + 0x30]
mov rcx, rbx
mov edx, 0x8004667e
call sub.ws2_32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x5025d0
test rdi, rdi
je 0x5025eb
mov r15d, edi
and r15d, 3
lea rax, [0x005027c8]
movsxd rcx, dword [rax + r15*4]
add rcx, rax
jmp rcx
lea rax, [rdi + 0x10]
movzx eax, byte [rax]
cmp al, 0xd
jne 0x50260f
jmp 0x502623
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
shl rsi, 0x20
or rsi, 2
mov r15d, edi
and r15d, 3
jmp 0x502737
xor esi, esi
jmp 0x50277f
lea rax, [rdi + 0xf]
movzx eax, byte [rax]
cmp al, 0xd
jne 0x50260f
jmp 0x502623
mov rsi, rdi
jmp 0x50277f
test r14, r14
jne 0x502638
test ebp, ebp
jne 0x502638
lea rsi, str.cannot_set_a_0_duration_timeout
jmp 0x502737
mov eax, ebp
imul rax, rax, 0x10624dd3
shr rax, 0x26
mov dword [rsp + 0x28], r14d
cmp ebp, 0x3e8
mov ecx, 1
mov edx, eax
cmovb edx, ecx
test r14d, r14d
cmovne edx, eax
mov dword [rsp + 0x2c], edx
lea rcx, [rsp + 0x40]
mov r8d, 0x1f8
xor edx, edx
call sub.msvcrt.dll_memset
mov qword [rsp + 0x238], 1
mov qword [rsp + 0x240], rbx
lea rcx, [rsp + 0x248]
mov r8d, 0x1f8
xor edx, edx
call sub.msvcrt.dll_memset
mov qword [rsp + 0x30], 1
mov qword [rsp + 0x38], rbx
lea rax, [rsp + 0x28]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x238]
lea r9, [rsp + 0x30]
mov ecx, 1
xor edx, edx
call sub.ws2_32.dll_select
test eax, eax
je 0x5026ea
cmp eax, 0xffffffff
jne 0x5026fc
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
shl rsi, 0x20
or rsi, 2
jmp 0x502737
lea rsi, str.connection_timed_out
cmp r15d, 1
je 0x50270e
jmp 0x50277f
cmp dword [rsp + 0x238], 1
jne 0x502722
xor esi, esi
cmp r15d, 1
jne 0x50277f
lea rbx, [rdi - 1]
lea r14, [rdi + 7]
mov rcx, qword [rdi - 1]
mov rax, qword [rdi + 7]
call qword [rax]
jmp 0x502754
mov rcx, rsi
call fcn.00503170
mov rsi, rdx
test rax, rax
jne 0x502737
test rsi, rsi
je 0x502706
test rdi, rdi
je 0x50277f
cmp r15d, 1
jne 0x50277f
lea rbx, [rdi - 1]
lea r14, [rdi + 7]
mov rcx, qword [rdi - 1]
mov rax, qword [rdi + 7]
call qword [rax]
mov rax, qword [r14]
mov rdx, qword [rax + 8]
test rdx, rdx
je 0x50276c
mov r8, qword [rax + 0x10]
mov rcx, qword [rbx]
call fcn.00442170
mov edx, 0x18
mov r8d, 8
mov rcx, rbx
call fcn.00442170
mov rax, rsi
movaps xmm6, xmmword [rsp + 0x440]
add rsp, 0x450
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret