Function at 0x140020eb0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rdi
push r13
push r14
push r15
sub rsp, 0x50
movzx eax, word [rcx]
xor ebx, ebx
mov r13d, reloc.WS2_32.dll_socket
mov dword [rsp + 0x80], 1
mov dword [rsp + 0x40], ebx
mov r15, r9
mov edi, r8d
mov ebp, edx
mov r14, rcx
cmp r13w, ax
jne 0x140020efd
cmp dword [0x1400d5a00], ebx
jne 0x140020efd
or rax, 0xffffffffffffffff
jmp 0x14002124a
mov qword [rsp + 0x88], rsi
xor r8d, r8d
mov qword [rsp + 0x90], r12
mov r12d, 2
mov edx, r12d
movzx ecx, ax
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140020f8a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
call fcn.1400808e8
mov rcx, r14
mov dword [rax], ebx
call fcn.14006b9c0
cmp r13w, word [r14]
lea rcx, [0x1400b0e20]
lea r8, [0x1400ac2f2]
mov r9, rax
cmove r8, rcx
lea rdx, str.socket_AF_INET_s__SOCK_DGRAM__0__failed_on_address__s:__m
lea ecx, [rsi + 4]
call fcn.14005c0d0
cmp ebx, 0x273b
je 0x1400211ee
lea eax, [rbx - 0x273e]
cmp eax, 1
jbe 0x1400211ee
jmp 0x14002125f
mov rdx, r14
mov rcx, rsi
call fcn.14006edb0
test esi, esi
js 0x14002128a
call fcn.14006c7d0
test eax, eax
jns 0x14002101b
lea rax, [rsp + 0x80]
mov dword [rsp + 0x20], 4
test edi, edi
lea r9, [rsp + 0x40]
mov edx, 0xffff
mov r8d, 4
cmove r9, rax
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x14002101b
mov rcx, r14
call fcn.14006b9c0
mov r9, rax
lea r8, [0x1400b0edc]
lea rax, [0x1400b0ed8]
test edi, edi
lea rdx, str.setsockopt_SO_REUSEADDR__s_fails_for_address__s:__m
mov ecx, 3
cmovne r8, rax
call fcn.14005c0d0
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
or rax, 0xffffffffffffffff
jmp 0x14002123a
test byte [r15 + 0xa4], 0x80
jne 0x14002102d
mov rcx, rsi
call fcn.140020580
cmp r12w, word [r14]
jne 0x14002108a
xor edx, edx
mov dword [rsp + 0x20], 4
lea r9, [0x1400cc854]
mov rcx, rsi
lea r8d, [rdx + 3]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x140021078
mov rcx, r14
call fcn.14006b9c0
mov r8d, dword [0x1400cc854]
lea rdx, str.setsockopt_IP_TOS___02x__fails_on_address__s:__m
mov r9, rax
mov ecx, 3
call fcn.14005c0d0
test ebp, ebp
je 0x14002108a
mov r8, r14
mov rdx, rsi
mov rcx, r15
call fcn.140020600
cmp r13w, word [r14]
jne 0x14002112a
cmp dword [0x1400cf138], ebx
jne 0x1400210e0
or eax, 0xffffffff
lock xadd dword [0x1400cf13c], eax
cmp eax, 1
jne 0x1400210c5
cmp dword [0x1400cf138], ebx
jne 0x1400210e0
call fcn.14006eb10
mov dword [0x1400cf138], 1
jmp 0x1400210e0
cmp dword [0x1400cf138], ebx
jne 0x1400210e0
nop dword [rax]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x1400cf138], ebx
je 0x1400210d0
cmp dword [reloc.WS2_32.dll_socket], ebx
jne 0x14002112a
mov edx, 0x29
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x80]
mov rcx, rsi
lea r8d, [rdx - 0xe]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x14002112a
mov rcx, r14
call fcn.14006b9c0
mov r8, rax
lea rdx, str.setsockopt_IPV6_V6ONLY_on_fails_on_address__s:__m
mov ecx, 3
call fcn.14005c0d0
cmp r12w, word [r14]
mov eax, 0x10
mov r8d, 0x1c
mov rdx, r14
cmove r8d, eax
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x1400211f4
test edi, edi
jne 0x1400211e5
cmp r12w, word [r14]
jne 0x14002116c
mov eax, dword [r14 + 4]
and eax, 0xf0
cmp al, 0xe0
jmp 0x140021171
cmp byte [r14 + 8], 0xff
sete bl
lea rax, str.__multicast_
test ebx, ebx
lea rbp, [0x1400ac2f2]
mov rdi, rbp
mov rcx, r14
cmovne rdi, rax
movzx eax, word [r14 + 2]
shl ax, 8
movzx ebx, ax
movzx eax, byte [r14 + 3]
or ebx, eax
call fcn.14006b9c0
cmp r13w, word [r14]
lea rcx, [0x1400b0e20]
mov r8, rsi
lea rdx, str.bind__d__AF_INET_s__s_d_s_flags_0x_x_failed:__m
cmove rbp, rcx
mov ecx, dword [r15 + 0xa4]
mov dword [rsp + 0x38], ecx
mov r9, rbp
mov qword [rsp + 0x30], rdi
mov ecx, 3
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
call fcn.14005c0d0
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
or rax, 0xffffffffffffffff
jmp 0x14002123a
lea r8, [rsp + 0x44]
mov dword [rsp + 0x44], 1
mov edx, 0x8004667e
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
js 0x1400212ad
xor edx, edx
mov rcx, rsi
call fcn.140022000
mov r8d, ebp
mov rdx, r15
mov rcx, rsi
call fcn.140057dc0
test eax, eax
je 0x1400212cc
mov rax, rsi
mov rsi, qword [rsp + 0x88]
mov r12, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x98]
add rsp, 0x50
pop r15
pop r14
pop r13
pop rdi
pop rbp
ret
call fcn.1400808e8
mov dword [rax], ebx
call fcn.1400808e8
lea rdx, str.unexpected_socket___error__m_code__d__not_EPROTONOSUPPORT_nor_EAFNOSUPPORT_nor_EPFNOSUPPORT____exiting
mov ecx, 3
mov r8d, dword [rax]
call fcn.14005c0d0
mov ecx, 1
call fcn.1400786ac
int3
mov edx, 0x76
lea r9, str._int_fd___0
lea rcx, str.........libntp_socket.c
lea r8d, [rdx - 0x75]
call qword [0x1400cf0f0]
call fcn.14008013c
int3
mov r8, rsi
lea rdx, str.ioctl_FIONBIO__fails_on_fd__d:__m
mov ecx, 3
call fcn.14005c0d0
mov ecx, 1
call fcn.1400786ac
int3
lea rdx, str.unable_to_set_up_io_completion_port___EXITING
mov ecx, 3
call fcn.14005c0d0
mov ecx, 1
call fcn.1400786ac
int3