Function at 0x180016d50
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 7]
sub rsp, 0xc0
mov rax, qword [0x1801d72c0]
xor rax, rsp
mov qword [rbp - 1], rax
mov ebx, r8d
mov r12, rdx
mov rdi, rcx
mov r15, qword [rbp + 0x67]
mov qword [rbp - 0x51], r15
mov r14, qword [rbp + 0x77]
mov r13, qword [rbp + 0x7f]
xor edx, edx
cmp r8d, 2
je 0x180016da4
cmp ebx, 0x17
jne 0x180016f88
lea eax, [r9 - 1]
mov ecx, reloc.WS2_32.dll_recv
test eax, 0xfffffffb
je 0x180016dbc
mov rsi, rdx
jmp 0x180016e4d
xor eax, eax
lock cmpxchg qword [rdi + 0x18], rdx
mov rsi, rax
mov qword [rbp - 0x49], rax
jne 0x180016e46
mov dword [rbp - 0x41], 0x25a207b9
mov dword [rbp - 0x3d], 0x4660ddf3
mov dword [rbp - 0x39], 0xe576e98e
mov dword [rbp - 0x35], 0x3e06748c
mov dword [rbp - 0x29], edx
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], rdx
lea rax, [rbp - 0x29]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 8
lea rax, [rbp - 0x49]
mov qword [rsp + 0x20], rax
mov r9d, ecx
lea r8, [rbp - 0x41]
mov edx, 0xc8000006
mov rcx, qword [r12]
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x180016e33
mov rax, rdi
mov qword [rbp - 0x49], rax
jmp 0x180016e37
mov rax, qword [rbp - 0x49]
xchg qword [rdi + 0x18], rax
mov rsi, qword [rbp - 0x49]
xor edx, edx
mov ecx, reloc.WS2_32.dll_recv
cmp rsi, rdi
cmove rsi, rdx
test rsi, rsi
je 0x180016f88
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x21], xmm0
mov qword [rbp - 0x11], rax
mov dword [rbp - 9], eax
mov word [rbp - 0x21], bx
mov r8d, 0x1c
cmp ebx, 2
cmove r8, rcx
lea r9, [r14 + 0x38]
lea rdx, [rbp - 0x21]
mov rcx, qword [r12]
call fcn.180011300
mov rax, qword [r14 + 0x48]
test al, 1
je 0x180016f1f
cmp rax, 1
jne 0x180016ea1
cmp dword [r14 + 0x38], 0
je 0x180016f1f
xor eax, eax
mov dword [rbp - 0x3d], eax
movabs r15, 0x4d54ee85da812030
mov rcx, qword [0x1801dba60]
add rcx, r15
lea rbx, [0x1801dba58]
cmp rcx, 1
jbe 0x180016edb
mov rax, qword [0x1801dba58]
mov edx, 0x2726
mov rcx, rbx
call qword [rax + 0x30]
jmp 0x180016edd
mov al, 1
movzx eax, al
add rax, 2
mov qword [rbp - 0x31], rax
mov dword [rbp - 0x41], 0x2726
mov qword [rbp - 0x39], rbx
movups xmm0, xmmword [rbp - 0x41]
movups xmmword [rbp - 0x69], xmm0
movsd xmm1, qword [rbp - 0x31]
movsd qword [rbp - 0x59], xmm1
lea rdx, [rbp - 0x69]
lea rcx, [r14 + 0x38]
call fcn.180010680
test al, al
jne 0x180016f1f
mov rcx, qword [rdi + 8]
jmp 0x18001702b
mov byte [r14 + 0x70], 1
mov rax, qword [rdi + 8]
lock inc dword [rax + 0x30]
mov qword [rsp + 0x30], r13
xor eax, eax
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov r8d, dword [rbp + 0x6f]
mov rdx, qword [rbp - 0x51]
mov rcx, qword [r12]
call rsi
mov ebx, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebx, ebx
jne 0x180016f77
cmp eax, 0x3e5
je 0x180016f77
xor r9d, r9d
mov r8d, eax
mov rdx, r13
mov rcx, qword [rdi + 8]
call fcn.1800139e0
jmp 0x180017037
mov rdx, r13
mov rcx, qword [rdi + 8]
call fcn.180013950
jmp 0x180017037
xor eax, eax
lock cmpxchg qword [rdi + 0x10], rdx
mov rsi, rax
jne 0x180016fa9
mov rcx, qword [rdi]
mov rcx, qword [rcx]
call fcn.1800444f0
mov rsi, rax
xchg qword [rdi + 0x10], rax
xor edx, edx
test byte [r12 + 8], 3
jne 0x180017093
mov rcx, qword [r12]
cmp rcx, 0xffffffffffffffff
jne 0x180017063
mov dword [rbp - 0x3d], edx
movabs r15, 0x4d54ee85da812030
mov rcx, qword [0x1801dba60]
add rcx, r15
lea rbx, [0x1801dba58]
cmp rcx, 1
jbe 0x180016ffb
mov rax, qword [0x1801dba58]
mov edx, 0x2719
mov rcx, rbx
call qword [rax + 0x30]
jmp 0x180016ffd
mov al, 1
movzx eax, al
add rax, 2
mov qword [rbp - 0x31], rax
mov dword [rbp - 0x41], 0x2719
mov qword [rbp - 0x39], rbx
movups xmm0, xmmword [rbp - 0x41]
movups xmmword [r14 + 0x38], xmm0
movsd xmm1, qword [rbp - 0x31]
movsd qword [r14 + 0x48], xmm1
mov rcx, qword [rsi + 0x28]
lock inc dword [rcx + 0x30]
mov rdx, r14
call fcn.1800138d0
mov eax, 0xffffffff
mov rcx, qword [rbp - 1]
xor rcx, rsp
call fcn.1801525e0
mov rbx, qword [rsp + 0x118]
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov dword [rbp - 0x29], 1
lea r8, [rbp - 0x29]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov ebx, eax
mov edx, eax
shr edx, 0x1f
lea rcx, [r14 + 0x38]
call fcn.180011240
test ebx, ebx
js 0x180017027
or byte [r12 + 8], 2
lea r9, [r14 + 0x38]
mov r8, qword [rbp + 0x6f]
mov rdx, r15
mov rcx, qword [r12]
call fcn.1800115b0
test eax, eax
je 0x180017027
xor eax, eax
mov dword [rbp - 0x3d], eax
movabs r15, 0x4d54ee85da812030
mov rdi, qword [0x1801dba60]
lea rax, [rdi + r15]
lea rbx, [0x1801dba58]
cmp rax, 1
jbe 0x1800170f1
mov rax, qword [0x1801dba58]
mov edx, 0x2734
mov rcx, rbx
call qword [rax + 0x30]
mov rdi, qword [0x1801dba60]
jmp 0x1800170f3
mov al, 1
movzx eax, al
add rax, 2
mov qword [rbp - 0x31], rax
mov dword [rbp - 0x41], 0x2734
mov qword [rbp - 0x39], rbx
movups xmm0, xmmword [rbp - 0x41]
movups xmmword [rbp - 0x69], xmm0
movsd xmm1, qword [rbp - 0x31]
movsd qword [rbp - 0x59], xmm1
lea rdx, [rbp - 0x69]
lea rcx, [r14 + 0x38]
call fcn.180010680
test al, al
jne 0x18001718e
xor eax, eax
mov dword [rbp - 0x3d], eax
lea rax, [rdi + r15]
cmp rax, 1
jbe 0x18001714f
mov rax, qword [0x1801dba58]
mov edx, 0x2733
mov rcx, rbx
call qword [rax + 0x30]
jmp 0x180017151
mov al, 1
movzx eax, al
add rax, 2
mov qword [rbp - 0x31], rax
mov dword [rbp - 0x41], 0x2733
mov qword [rbp - 0x39], rbx
movups xmm0, xmmword [rbp - 0x41]
movups xmmword [rbp - 0x69], xmm0
movsd xmm1, qword [rbp - 0x31]
movsd qword [rbp - 0x59], xmm1
lea rcx, [r14 + 0x38]
lea rdx, [rbp - 0x69]
call fcn.180010680
test al, al
je 0x180017027
xorps xmm0, xmm0
movups xmmword [rbp - 0x69], xmm0
xor eax, eax
mov qword [rbp - 0x59], rax
movups xmmword [r14 + 0x38], xmm0
movsd xmm0, qword [rbp - 0x59]
movsd qword [r14 + 0x48], xmm0
mov rbx, qword [r12]
lea rcx, [rsi + 0x30]
mov qword [rbp - 0x41], rcx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [rbp - 0x39], 1
cmp byte [rsi + 0x1e8], 0
je 0x1800171dc
mov rcx, qword [rsi + 0x28]
lock inc dword [rcx + 0x30]
mov rdx, r14
call fcn.1800138d0
jmp 0x180017204
lea rcx, [rsi + 0x110]
mov r8, r14
mov rdx, rbx
call fcn.18002a770
mov rcx, qword [rsi + 0x28]
lock inc dword [rcx + 0x30]
test al, al
je 0x180017204
lea rcx, [rsi + 0x58]
call fcn.180015270
nop
mov rcx, qword [rbp - 0x41]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 3
jmp 0x18001703c