Function at 0x140cb1530
Capabilities:
Set socket configuration

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rdi, rcx
lea r8, [0x140cb1a70]
mov rcx, qword [rcx + 8]
mov r12d, 1
mov rdx, rdi
mov r13, qword [rcx + 0x1e8]
mov dword [rax + 8], r12d
mov dword [rax + 0x10], r12d
mov rcx, qword [rcx + 0x1e8]
call fcn.140cab4a0
test eax, eax
jne 0x140cb1a49
lea rbx, [rdi + 0x10]
mov rsi, 0xffffffffffffffff
nop dword [rax + rax]
mov rcx, qword [rdi + 8]
mov rdx, qword [rcx + 0x220]
test rdx, rdx
je 0x140cb1654
mov eax, dword [rbx]
mov r8, rsi
mov r9d, dword [rcx + 0x340]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rdx
xor edx, edx
call fcn.140cc00e0
mov r8d, eax
cmp eax, 0xfffffffd
je 0x140cb190c
lea rdx, [r13 + 0x5d0]
cmp qword [rdx], 0
je 0x140cb161e
nop dword [rax]
mov rcx, qword [rdx]
mov rax, qword [rdi + 8]
test r8d, r8d
js 0x140cb160c
cmp rcx, rax
jne 0x140cb1611
mov rax, qword [rax + 0x278]
mov qword [rdx], rax
mov rax, qword [rdi + 8]
mov qword [rax + 0x278], 0
jmp 0x140cb1654
cmp rcx, rax
je 0x140cb1640
lea rdx, [rcx + 0x278]
cmp qword [rdx], 0
jne 0x140cb15e0
test r8d, r8d
jns 0x140cb1640
mov rax, qword [r13 + 0x5d0]
mov rcx, qword [rdi + 8]
mov qword [rcx + 0x278], rax
mov rax, qword [rdi + 8]
mov qword [r13 + 0x5d0], rax
cmp r8d, 0xfffffffe
je 0x140cb196b
cmp r8d, 0xffffffff
je 0x140cb1913
xor r15d, r15d
cmp r15d, r12d
jge 0x140cb1a49
mov ecx, dword [rdi + 0x10]
lea rbx, [rdi + 0x10]
xor r8d, r8d
mov edx, r12d
call qword [sym.imp.WS2_32.dll_socket]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x140cb1a35
mov rcx, qword [rdi + 8]
lea r9, [rsp + 0x80]
mov dword [rsp + 0x20], 4
mov edx, dword [rcx + 0x1e0]
bt rdx, 0x17
mov edx, 0xffff
mov rcx, rax
jb 0x140cb16c3
mov r8d, 0xfffffffb
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x140cb1a16
lea r14, [rdi + 0x10]
jmp 0x140cb16da
mov r8d, 4
mov r14, rbx
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x140cb1a16
cmp dword [rbx], 0x17
jne 0x140cb170b
lea r9, [rsp + 0x88]
mov dword [rsp + 0x20], 4
mov edx, 0x29
mov r8d, 0x1b
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x140cb1a25
mov rcx, qword [rdi + 8]
xor r8d, r8d
mov rdx, rbp
call fcn.140cc6280
mov rcx, qword [rdi + 8]
mov r8, rbp
mov eax, dword [r14]
xor edx, edx
mov dword [rsp + 0x28], eax
mov rax, qword [rcx + 0x220]
mov r9d, dword [rcx + 0x340]
mov qword [rsp + 0x20], rax
call fcn.140cc00e0
mov esi, eax
cmp eax, 0xfffffffd
je 0x140cb1a25
test eax, eax
js 0x140cb18ea
xor r9d, r9d
lea r8, str.listen
mov edx, r15d
mov rcx, r13
call fcn.140ca6b50
mov rbx, rax
test rax, rax
je 0x140cb1a0d
movzx eax, byte [r14]
mov byte [rbx + 0x4f7], al
mov rax, qword [rdi + 8]
mov ecx, dword [rax + 0x1e0]
bt rcx, 0xe
jb 0x140cb17a2
or dword [rbx + 0x4d8], 8
mov rax, qword [rdi + 8]
mov dword [rax + 0x340], esi
mov qword [rbx + 0x4b0], rbp
mov rdx, rbx
mov rax, qword [rdi + 8]
mov rcx, qword [rax + 0x250]
mov qword [rbx + 0x10], rcx
mov rcx, qword [rdi + 8]
call fcn.140ca7880
or dword [rbx + 0x4d4], 0x100
mov rax, qword [rbx]
mov rcx, qword [rax + 0x5f0]
mov rax, qword [rcx + 0x20]
test rax, rax
je 0x140cb17e6
mov rcx, rbx
call rax
mov rdx, rbx
mov rcx, r13
call fcn.140cac620
test eax, eax
jne 0x140cb19ff
mov rdx, qword [rdi + 8]
lea rcx, [rbx + 0x2b0]
add rdx, 0x200
call fcn.140cb9990
mov rax, qword [rdi + 8]
cmp dword [rax + 0x360], 0
je 0x140cb1872
mov rcx, qword [rbx + 0x4b0]
lea r9, [rsp + 0x90]
mov edx, 6
mov dword [rsp + 0x90], r12d
mov r8d, reloc.WS2_32.dll_ntohs
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x140cb1872
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, str._lws_vhost_init_server_af
mov ecx, 2
mov r9d, eax
lea rdx, str._s:_TCP_NODELAY_failed_with_error__d_n
call fcn.140ca84f0
mov rcx, qword [rbx + 0x4b0]
mov edx, 0x7fffffff
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
js 0x140cb19c3
mov r10, qword [rdi + 8]
lea r9, [0x140ec18ff]
lea r8, [rbx + 0x138]
mov rax, qword [r10 + 0x220]
mov rcx, qword [r10 + 0x1e8]
test rax, rax
cmovne r9, rax
mov eax, dword [r10 + 0x340]
mov dword [rsp + 0x30], eax
mov rax, qword [r10 + 0x218]
lea rdx, [rcx + 0x3c0]
mov qword [rsp + 0x28], r9
lea r9, str.listen_s_s_d
mov qword [rsp + 0x20], rax
call fcn.140ca7e40
inc r15d
jmp 0x140cb1657
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, qword [rdi + 8]
mov rsi, 0xffffffffffffffff
cmp qword [rax + 0x220], 0
jne 0x140cb1590
mov eax, esi
jmp 0x140cb1a4b
cmp qword [rdi], 0
je 0x140cb190c
mov r9, qword [rdi + 8]
lea r8, str._lws_vhost_init_server_af
lea rdx, str._s:_VH__s:_iface__s_port__d_DOESNT_EXIST_n
mov ecx, r12d
mov eax, dword [r9 + 0x340]
mov dword [rsp + 0x28], eax
mov rax, qword [r9 + 0x220]
mov r9, qword [r9 + 0x218]
mov qword [rsp + 0x20], rax
call fcn.140ca84f0
mov rax, qword [rdi]
mov ecx, dword [rax + 0x1a8]
bt rcx, 0x1e
cmovb r12d, esi
mov eax, r12d
jmp 0x140cb1a4b
cmp qword [rdi], 0
je 0x140cb190c
mov r9, qword [rdi + 8]
lea r8, str._lws_vhost_init_server_af
lea rdx, str._s:_VH__s:_iface__s_port__d_NOT_USABLE_n
mov rcx, qword [r9 + 0x220]
mov eax, dword [r9 + 0x340]
mov r9, qword [r9 + 0x218]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov ecx, r12d
call fcn.140ca84f0
mov rcx, qword [rdi]
mov edx, dword [rcx + 0x1a8]
bt rdx, 0x1e
cmovb r12d, esi
mov eax, r12d
jmp 0x140cb1a4b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.listen_failed_with_error__d_n
mov ecx, r12d
mov r8d, eax
call fcn.140ca84f0
lea rcx, [rbx + 0x2b0]
call fcn.140cb9af0
mov rcx, rbx
call fcn.140cac990
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffff
jmp 0x140cb1a4b
lea rdx, str.inserting_wsi_socket_into_fds_failed_n
mov ecx, 4
jmp 0x140cb1a20
lea rdx, str.Out_of_mem_n
jmp 0x140cb1a1d
lea rdx, str.reuseaddr_failed_n
mov ecx, r12d
call fcn.140ca84f0
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffff
jmp 0x140cb1a4b
lea rdx, str.ERROR_opening_socket_n
mov ecx, r12d
call fcn.140ca84f0
mov eax, r12d
jmp 0x140cb1a4b
xor eax, eax
mov rbx, qword [rsp + 0x98]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret