Function at 0x140002410
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x1c0]
sub rsp, 0x2c0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x1b0], rax
cmp byte [rcx], 0x5b
mov rdi, rcx
mov qword [rsp + 0x40], 0
jne 0x140002497
mov edx, 0x5d
inc rcx
call fcn.14001c370
mov rbx, rax
test rax, rax
je 0x1400024c8
sub rbx, rdi
dec rbx
cmp rbx, 0x100
jae 0x1400024c8
mov r8, rbx
lea rdx, [rdi + 1]
lea rcx, [rbp + 0xb0]
call fcn.14001c410
mov byte [rbp + rbx + 0xb0], 0
lea rdi, [rbp + 0xb0]
lea rdx, [rbp - 0x60]
mov r8d, 4
lea rcx, [0x140042624]
nop dword [rax + rax]
movzx eax, byte [rcx]
inc rcx
mov byte [rdx], al
lea rdx, [rdx + 1]
test al, al
je 0x1400024ed
sub r8, 1
jne 0x1400024b0
jmp 0x1400024f2
call fcn.14002439c
lea rdx, str.bad_hostname_address
lea rcx, [0x140042620]
mov dword [rax], socket
call fcn.140004ba0
xor eax, eax
jmp 0x1400028a8
test r8, r8
jne 0x140002500
mov byte [rdx], 0
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
test al, al
jne 0x1400024f5
xor eax, eax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov eax, dword [0x140050380]
mov dword [rsp + 0x54], eax
mov rax, qword [0x140051408]
mov dword [rsp + 0x5c], setsockopt
mov dword [rsp + 0x58], 2
mov dword [rsp + 0x50], 4
test rax, rax
jne 0x14000255c
xor ecx, ecx
call fcn.140001c50
mov qword [0x140051408], rax
lea r9, [rsp + 0x40]
mov rcx, rdi
lea r8, [rsp + 0x50]
lea rdx, [rbp - 0x60]
call rax
mov ecx, eax
mov ebx, eax
call qword [sym.imp.WS2_32.dll_WSASetLastError]
cmp ebx, 0x2af9
jne 0x1400025c0
mov rax, qword [0x140051408]
mov dword [rsp + 0x50], 0x402
test rax, rax
jne 0x1400025a3
xor ecx, ecx
call fcn.140001c50
mov qword [0x140051408], rax
lea r9, [rsp + 0x40]
mov rcx, rdi
lea r8, [rsp + 0x50]
lea rdx, [rbp - 0x60]
call rax
mov ecx, eax
mov ebx, eax
call qword [sym.imp.WS2_32.dll_WSASetLastError]
cmp ebx, 0x2afc
je 0x1400025d8
cmp ebx, 0x2af9
je 0x1400025d8
cmp ebx, 0x2726
jne 0x140002617
mov rax, qword [0x140051408]
mov dword [rsp + 0x50], 2
test rax, rax
jne 0x1400025fa
xor ecx, ecx
call fcn.140001c50
mov qword [0x140051408], rax
lea r9, [rsp + 0x40]
mov rcx, rdi
lea r8, [rsp + 0x50]
lea rdx, [rbp - 0x60]
call rax
mov ecx, eax
mov ebx, eax
call qword [sym.imp.WS2_32.dll_WSASetLastError]
test ebx, ebx
je 0x14000269f
mov qword [rsp + 0x30], 0
lea rdi, [0x140051d60]
mov dword [rsp + 0x28], 0x400
mov r9d, 0x400
mov r8d, ebx
mov qword [rsp + 0x20], rdi
xor edx, edx
mov ecx, 0x12ff
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, 2
call fcn.14001df44
mov rcx, rax
lea rdx, [0x140042628]
mov r8, rdi
call fcn.140001040
mov rbx, qword [rsp + 0x40]
test rbx, rbx
je 0x140002698
mov rax, qword [0x140051400]
test rax, rax
jne 0x140002693
lea ecx, [rax + 2]
call fcn.140001c50
mov qword [0x140051400], rax
mov rcx, rbx
call rax
xor eax, eax
jmp 0x1400028a8
mov rbx, qword [rsp + 0x40]
test rbx, rbx
je 0x1400028d0
mov r8, qword [rbx + 0x10]
lea rcx, [rbp - 0x80]
mov rdx, qword [rbx + 0x20]
xor eax, eax
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
mov dword [rbp - 0x68], eax
mov eax, 0x1c
cmp r8, rax
cmova r8, rax
call fcn.14001c410
mov rcx, qword [rbx + 0x18]
test rcx, rcx
jne 0x14000272d
lea rcx, [rbp - 0x80]
lea rbx, [rbp - 0x50]
call fcn.1400175a0
mov edi, 0xff
mov rdx, rax
mov eax, edi
nop dword [rax + rax]
movzx ecx, byte [rdx]
inc rdx
mov byte [rbx], cl
lea rbx, [rbx + 1]
test cl, cl
je 0x140002718
sub rax, 1
jne 0x140002700
jmp 0x14000271d
test rax, rax
jne 0x14000276b
mov byte [rbx], 0
movzx eax, byte [rdx]
lea rdx, [rdx + 1]
test al, al
jne 0x140002720
jmp 0x14000276b
mov edi, 0xff
lea rdx, [rbp - 0x50]
mov r8d, edi
nop dword [rax]
movzx eax, byte [rcx]
inc rcx
mov byte [rdx], al
lea rdx, [rdx + 1]
test al, al
je 0x140002758
sub r8, 1
jne 0x140002740
jmp 0x14000275d
test r8, r8
jne 0x14000276b
mov byte [rdx], 0
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
test al, al
jne 0x140002760
mov eax, dword [0x140051ca4]
cmp eax, 2
jle 0x14000278c
lea rdx, [rbp - 0x50]
lea rcx, str.Opening_host__s_n
call fcn.140001090
mov eax, dword [0x140051ca4]
cmp dword [0x140050368], 1
lea rbx, [0x140050a90]
jne 0x1400027c7
cmp eax, 2
jle 0x1400027b0
mov rdx, rbx
lea rcx, str.Closing_old_host__s_n
call fcn.140001090
mov rcx, qword [0x140050b98]
call qword [sym.imp.WS2_32.dll_closesocket]
mov dword [0x140050368], 0
lea rcx, [rbp - 0x50]
nop dword [rax + rax]
movzx eax, byte [rcx]
inc rcx
mov byte [rbx], al
lea rbx, [rbx + 1]
test al, al
je 0x1400027e8
sub rdi, 1
jne 0x1400027d0
jmp 0x1400027ed
test rdi, rdi
jne 0x1400027fb
mov byte [rbx], 0
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
test al, al
jne 0x1400027f0
movzx eax, word [rbp - 0x7e]
lea r9, [rsp + 0x48]
mov edx, 0xffff
mov dword [0x140050360], eax
mov r8d, 0x7008
mov dword [rsp + 0x48], 0x20
or rcx, 0xffffffffffffffff
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x1400028f4
lea edx, [rax + 2]
xor r8d, r8d
mov rax, qword [rsp + 0x40]
mov ecx, dword [rax + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [0x140050b98], rax
cmp rax, 0xffffffffffffffff
je 0x140002918
mov rdx, qword [rsp + 0x40]
mov rcx, rax
mov r8d, dword [rdx + 0x10]
mov rdx, qword [rdx + 0x20]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x140002925
mov rcx, qword [rsp + 0x40]
call fcn.140001e50
mov eax, 1
mov dword [0x140050368], 1
mov dword [0x14004cbe8], 0xc0
mov dword [reloc.WS2_32.dll_closesocket], 3
mov rcx, qword [rbp + 0x1b0]
xor rcx, rsp
call fcn.14001b620
lea r11, [rsp + 0x2c0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
lea r9, str.ai_____void__0_
mov edx, 0x1eb
mov r8d, 2
lea rcx, str........._ntpdc_ntpdc.c
call fcn.140017420
call fcn.14001dc90
int3
mov ecx, 2
call fcn.14001df44
mov rcx, rax
lea rdx, str.cannot_open_nonoverlapped_sockets_n
call fcn.140001040
mov ecx, 1
call fcn.14001d7a0
int3
lea rcx, str.socket
call fcn.140004bd0
int3
lea rcx, str.connect
call fcn.140004bd0
int3