Function at 0x1400f4d70
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x17]
sub rsp, 0x100
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov rax, qword [0x14026be10]
xor rax, rsp
mov qword [rbp + 7], rax
mov r12d, r9d
mov r15, r8
mov r14, rdx
mov rdi, rcx
mov rsi, qword [rbp + 0x77]
mov rbx, qword [rbp + 0x7f]
cmp dword [rcx + 8], 0x4901fb2a
je 0x1400f4dc2
xor al, al
jmp 0x1400f5090
xor eax, eax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
movzx r9d, byte [rbx + 0xa9]
lea r8, str.connect
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.1400712c0
nop
mov rcx, qword [rdi + 0xb0]
cmp rcx, 0xffffffffffffffff
jne 0x1400f4e19
mov dword [rsi + 0x2c], 5
mov rax, qword [rbx]
lea rdx, str.Cannot_connect__invalid_socket
mov rcx, rbx
call qword [rax + 0x28]
jmp 0x1400f5081
mov r14d, dword [r14 + 0xf1c]
mov eax, 0x1499700
test r14d, r14d
cmove r14d, eax
mov dword [rsp + 0x38], 1
lea r8, [rsp + 0x38]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
call sub.KERNEL32.dll_GetTickCount
mov r8d, r12d
mov rdx, r15
mov rcx, qword [rdi + 0xb0]
call qword [sym.imp.WS2_32.dll_connect]
cmp dword [rdi + 8], 0x4901fb2a
jne 0x1400f5081
xor r15d, r15d
test eax, eax
je 0x1400f4fa6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x1400f4f8d
cmp byte [rbx + 0xa9], r15b
je 0x1400f4e9e
mov rax, qword [rbx]
lea rdx, str.Waiting_for_the_connect_to_complete...
mov rcx, rbx
call qword [rax + 0x30]
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rsi
mov r9b, 1
xor r8d, r8d
mov edx, r14d
mov rcx, rdi
call fcn.1400f9150
cmp dword [rdi + 8], 0x4901fb2a
jne 0x1400f5081
test al, al
je 0x1400f4f59
mov dword [rsp + 0x38], r15d
mov dword [rsp + 0x3c], 4
lea rax, [rsp + 0x3c]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x38]
mov edx, 0xffff
mov r8d, 0x1007
mov rcx, qword [rdi + 0xb0]
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x1400f4f3b
cmp dword [rsp + 0x38], r15d
je 0x1400f4fa6
mov rax, qword [rbx]
lea rdx, str.getsockopt_indicates_an_error.
mov rcx, rbx
call qword [rax + 0x28]
mov r8, rbx
xor edx, edx
mov ecx, dword [rsp + 0x38]
call fcn.1400f73b0
mov dword [rsi + 0x2c], 7
jmp 0x1400f5079
mov rax, qword [rbx]
lea rdx, str.Failed_to_get_SO_ERROR_on_socket.
mov rcx, rbx
call qword [rax + 0x28]
cmp dword [rdi + 8], 0x4901fb2a
je 0x1400f4fb3
jmp 0x1400f5081
cmp byte [rsi + 0x19], r15b
je 0x1400f4f68
mov dword [rsi + 0x2c], 4
jmp 0x1400f4f76
movzx eax, byte [rsi + 0x18]
neg al
sbb edx, edx
add edx, 7
mov dword [rsi + 0x2c], edx
mov r8, rbx
lea rdx, str.failedWaitToConnect
mov rcx, rsi
call fcn.1400aec10
jmp 0x1400f5079
mov dword [rsi + 0x2c], 7
mov r8, rbx
mov rdx, rsi
mov ecx, eax
call fcn.1400f73b0
jmp 0x1400f5079
cmp dword [rdi + 8], 0x4901fb2a
jne 0x1400f5081
mov byte [rdi + 0xa8], 1
mov byte [rdi + 0xaa], r15b
cmp byte [rbx + 0xa9], r15b
je 0x1400f5044
xor edx, edx
mov r8d, 0x90
lea rcx, [rsp + 0x60]
call fcn.14016c710
lea rcx, [rsp + 0x60]
call fcn.14002b840
nop
mov dword [rsp + 0x38], r15d
mov r9, rbx
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x60]
mov rcx, rdi
cmp dword [rdi + 0xb8], 2
jne 0x1400f500c
call fcn.1400f3dc0
jmp 0x1400f5011
call fcn.1400f3ed0
lea r8, [rsp + 0x60]
lea rdx, str.myIP
mov rcx, rbx
call fcn.140071b70
mov r8d, dword [rsp + 0x38]
lea rdx, str.myPort
mov rcx, rbx
call fcn.1400717d0
nop
lea rcx, [rsp + 0x60]
call fcn.14002b890
lea rcx, [rdi + 0x18]
mov rdx, rbx
call fcn.140121d50
lea rcx, [rdi + 0x60]
mov rdx, rbx
call fcn.140121d50
cmp byte [rbx + 0xa9], 0
je 0x1400f5075
mov rax, qword [rbx]
lea rdx, str.socket_connect_successful.
mov rcx, rbx
call qword [rax + 0x30]
mov bl, 1
jmp 0x1400f5083
mov rcx, rdi
call fcn.1400f5f10
xor bl, bl
lea rcx, [rsp + 0x40]
call fcn.140071380
movzx eax, bl
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.140168e10
add rsp, 0x100
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret