Function at 0x1400221e0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push rbp
push rbx
push rsi
push r12
push r14
push r15
lea rbp, [rsp - 0x208]
sub rsp, 0x308
mov r12, qword [rcx]
movsxd r15, r8d
lea r9, [rbp + 0x240]
lea r8, [rsp + 0x60]
xor r14d, r14d
mov rsi, rcx
mov dword [rbp + 0x250], r14d
mov qword [rcx + r15*8 + 0x4d0], 0xffffffffffffffff
call fcn.140022000
mov ebx, eax
test eax, eax
jne 0x1400223f3
movzx ecx, word [rsp + 0x70]
mov qword [rsp + 0x348], rdi
cmp ecx, 2
je 0x140022255
cmp ecx, 0x17
jne 0x14002254b
lea rdx, [rsp + 0x78]
jmp 0x14002225a
lea rdx, [rsp + 0x74]
lea r8, [rsp + 0x30]
mov r9d, reloc.WLDAP32.dll_Ordinal_46
call fcn.14004f3e0
test rax, rax
je 0x14002254b
movzx ecx, word [rsp + 0x72]
call qword [sym.imp.WS2_32.dll_ntohs]
lea r8, [rsp + 0x30]
lea rdx, str.__Trying__s:_ld..._n
mov rcx, r12
movzx r9d, ax
mov qword [rsp + 0x300], r13
call fcn.140018f20
mov eax, dword [rsp + 0x60]
mov rdi, qword [rbp + 0x240]
cmp eax, 2
je 0x1400222b7
cmp eax, 0x17
jne 0x140022404
cmp dword [rsp + 0x64], 1
jne 0x140022404
mov r13d, 1
cmp dword [r12 + 0x1044], r14d
je 0x140022332
mov r14, qword [rsi]
lea r9, [rbp + 0x240]
lea edx, [r13 + 5]
mov r8d, r13d
mov rcx, rdi
mov dword [rbp + 0x240], r13d
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x14002232b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rbp + 0x100]
mov r8d, 0x100
mov ecx, eax
call fcn.1400076f0
lea rdx, str.Could_not_set_TCP_NODELAY:__s_n
mov rcx, r14
mov r8, rax
call fcn.140018f20
mov r14d, dword [rbp + 0x250]
mov rcx, rdi
call fcn.140021d70
test r13d, r13d
je 0x140022355
cmp dword [r12 + 0x1068], 0
je 0x140022355
mov rdx, rdi
mov rcx, r12
call fcn.140020df0
cmp qword [r12 + 0x730], 0
je 0x14002239a
mov edx, 1
mov rcx, r12
call fcn.140016590
mov rcx, qword [r12 + 0x738]
xor r8d, r8d
mov rdx, rdi
call qword [r12 + 0x730]
xor edx, edx
mov rcx, r12
mov r13d, eax
call fcn.140016590
cmp r13d, 2
jne 0x14002240c
lea r14d, [r13 - 1]
mov eax, dword [rsp + 0x60]
cmp eax, 2
je 0x1400223a8
cmp eax, 0x17
jne 0x140022423
lea rcx, [rsp + 0x70]
call fcn.14004efc0
mov r8d, dword [rsp + 0x60]
mov rdx, rdi
mov r9d, eax
mov rcx, rsi
call fcn.140021020
mov ebx, eax
test eax, eax
je 0x140022423
mov rdx, rdi
mov rcx, rsi
call fcn.140021f60
mov eax, 7
cmp ebx, 1
cmove ebx, eax
mov eax, ebx
mov r13, qword [rsp + 0x300]
mov rdi, qword [rsp + 0x348]
add rsp, 0x308
pop r15
pop r14
pop r12
pop rsi
pop rbx
pop rbp
ret
xor r13d, r13d
jmp 0x140022332
test r13d, r13d
je 0x14002239a
mov rdx, rdi
mov rcx, rsi
call fcn.140021f60
mov eax, Ordinal_46
jmp 0x1400223e3
mov edx, 1
mov rcx, rdi
call fcn.14004b860
lea rcx, [rbp - 0x10]
call fcn.140025250
cmp dword [rsi + 0x730], 1
mov rcx, qword [rax]
mov qword [rsi + 0x720], rcx
mov rax, qword [rax + 8]
mov qword [rsi + 0x728], rax
jle 0x140022481
mov rdx, qword [rsi + 0x738]
mov r8d, 3
mov rcx, r12
call fcn.140016250
mov rdx, qword [rsi + 0x740]
mov r8d, 4
mov rcx, r12
call fcn.140016250
test r14d, r14d
jne 0x14002253c
cmp dword [rsi + 0x32c], 4
je 0x14002253c
cmp dword [rsi + 0x6f8], r14d
jne 0x1400224cd
mov r8d, dword [rsp + 0x6c]
lea rdx, [rsp + 0x70]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1400224cd
test ebx, ebx
jne 0x1400223e1
mov qword [rsi + r15*8 + 0x4d0], rdi
jmp 0x1400223e1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0xb
je 0x14002252d
cmp eax, 0x2732
jle 0x1400224e8
cmp eax, 0x2734
jle 0x14002252d
lea rdx, [rbp]
mov r8d, 0x100
mov ecx, eax
call fcn.1400076f0
lea r8, [rsp + 0x30]
lea rdx, str.Immediate_connect_fail_for__s:__s_n
mov r9, rax
mov rcx, r12
call fcn.140018f20
mov rdx, rdi
mov rcx, rsi
mov dword [r12 + 0x1378], ebx
call fcn.140021f60
mov ebx, 7
jmp 0x1400223e1
xor ebx, ebx
mov qword [rsi + r15*8 + 0x4d0], rdi
jmp 0x1400223e1
mov qword [rsi + r15*8 + 0x4d0], rdi
xor eax, eax
jmp 0x1400223e3
mov byte [rsp + 0x30], r14b
call sub.MSVCR120.dll__errno
mov dword [rax], 0x273f
call sub.MSVCR120.dll__errno
mov rbx, rax
call sub.MSVCR120.dll__errno
mov ecx, dword [rbx]
lea rdx, [rbp]
mov r8d, 0x100
mov rdi, rax
call fcn.1400076f0
mov r8d, dword [rdi]
lea rdx, str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, r12
call fcn.140019080
mov rdx, qword [rbp + 0x240]
mov rcx, rsi
call fcn.140021f60
xor eax, eax
jmp 0x1400223eb