Function at 0x180011810
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x4e0
mov qword [rsp + 0x98], 0xfffffffffffffffe
mov rax, qword [0x18006c040]
xor rax, rsp
mov qword [rsp + 0x4d0], rax
mov ebx, r8d
mov dword [rsp + 0x44], ebx
mov r13, rdx
mov r14, rcx
mov qword [rsp + 0x60], rcx
or r15, 0xffffffffffffffff
mov dword [rsp + 0x40], r15d
xor edi, edi
mov qword [rsp + 0x50], rdi
mov dword [rsp + 0x48], 0xfde8
mov dword [rsp + 0x4c], 0xafc8
call fcn.180011bb0
mov byte [rsp + 0xa0], dil
xor eax, eax
mov qword [rsp + 0xa1], rax
mov qword [rsp + 0xa9], rax
mov qword [rsp + 0xb1], rax
mov dword [rsp + 0xb9], eax
mov word [rsp + 0xbd], ax
mov byte [rsp + 0xbf], al
mov r9d, ebx
lea r8, [0x180044e30]
lea edx, [rdi + 0x1f]
lea rcx, [rsp + 0xa0]
call fcn.18000d0c0
xor eax, eax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x90], rax
mov dword [rsp + 0x70], 1
mov dword [rsp + 0x74], 6
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x68]
lea rdx, [rsp + 0xa0]
mov rcx, r13
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x180011948
lea rcx, [r14 + 0x530]
mov r10, qword [rcx]
mov dword [rsp + 0x20], ebx
mov r9, r13
lea r8, str.Unable_to_resolve_address_information_for__s__port__d_
xor edx, edx
call qword [r10 + reloc.WS2_32.dll_recv]
mov eax, r15d
jmp 0x180011b7d
mov qword [rsp + 0x58], r15
xor edx, edx
mov r8d, 0x401
lea rcx, [rsp + 0xc0]
call fcn.18001c6c0
mov rsi, qword [rsp + 0x50]
test rsi, rsi
je 0x180011b23
mov r8d, dword [rsi + 0xc]
mov edx, dword [rsi + 8]
mov ecx, dword [rsi + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov r12, rax
mov qword [rsp + 0x58], rax
cmp rax, 0xffffffffffffffff
jne 0x1800119b9
mov rdi, qword [r14 + 0x530]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, eax
lea r8, str.Error_opening_socket___d_
lea edx, [r12 + 2]
lea rcx, [r14 + 0x530]
call qword [rdi + reloc.WS2_32.dll_recv]
jmp 0x180011aa2
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rdi
mov r9d, 0x401
lea r8, [rsp + 0xc0]
mov edx, dword [rsi + 0x10]
mov rcx, qword [rsi + 0x20]
call qword [sym.imp.WS2_32.dll_getnameinfo]
test eax, eax
je 0x180011a05
lea rcx, [r14 + 0x530]
mov rax, qword [rcx]
mov r9, r13
lea r8, str.Unable_to_get_name_information_for_retrieved_address__host__s
mov edx, 1
call qword [rax + reloc.WS2_32.dll_recv]
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x48]
mov edx, 0xffff
mov r8d, 0x1006
mov rcx, r12
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x4c]
mov edx, 0xffff
mov r8d, 0x1005
mov rcx, r12
call qword [sym.imp.WS2_32.dll_setsockopt]
mov r8d, dword [rsi + 0x10]
mov rdx, qword [rsi + 0x20]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x180011aad
mov rdi, qword [r14 + 0x530]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0x28], eax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
mov r9, r13
lea r8, str.Unable_to_connect_to_host__s_with_address__s__err__d
mov edx, 1
lea rcx, [r14 + 0x530]
call qword [rdi + reloc.WS2_32.dll_recv]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rsp + 0x58], r15
mov rsi, qword [rsi + 0x28]
xor edi, edi
jmp 0x180011967
mov qword [r14 + 0x568], r12
xor ecx, ecx
call fcn.18001eea0
mov qword [r14 + 0x570], rax
lea r8, [0x180043604]
lea rdx, [0x180043604]
mov rcx, r14
call fcn.180010a20
lea rcx, [r14 + 0x530]
mov edx, dword [rsp + 0x44]
mov r9, r13
test eax, eax
je 0x180011b04
mov r10, qword [rcx]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], edx
lea r8, str.Unable_to_connect_to_host__s_on_port__d__bad_logon___d_
xor edx, edx
call qword [r10 + reloc.WS2_32.dll_recv]
jmp 0x180011b44
mov rax, qword [rcx]
mov dword [rsp + 0x20], edx
lea r8, str.Connection_to_host__s_on_port__d_was_successful.
mov edx, 3
call qword [rax + reloc.WS2_32.dll_recv]
mov r15d, edi
mov dword [rsp + 0x40], edi
jmp 0x180011b49
lea rcx, [r14 + 0x530]
mov rax, qword [rcx]
mov edx, dword [rsp + 0x44]
mov dword [rsp + 0x20], edx
mov r9, r13
lea r8, str.Unable_to_connect_to_host__s_on_port__d
xor edx, edx
call qword [rax + reloc.WS2_32.dll_recv]
mov dword [rsp + 0x40], r15d
jmp 0x180011b55
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x180011b65
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
test r15d, r15d
je 0x180011b73
mov rcx, r14
call fcn.180011bb0
nop
jmp 0x180011b7a
mov eax, r15d
mov rcx, qword [rsp + 0x4d0]
xor rcx, rsp
call fcn.18001a230
add rsp, 0x4e0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret