Function at 0x4596c0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x450
mov ebp, r9d
mov r14, r8
mov rsi, rdx
mov rdi, rcx
mov dword [rsp + 0x40], 1
mov rbx, qword [rcx]
lea r8, [rsp + 0x40]
mov rcx, rbx
mov edx, 0x8004667e
call sub.WS2_32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x45971f
cmp word [rsi], 0
je 0x459733
mov eax, dword [rsi + 4]
movzx ecx, word [rsi + 0xc]
rol cx, 8
mov edx, dword [rsi + 8]
movups xmm0, xmmword [rsi + 0xe]
mov r8d, 0x1c
mov si, 0x17
jmp 0x459756
call sub.WS2_32.dll_WSAGetLastError
mov edi, eax
shl rdi, 0x20
or rdi, 2
jmp 0x459923
mov ecx, dword [rsi + 2]
movzx eax, word [rsi + 6]
shl rax, 0x20
or rax, rcx
rol cx, 8
shr rax, 0x10
xorps xmm0, xmm0
mov r8d, 0x10
mov si, 2
mov word [rsp + 0x40], si
mov word [rsp + 0x42], cx
mov dword [rsp + 0x44], eax
movups xmmword [rsp + 0x48], xmm0
mov dword [rsp + 0x58], edx
lea rdx, [rsp + 0x40]
mov rcx, rbx
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
je 0x459783
xor esi, esi
jmp 0x459792
call sub.WS2_32.dll_WSAGetLastError
mov esi, eax
shl rsi, 0x20
or rsi, 2
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x40], 0
lea r8, [rsp + 0x40]
mov rcx, rbx
mov edx, 0x8004667e
call sub.WS2_32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x4598c7
test rsi, rsi
je 0x4597e3
mov eax, esi
and eax, 3
lea rcx, [0x004599d8]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
mov al, byte [rsi + 0x10]
cmp al, 0xd
je 0x459811
mov rdi, rsi
jmp 0x459923
xor edi, edi
jmp 0x459923
mov al, byte [rsi + 0xf]
cmp al, 0xd
jne 0x4597db
jmp 0x459811
test r14, r14
jne 0x459826
test ebp, ebp
jne 0x459826
lea rdi, str.cannot_set_a_0_duration_timeout
jmp 0x4598d6
mov eax, ebp
imul rax, rax, 0x10624dd3
shr rax, 0x26
cmp ebp, 0x3e8
mov ecx, 1
mov edx, eax
cmovb edx, ecx
mov dword [rsp + 0x28], r14d
test r14d, r14d
cmovne edx, eax
mov dword [rsp + 0x2c], edx
mov qword [rsp + 0x248], 1
mov qword [rsp + 0x250], rbx
lea rcx, [rsp + 0x258]
mov r8d, 0x1f8
xor edx, edx
call sub.msvcrt.dll_memset
mov qword [rsp + 0x40], 1
mov qword [rsp + 0x48], rbx
lea rcx, [rsp + 0x50]
mov r8d, 0x1f8
xor edx, edx
call sub.msvcrt.dll_memset
lea rax, [rsp + 0x28]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x248]
lea r9, [rsp + 0x40]
mov ecx, 1
xor edx, edx
call sub.WS2_32.dll_select
test eax, eax
je 0x459934
cmp eax, 0xffffffff
jne 0x45993d
call sub.WS2_32.dll_WSAGetLastError
mov edi, eax
shl rdi, 0x20
or rdi, 2
test rsi, rsi
je 0x459923
mov eax, esi
and eax, 3
cmp eax, 1
jne 0x459923
lea rbx, [rsi - 1]
lea rbp, [rsi + 7]
mov rcx, qword [rsi - 1]
mov rax, qword [rsi + 7]
call qword [rax]
mov rax, qword [rbp]
mov rdx, qword [rax + 8]
test rdx, rdx
je 0x459910
mov r8, qword [rax + 0x10]
mov rcx, qword [rbx]
call fcn.0040a2d0
mov edx, 0x18
mov r8d, 8
mov rcx, rbx
call fcn.0040a2d0
mov rax, rdi
add rsp, 0x450
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
ret
lea rdi, str.connection_timed_out
jmp 0x459949
cmp dword [rsp + 0x248], 1
jne 0x459967
xor edi, edi
mov eax, esi
and eax, 3
cmp eax, 1
jne 0x459923
lea rbx, [rsi - 1]
lea rbp, [rsi + 7]
mov rcx, qword [rsi - 1]
mov rax, qword [rsi + 7]
call qword [rax]
jmp 0x4598f7
mov rcx, rdi
call fcn.00446160
mov rdi, rdx
test rax, rax
jne 0x4598d6
mov qword [rsp + 0x38], rdi
test rdi, rdi
jne 0x4598d6
lea rcx, [rsp + 0x38]
call fcn.0041a2f0
jmp 0x459947