Function at 0x140152e90
Capabilities:
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x240
mov rax, qword [0x1403d66b0]
xor rax, rsp
mov qword [rsp + 0x230], rax
mov qword [rsp + 0x38], 0
lea rdx, [rsp + 0x80]
mov cx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
je 0x140152eea
mov edx, dword [rsp + 0x30]
lea rcx, str.WSAStartup_failed_with_error:__d_n
call fcn.140014e20
jmp 0x1401530d3
lea rax, [rsp + 0x48]
mov rdi, rax
xor eax, eax
mov ecx, 0x30
rep stosb byte [rdi], al
mov dword [rsp + 0x4c], 2
mov dword [rsp + 0x50], 1
mov dword [rsp + 0x54], 6
mov dword [rsp + 0x48], 1
lea rax, [rsp + 0x220]
mov rdi, rax
xor eax, eax
mov ecx, 0xa
rep stosb byte [rdi], al
mov r8d, 0xa
lea rdx, [rsp + 0x220]
mov rax, qword [rsp + 0x250]
mov ecx, dword [rax + 0xa00010]
call fcn.1402a100c
lea r9, [rsp + 0x38]
lea r8, [rsp + 0x48]
lea rdx, [rsp + 0x220]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
je 0x140152f90
mov edx, dword [rsp + 0x30]
lea rcx, str.getaddrinfo_failed_with_error:__d_n
call fcn.140014e20
call qword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x1401530d3
mov rax, qword [rsp + 0x38]
mov r8d, dword [rax + 0xc]
mov rax, qword [rsp + 0x38]
mov edx, dword [rax + 8]
mov rax, qword [rsp + 0x38]
mov ecx, dword [rax + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov rcx, qword [rsp + 0x250]
mov qword [rcx], rax
mov rax, qword [rsp + 0x250]
cmp qword [rax], 0xffffffffffffffff
jne 0x140152ff2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.socket_failed_with_error:__ld_n
call fcn.140014e20
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
call qword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x1401530d3
mov rax, qword [rsp + 0x38]
mov r8d, dword [rax + 0x10]
mov rax, qword [rsp + 0x38]
mov rdx, qword [rax + 0x20]
mov rax, qword [rsp + 0x250]
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_bind]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0xffffffff
jne 0x140153058
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.bind_failed_with_error:__d_n
call fcn.140014e20
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rax, qword [rsp + 0x250]
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x1401530d3
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov edx, 0x7fffffff
mov rax, qword [rsp + 0x250]
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_listen]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0xffffffff
jne 0x14015309d
mov rax, qword [rsp + 0x250]
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x1401530d3
mov byte [rsp + 0x40], 1
mov dword [rsp + 0x34], 1
mov eax, dword [rsp + 0x34]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x40]
mov r8d, 1
mov edx, 6
mov rax, qword [rsp + 0x250]
mov rcx, qword [rax]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.14027f960
add rsp, 0x240
pop rdi
ret