Function at 0x140014c20
Capabilities:
Get local ipv4 addresses
Get socket information
Get thread local storage value
Resolve dns
Set socket configuration

Disassembly:
test rcx, rcx
je 0x14001503c
push rbp
push rbx
push rsi
lea rbp, [rsp - 0x47]
sub rsp, 0xd0
mov rax, qword [0x140067008]
xor rax, rsp
mov qword [rbp + 0x37], rax
mov rsi, rdx
mov dword [rbp - 0x45], reloc.WS2_32.dll_recv
mov rbx, rcx
mov dword [rbp - 0x41], 1
mov rcx, qword [rcx]
lea rdx, [rbp - 0x19]
lea r8, [rbp - 0x45]
call qword [sym.imp.WS2_32.dll_accept]
mov qword [rbp - 0x31], rax
cmp rax, 0xffffffffffffffff
je 0x140015026
mov ecx, dword [rbp - 0x15]
call qword [sym.imp.WS2_32.dll_ntohl]
mov edx, eax
mov rcx, rsi
call fcn.140012cf0
test eax, eax
jne 0x140014cf6
cmp word [rbp - 0x19], 2
mov byte [rbp - 1], al
jne 0x140014cc2
xor eax, eax
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], eax
lea r8, [rbp - 1]
lea rcx, [rbp - 0x19]
mov qword [rsp + 0x20], rax
lea r9d, [rax + 0x32]
lea edx, [rax + 0x10]
call qword [sym.imp.WS2_32.dll_getnameinfo]
lea r9, [rbp - 1]
mov qword [0x14006ade0], rsi
lea r8, str.accept_new_connection
lea rdx, str._s:__s_is_not_allowed_to_connect
lea rcx, [0x14006a950]
call fcn.1400079a0
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x140015026
mov rcx, qword [rbp - 0x31]
xor r8d, r8d
mov qword [0x14006ade0], rsi
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.dll_SetHandleInformation]
movzx eax, byte [rbx + 0x28]
lea r8, [rbp - 0x45]
mov rcx, qword [rbp - 0x31]
lea rdx, [rbp - 0x29]
mov byte [rbp - 9], al
movzx eax, byte [rbx + 0x29]
mov byte [rbp - 8], al
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140014d63
mov qword [0x14006ade0], rsi
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14003d3fc
mov r9, rax
lea r8, str.accept_new_connection
lea rdx, str._s:_getsockname___failed:__s
lea rcx, [0x14006a950]
call fcn.1400079a0
mov rcx, qword [rbp - 0x31]
lea r9, [rbp - 0x41]
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 8
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x140014db9
mov qword [0x14006ade0], rsi
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14003d3fc
mov r9, rax
lea r8, str.accept_new_connection
lea rdx, str._s:_setsockopt_SOL_SOCKET_SO_KEEPALIVE__failed:__s
lea rcx, [0x14006a950]
call fcn.1400079a0
test rsi, rsi
je 0x140014e99
mov rax, qword [rsi + 0x128]
test rax, rax
je 0x140014e34
cmp byte [rax], 0x31
jne 0x140014e34
cmp byte [rax + 1], 0
jne 0x140014e34
mov rcx, qword [rbp - 0x31]
lea r9, [rbp - 0x39]
mov edx, 6
mov dword [rbp - 0x39], 1
mov dword [rsp + 0x20], 4
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x140014e34
mov qword [0x14006ade0], rsi
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14003d3fc
mov r9, rax
lea r8, str.accept_new_connection
lea rdx, str._s:_setsockopt_IPPROTO_TCP_TCP_NODELAY__failed:__s
lea rcx, [0x14006a950]
call fcn.1400079a0
mov rcx, qword [rsi + 0xc8]
test rcx, rcx
je 0x140014e99
call fcn.140036e20
lea ecx, [rax - 1]
cmp ecx, 0x270e
ja 0x140014e99
mov rbx, qword [rbp - 0x31]
lea r9, [rbp - 0x49]
mov rcx, rbx
mov dword [rbp - 0x49], eax
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 0x1006
call qword [sym.imp.WS2_32.dll_setsockopt]
lea r9, [rbp - 0x49]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 0x1005
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_setsockopt]
jmp 0x140014eed
mov rbx, qword [rbp - 0x31]
lea r9, [rbp - 0x49]
mov rcx, rbx
mov dword [rbp - 0x49], 0x2710
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 0x1006
call qword [sym.imp.WS2_32.dll_setsockopt]
lea r9, [rbp - 0x49]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 0x1005
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_setsockopt]
test rsi, rsi
je 0x140015026
mov rcx, qword [rsi + 0x1c0]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [rsi]
test eax, eax
jne 0x140014f9f
mov qword [rsp + 0x100], rdi
mov ecx, dword [rsi + 0x5c0]
mov eax, dword [rsi + 0x5c4]
sub ecx, eax
cmp ecx, 0x14
jl 0x140014f97
mov ecx, dword [0x14006aeb8]
lea rbx, [rsi + 0x600]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rcx, rbx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
movsxd r9, dword [rbx + 0x28]
mov rcx, rbx
mov rdx, qword [rdi + 8]
mov r8, qword [rbx + 0x30]
mov qword [r8 + r9*8], rdx
inc dword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsi + 0x1c0]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, qword [rdi + 8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsi + 0x1c0]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [rsi]
test eax, eax
je 0x140014f11
mov rdi, qword [rsp + 0x100]
mov eax, dword [rsi + 0x5c4]
mov ecx, dword [rsi + 0x5c0]
sub ecx, eax
cmp ecx, 0x14
jge 0x14001500d
mov ecx, dword [rsi + 0x5c0]
mov eax, 0x66666667
movups xmm0, xmmword [rbp - 0x31]
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
shl eax, 2
sub ecx, eax
movsxd rax, ecx
lea rcx, [rax + rax*2]
add rcx, rcx
movups xmmword [rsi + rcx*8 + 0x200], xmm0
movups xmm1, xmmword [rbp - 0x21]
movups xmmword [rsi + rcx*8 + 0x210], xmm1
movups xmm0, xmmword [rbp - 0x11]
movups xmmword [rsi + rcx*8 + 0x220], xmm0
mov eax, dword [rsi + 0x5c0]
inc eax
mov dword [rsi + 0x5c0], eax
lea rcx, [rsi + 0x5c8]
call fcn.140008c70
mov rcx, qword [rsi + 0x1c0]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.14002b5c0
add rsp, 0xd0
pop rsi
pop rbx
pop rbp
ret