Function at 0x1400bcd10
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x40]
sub rsp, 0x140
mov rax, qword [0x140198190]
xor rax, rsp
mov qword [rbp + 0x30], rax
mov r14, qword [rcx]
xor r15b, r15b
mov qword [r8], 0xffffffffffffffff
mov r13, r8
mov eax, dword [rdx + 4]
mov rdi, rcx
mov rbx, qword [rcx]
mov dword [rsp + 0x70], eax
mov eax, dword [rcx + 0xa4]
cmp eax, 2
mov dword [rsp + 0x74], eax
mov eax, reloc.WS2_32.dll_recvfrom
je 0x1400bcd69
mov eax, dword [rdx + 0xc]
mov dword [rsp + 0x78], eax
mov eax, dword [rdx + 0x10]
mov dword [rsp + 0x7c], eax
cmp eax, 0x80
jbe 0x1400bcd88
mov dword [rsp + 0x7c], 0x80
mov eax, 0x80
mov rdx, qword [rdx + 0x20]
lea rcx, [rbp - 0x80]
mov r8d, eax
call fcn.140111970
mov rax, qword [rbx + 0x278]
test rax, rax
je 0x1400bcdb6
mov rcx, qword [rbx + 0x280]
lea r8, [rsp + 0x70]
xor edx, edx
call rax
jmp 0x1400bcdc9
mov r8d, dword [rsp + 0x78]
mov edx, dword [rsp + 0x74]
mov ecx, dword [rsp + 0x70]
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1400bd351
mov ecx, dword [rdi + 0xa0]
test ecx, ecx
je 0x1400bcdee
mov eax, dword [rbp - 0x68]
cmp dword [rsp + 0x70], 0x17
cmove eax, ecx
mov dword [rbp - 0x68], eax
movzx eax, word [rbp - 0x80]
xor ebx, ebx
cmp eax, 2
je 0x1400bce0a
cmp eax, 0x17
jne 0x1400bd2f3
lea rdx, [rbp - 0x78]
mov ecx, eax
jmp 0x1400bce13
lea rdx, [rbp - 0x7c]
mov ecx, 2
mov r9d, reloc.WLDAP32.dll_Ordinal_46
lea r8, [rbp]
call fcn.1400c9510
test rax, rax
je 0x1400bd2f3
movzx ecx, word [rbp - 0x7e]
call qword [sym.imp.WS2_32.dll_ntohs]
lea r8, [rbp]
mov qword [rsp + 0x198], r12
lea rdx, str.__Trying__s..._n
mov rcx, r14
call fcn.1400bad30
mov eax, dword [rsp + 0x70]
cmp eax, 2
je 0x1400bce5e
cmp eax, 0x17
jne 0x1400bceda
cmp dword [rsp + 0x74], 1
jne 0x1400bceda
mov r12b, 1
cmp byte [r14 + 0x46e], bl
je 0x1400bcedd
mov r15, qword [rdi]
lea r9, [rsp + 0x54]
mov edx, 6
mov dword [rsp + 0x54], 1
mov rcx, rsi
mov dword [rsp + 0x20], 4
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1400bcec6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.1400aa5a0
mov r8, rax
lea rdx, str.Could_not_set_TCP_NODELAY:__s_n
mov rcx, r15
call fcn.1400bad30
xor r15b, r15b
jmp 0x1400bcedd
lea rdx, str.TCP_NODELAY_set_n
mov rcx, r15
call fcn.1400bad30
xor r15b, r15b
jmp 0x1400bcedd
xor r12b, r12b
mov eax, dword [0x14019c908]
mov dword [rsp + 0x54], 0x4020
mov dword [rsp + 0x50], ebx
mov dword [rsp + 0x58], 4
test eax, eax
jne 0x1400bcf29
xor edx, edx
lea ecx, [rax + 6]
lea r9d, [rax + 3]
lea r8d, [rax + 2]
call fcn.1400c8de0
test al, al
je 0x1400bcf1d
mov dword [0x14019c908], 2
jmp 0x1400bcf80
mov dword [0x14019c908], 1
jmp 0x1400bcf2e
cmp eax, 2
je 0x1400bcf80
lea rax, [rsp + 0x58]
mov edx, 0xffff
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r8d, 0x1001
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x1400bcf5f
mov eax, dword [rsp + 0x54]
cmp dword [rsp + 0x50], eax
jg 0x1400bcf80
lea r9, [rsp + 0x54]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
test r12b, r12b
mov r12, qword [rsp + 0x198]
je 0x1400bd073
cmp byte [r14 + 0x63c], bl
je 0x1400bd073
lea r9, [rsp + 0x50]
mov dword [rsp + 0x50], 1
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 8
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1400bcfe2
mov r8, rsi
lea rdx, str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
mov rcx, r14
call fcn.1400bad30
jmp 0x1400bd073
mov ecx, dword [r14 + 0x640]
mov dword [rsp + 0x60], 1
call fcn.1400c77c0
imul ecx, eax, 0x3e8
mov dword [rsp + 0x50], ecx
mov dword [rsp + 0x64], ecx
mov ecx, dword [r14 + 0x644]
call fcn.1400c77c0
imul ecx, eax, 0x3e8
lea r8, [rsp + 0x60]
mov qword [rsp + 0x40], rbx
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rbx
mov r9d, ntohl
mov qword [rsp + 0x30], rax
mov edx, 0x98000004
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x50], ecx
mov dword [rsp + 0x68], ecx
mov rcx, rsi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x1400bd073
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, esi
lea rdx, str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
mov r9d, eax
mov rcx, r14
call fcn.1400bad30
mov rax, qword [r14 + 0x268]
test rax, rax
je 0x1400bd09a
mov rcx, qword [r14 + 0x270]
xor r8d, r8d
mov rdx, rsi
call rax
cmp eax, 2
jne 0x1400bd120
mov r15b, 1
mov eax, dword [rsp + 0x70]
cmp eax, 2
je 0x1400bd0ac
cmp eax, 0x17
jne 0x1400bd1a9
lea rcx, [rbp - 0x80]
call fcn.1400df900
mov r8d, dword [rsp + 0x70]
mov r9d, eax
mov rdx, rsi
mov rcx, rdi
call fcn.1400bc730
mov ebx, eax
test eax, eax
je 0x1400bd1a9
cmp qword [rdi + 0x38], 0
je 0x1400bd0fa
cmp rsi, qword [rdi + 0x1d8]
jne 0x1400bd182
cmp byte [rdi + 0x1f1], 0
je 0x1400bd182
mov byte [rdi + 0x1f1], 0
mov rdx, rsi
mov rcx, rdi
call fcn.1400ab180
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 7
cmp ebx, 1
cmove ebx, eax
mov eax, ebx
jmp 0x1400bd353
test eax, eax
je 0x1400bd09a
cmp qword [rdi + 0x38], rbx
je 0x1400bd145
cmp rsi, qword [rdi + 0x1d8]
jne 0x1400bd163
cmp byte [rdi + 0x1f1], bl
je 0x1400bd163
mov byte [rdi + 0x1f1], bl
mov rdx, rsi
mov rcx, rdi
call fcn.1400ab180
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, Ordinal_46
jmp 0x1400bd353
mov rdx, rsi
mov rcx, rdi
call fcn.1400ab180
mov rcx, qword [rdi + 0x40]
mov rdx, rsi
call qword [rdi + gethostname]
mov eax, Ordinal_46
jmp 0x1400bd353
mov rdx, rsi
mov rcx, rdi
call fcn.1400ab180
mov rcx, qword [rdi + 0x40]
mov rdx, rsi
call qword [rdi + gethostname]
mov eax, 7
cmp ebx, 1
cmove ebx, eax
mov eax, ebx
jmp 0x1400bd353
mov edx, 1
mov rcx, rsi
call fcn.1400df970
call fcn.1400afd10
cmp dword [rdi + 0x3e0], 1
mov qword [rdi + 0x3d8], rax
jle 0x1400bd1d9
mov edx, dword [rdi + 0x3e4]
mov rcx, r14
call fcn.1400ab0b0
test r15b, r15b
jne 0x1400bd2ed
cmp dword [rdi + 0xa4], 1
jne 0x1400bd2ed
cmp byte [rdi + 0x3d4], r15b
jne 0x1400bd230
mov r8d, dword [rsp + 0x7c]
lea rdx, [rbp - 0x80]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1400bd230
cmp dword [rsp + 0x70], 0x17
sete al
mov byte [rdi + 0x3c2], al
test ebx, ebx
jne 0x1400bd2e9
mov qword [r13], rsi
mov eax, ebx
jmp 0x1400bd353
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp dword [rsp + 0x70], 0x17
mov ebx, eax
sete cl
mov byte [rdi + 0x3c2], cl
cmp eax, 0xb
je 0x1400bd2e3
lea ecx, [rax - 0x2733]
cmp ecx, 1
jbe 0x1400bd2e3
mov edx, eax
mov rcx, rdi
call fcn.1400aa5a0
mov r9, rax
lea r8, [rbp]
lea rdx, str.Immediate_connect_fail_for__s:__s_n
mov rcx, r14
call fcn.1400bad30
mov dword [r14 + 0x8864], ebx
cmp qword [rdi + 0x38], 0
je 0x1400bd2a5
cmp rsi, qword [rdi + 0x1d8]
jne 0x1400bd2c5
cmp byte [rdi + 0x1f1], 0
je 0x1400bd2c5
mov byte [rdi + 0x1f1], 0
mov rdx, rsi
mov rcx, rdi
call fcn.1400ab180
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov ebx, 7
mov eax, ebx
jmp 0x1400bd353
mov rdx, rsi
mov rcx, rdi
call fcn.1400ab180
mov rcx, qword [rdi + 0x40]
mov rdx, rsi
call qword [rdi + gethostname]
mov ebx, 7
mov eax, ebx
jmp 0x1400bd353
xor ebx, ebx
mov qword [r13], rsi
mov eax, ebx
jmp 0x1400bd353
mov qword [r13], rsi
jmp 0x1400bd351
mov byte [rbp], bl
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rdi
mov ebx, eax
call fcn.1400aa5a0
mov r9, rax
lea rdx, str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov r8d, ebx
mov rcx, r14
call fcn.1400bac60
cmp qword [rdi + 0x38], 0
je 0x1400bd33d
cmp rsi, qword [rdi + 0x1d8]
jne 0x1400bd371
cmp byte [rdi + 0x1f1], r15b
je 0x1400bd371
mov byte [rdi + 0x1f1], r15b
mov rdx, rsi
mov rcx, rdi
call fcn.1400ab180
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
mov rcx, qword [rbp + 0x30]
xor rcx, rsp
call fcn.14010f620
add rsp, 0x140
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov rdx, rsi
mov rcx, rdi
call fcn.1400ab180
mov rcx, qword [rdi + 0x40]
mov rdx, rsi
call qword [rdi + gethostname]
jmp 0x1400bd351