Function at 0x1403b18c0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rdi, rcx
lea r8, [0x1403b1870]
mov rcx, qword [rcx + 8]
mov r12d, 1
mov rdx, rdi
mov r13, qword [rcx + 0x1e0]
mov dword [rsp + 0x80], r12d
mov rcx, qword [rcx + 0x1e0]
call fcn.1403aa180
test eax, eax
jne 0x1403b1d79
lea rbx, [rdi + 0x10]
lea rbp, [r12 - 2]
nop word [rax + rax]
mov rcx, qword [rdi + 8]
mov rdx, qword [rcx + 0x218]
test rdx, rdx
je 0x1403b19e4
mov eax, dword [rbx]
mov r8, rbp
mov r9d, dword [rcx + 0x2c8]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rdx
xor edx, edx
call fcn.1403bf160
mov r8d, eax
cmp eax, 0xfffffffd
je 0x1403b1c4d
cmp qword [r13 + 0x528], 0
lea rdx, [r13 + 0x528]
je 0x1403b19ae
nop dword [rax]
mov rcx, qword [rdx]
mov rax, qword [rdi + 8]
test r8d, r8d
js 0x1403b199c
cmp rcx, rax
jne 0x1403b19a1
mov rax, qword [rax + 0x270]
mov qword [rdx], rax
mov rax, qword [rdi + 8]
mov qword [rax + 0x270], 0
jmp 0x1403b19e4
cmp rcx, rax
je 0x1403b19d0
lea rdx, [rcx + 0x270]
cmp qword [rdx], 0
jne 0x1403b1970
test r8d, r8d
jns 0x1403b19d0
mov rax, qword [r13 + 0x528]
mov rcx, qword [rdi + 8]
mov qword [rcx + 0x270], rax
mov rax, qword [rdi + 8]
mov qword [r13 + 0x528], rax
cmp r8d, 0xfffffffe
je 0x1403b1cac
cmp r8d, 0xffffffff
je 0x1403b1c54
xor r15d, r15d
cmp r15d, r12d
jge 0x1403b1d79
mov ecx, dword [rdi + 0x10]
lea rbx, [rdi + 0x10]
xor r8d, r8d
mov edx, r12d
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1403b1d65
mov rcx, qword [rdi + 8]
lea r9, [rsp + 0x80]
mov dword [rsp + 0x20], 4
mov edx, dword [rcx + 0x1d8]
bt rdx, 0x17
mov edx, 0xffff
mov rcx, rax
jb 0x1403b1a53
mov r8d, 0xfffffffb
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x1403b1d46
lea r14, [rdi + 0x10]
jmp 0x1403b1a6a
mov r8d, 4
mov r14, rbx
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x1403b1d46
mov rcx, qword [rdi + 8]
xor r8d, r8d
mov rdx, rsi
call fcn.1403a72a0
mov rcx, qword [rdi + 8]
mov r8, rsi
mov eax, dword [rbx]
xor edx, edx
mov dword [rsp + 0x28], eax
mov rax, qword [rcx + 0x218]
mov r9d, dword [rcx + 0x2c8]
mov qword [rsp + 0x20], rax
call fcn.1403bf160
mov ebp, eax
cmp eax, 0xfffffffd
je 0x1403b1d55
test eax, eax
js 0x1403b1c2b
xor r9d, r9d
lea r8, str.listen
mov edx, r15d
mov rcx, r13
call fcn.1403a67e0
mov rbx, rax
test rax, rax
je 0x1403b1d3d
movzx eax, byte [r14]
mov byte [rbx + 0x43f], al
mov rax, qword [rdi + 8]
mov ecx, dword [rax + 0x1d8]
bt rcx, 0xe
jb 0x1403b1b00
or dword [rbx + 0x420], 8
mov rax, qword [rdi + 8]
mov dword [rax + 0x2c8], ebp
mov qword [rbx + 0x3f8], rsi
mov rdx, rbx
mov rax, qword [rdi + 8]
mov rcx, qword [rax + 0x248]
mov qword [rbx + 0x10], rcx
mov rcx, qword [rdi + 8]
call fcn.1403a6780
or dword [rbx + 0x41c], 0x100
mov rax, qword [rbx]
mov rcx, qword [rax + 0x548]
mov rax, qword [rcx + 0x20]
test rax, rax
je 0x1403b1b44
mov rcx, rbx
call rax
mov rdx, rbx
mov rcx, r13
call fcn.1403b6450
test eax, eax
jne 0x1403b1d55
mov rdx, qword [rdi + 8]
lea rcx, [rbx + 0x280]
add rdx, 0x1f8
call fcn.1403b48a0
mov rax, qword [rdi + 8]
cmp dword [rax + 0x2e8], 0
je 0x1403b1bb3
mov rcx, qword [rbx + 0x3f8]
lea r9, [rsp + 0x88]
mov edx, 6
mov dword [rsp + 0x88], r12d
mov dword [rsp + 0x20], 4
lea r8d, [rdx + 9]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1403b1bb3
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rbx + 0x3f8]
mov edx, 0x7fffffff
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
js 0x1403b1d01
mov r10, qword [rdi + 8]
lea r9, [0x1405d5218]
lea r8, [rbx + 0x110]
mov rax, qword [r10 + 0x218]
mov rcx, qword [r10 + 0x1e0]
test rax, rax
cmovne r9, rax
mov eax, dword [r10 + 0x2c8]
mov dword [rsp + 0x30], eax
mov rax, qword [r10 + 0x210]
lea rdx, [rcx + 0x378]
mov qword [rsp + 0x28], r9
lea r9, str.listen_s_s_d
mov qword [rsp + 0x20], rax
call fcn.1403a8d90
inc r15d
jmp 0x1403b19e7
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, qword [rdi + 8]
mov rbp, 0xffffffffffffffff
cmp qword [rax + 0x218], 0
jne 0x1403b1920
mov eax, ebp
jmp 0x1403b1d7b
cmp qword [rdi], 0
je 0x1403b1c4d
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 + 0x2c8]
mov dword [rsp + 0x28], eax
mov rax, qword [r9 + 0x218]
mov r9, qword [r9 + 0x210]
mov qword [rsp + 0x20], rax
call fcn.1403a8a00
mov rax, qword [rdi]
mov ecx, dword [rax + 0xc0]
bt rcx, 0x1e
cmovb r12d, ebp
mov eax, r12d
jmp 0x1403b1d7b
cmp qword [rdi], 0
je 0x1403b1c4d
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 + 0x218]
mov eax, dword [r9 + 0x2c8]
mov r9, qword [r9 + 0x210]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov ecx, r12d
call fcn.1403a8a00
mov rcx, qword [rdi]
mov edx, dword [rcx + 0xc0]
bt rdx, 0x1e
cmovb r12d, ebp
mov eax, r12d
jmp 0x1403b1d7b
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.1403a8a00
lea rcx, [rbx + 0x280]
call fcn.1403b4940
mov rcx, rbx
call fcn.1403b6280
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffff
jmp 0x1403b1d7b
lea rdx, str.Out_of_mem_n
jmp 0x1403b1d4d
lea rdx, str.reuseaddr_failed_n
mov ecx, r12d
call fcn.1403a8a00
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffff
jmp 0x1403b1d7b
lea rdx, str.ERROR_opening_socket_n
mov ecx, r12d
call fcn.1403a8a00
mov eax, r12d
jmp 0x1403b1d7b
xor eax, eax
mov rbx, qword [rsp + 0x90]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret