Function at 0x140399c20
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
push rbx
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x288
mov rax, qword [0x14041f010]
xor rax, rsp
mov qword [rsp + 0x270], rax
xor r13d, r13d
mov r15d, r8d
cmp dword [0x14045b9fc], r13d
mov r12d, edx
mov r14, rcx
mov qword [rsp + 0x48], r13
mov ebx, 0xffffffff
jne 0x140399c84
mov ecx, 0x202
lea rdx, [rsp + 0x80]
call qword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
jne 0x140399c84
mov dword [0x14045b9fc], 1
call fcn.14039b520
mov rbp, rax
test rax, rax
jne 0x140399ca6
lea rdx, str.Cannot_allocate_channel.
xor ecx, ecx
call fcn.140151b80
xor eax, eax
jmp 0x140399ed1
xorps xmm0, xmm0
mov qword [rsp + 0x280], rdi
xorps xmm1, xmm1
mov dword [rsp + 0x7c], r13d
lea r9, [rsp + 0x48]
mov dword [rsp + 0x54], r13d
lea r8, [rsp + 0x50]
mov dword [rsp + 0x58], 1
xor edx, edx
mov dword [rsp + 0x50], 0xc00
mov rcx, r14
movdqu xmmword [rsp + 0x5c], xmm0
movdqu xmmword [rsp + 0x6c], xmm1
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov edi, eax
test eax, eax
je 0x140399d5a
lea rdx, str.in_getaddrinfo___in_channel_open__
mov rcx, rbp
call fcn.140151b80
mov qword [rsp + 0x30], r13
lea rbx, [0x140468140]
mov dword [rsp + 0x28], 0x400
mov r9d, 0x400
mov r8d, edi
mov qword [rsp + 0x20], rbx
xor edx, edx
mov ecx, 0x12ff
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
lea rcx, str.E901:_getaddrinfo___in_channel_open__:__s
call qword [case.0x1400407ae.0]
mov rcx, rax
mov rdx, rbx
call fcn.1401860c0
mov rcx, rbp
call fcn.14039a450
xor eax, eax
jmp 0x140399ec9
mov rdi, qword [rsp + 0x48]
test rdi, rdi
je 0x140399e7b
mov qword [rsp + 0x2d8], rsi
mov r13d, recv
nop word [rax + rax]
mov eax, dword [rdi + 4]
mov rsi, r14
cmp eax, 0x17
jne 0x140399d9f
mov rbx, qword [rdi + 0x20]
movzx ecx, r12w
call qword [sym.imp.WSOCK32.dll_htons]
lea rdx, [rbx + 8]
jmp 0x140399db6
cmp eax, 2
jne 0x140399e1c
mov rbx, qword [rdi + 0x20]
movzx ecx, r12w
call qword [sym.imp.WSOCK32.dll_htons]
lea rdx, [rbx + 4]
mov word [rbx + 2], ax
test rdx, rdx
je 0x140399e1c
mov ecx, dword [rdi + 4]
lea r8, [rsp + 0x220]
mov r9d, 0x41
call qword [sym.imp.WS2_32.dll_inet_ntop]
mov rsi, rax
test rax, rax
jne 0x140399de3
mov rsi, r14
jmp 0x140399e1c
mov r8, rsi
mov rax, r14
sub r8, r14
nop dword [rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x140399e03
inc rax
test ecx, ecx
jne 0x140399df0
test edx, edx
je 0x140399e1c
mov r9, rsi
lea rdx, str.Resolved__s_to__s
mov r8, r14
mov rcx, rbp
call fcn.1401522a0
mov r9d, r12d
lea rdx, str.Trying_to_connect_to__s_port__d
mov r8, rsi
mov rcx, rbp
call fcn.1401522a0
mov r8d, dword [rdi + 0x10]
lea r9, [rsp + 0x40]
mov rdx, qword [rdi + 0x20]
test r15d, r15d
mov rcx, rbp
cmove r15d, r13d
mov dword [rsp + 0x40], r15d
call fcn.14039a090
mov ebx, eax
test eax, eax
jns 0x140399e6b
mov rdi, qword [rdi + 0x28]
test rdi, rdi
je 0x140399e6b
mov r15d, dword [rsp + 0x40]
jmp 0x140399d80
mov rdi, qword [rsp + 0x48]
xor r13d, r13d
mov rsi, qword [rsp + 0x2d8]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rcx, rbp
test ebx, ebx
js 0x140399d4e
lea rdx, str.Connection_made
call fcn.1401522a0
movsxd rax, ebx
mov rcx, r14
mov qword [rbp + 0x18], rax
mov qword [rbp + 0x4b8], r13
call fcn.14028ad70
or dword [rbp + 0x4ac], 1
mov qword [rbp + 0x4a0], rax
mov rax, rbp
mov dword [rbp + 0x4a8], r12d
mov rdi, qword [rsp + 0x280]
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.140001200
add rsp, 0x288
pop r15
pop r14
pop r13
pop r12
pop rbp
pop rbx
ret