Function at 0x18004be50
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rax, qword [0x180066008]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov r14, qword [rsp + 0xa8]
mov rbp, rcx
mov rcx, qword [0x180069238]
mov ebx, 0x140
mov r8d, ebx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor r13d, r13d
mov rdi, rax
test rax, rax
jne 0x18004beca
test byte [0x180067c70], 2
je 0x18004bec0
mov r9d, ebx
lea r8, str.CXPLAT_SOCKET
call fcn.180041870
mov ebx, 0x8007000e
jmp 0x18004c0f6
test byte [0x180067c75], 0x10
je 0x18004beed
mov qword [rsp + 0x30], r13
xor r9d, r9d
mov byte [rsp + 0x28], r13b
mov r8, rdi
mov qword [rsp + 0x20], r13
call fcn.18004c5b4
mov r8, rbx
xor edx, edx
mov rcx, rdi
call fcn.180029d60
or byte [rdi], 0x27
lea rbx, [rdi + 0x10]
mov eax, 0x5dc
mov qword [rdi + 8], rbp
mov r12d, reloc.WS2_32.dll_socket
mov word [rdi + 0x48], ax
lea rcx, [rbp + 0x28]
mov word [rbx], r12w
call fcn.18001f4a8
or qword [rdi + 0x60], 0xffffffffffffffff
lea eax, [r12 - 0x16]
xor r9d, r9d
mov qword [rdi + 0x68], rax
xor r8d, r8d
mov qword [rdi + 0x58], rdi
xor edx, edx
mov dword [rdi + 0x78], 0xfff7
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rdi + 0x70], rax
xor r9d, r9d
lea r8d, [r12 - 0x11]
mov ecx, r12d
lea eax, [r12 - 0x16]
mov dword [rsp + 0x28], eax
mov edx, eax
mov dword [rsp + 0x20], r13d
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov qword [rdi + 0x60], rax
cmp rax, 0xffffffffffffffff
jne 0x18004bf97
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test byte [0x180067c75], 8
mov ebx, eax
je 0x18004c01e
lea rax, [0x180059d28]
jmp 0x18004c007
mov edx, 0x29
mov dword [rsp + 0x40], r13d
mov rcx, qword [rdi + 0x60]
lea r9, [rsp + 0x40]
mov dword [rsp + 0x20], 4
lea r8d, [rdx - 0xe]
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x18004bfdb
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test byte [0x180067c75], 8
mov ebx, eax
je 0x18004c01e
lea rax, str.Set_IPV6_V6ONLY
jmp 0x18004c007
mov rcx, qword [rdi + 0x60]
mov dl, 3
call qword [sym.imp.KERNEL32.dll_SetFileCompletionNotificationModes]
test eax, eax
jne 0x18004c0d7
call qword [sym.imp.KERNEL32.dll_GetLastError]
test byte [0x180067c75], 8
mov ebx, eax
je 0x18004c01e
lea rax, [0x180059e08]
mov r9d, ebx
mov qword [rsp + 0x20], rax
mov r8, rdi
lea rdx, [0x180056a58]
call fcn.180042260
test ebx, ebx
jle 0x18004c02d
movzx ebx, bx
or ebx, 0x80070000
test ebx, ebx
jns 0x18004c0f6
test byte [0x180067c75], 0x10
je 0x18004c04b
mov r8, rdi
lea rdx, [0x180056ad8]
call fcn.1800420e4
movzx eax, word [rdi + 0x4a]
mov rcx, qword [rdi + 0x60]
test ax, ax
je 0x18004c096
call qword [sym.imp.KERNEL32.dll_CancelIo]
mov rcx, qword [rdi + 0x60]
call qword [sym.imp.WS2_32.dll_closesocket]
movzx eax, word [rdi + 2]
lea r9, [rdi + 0x120]
mov rcx, qword [rdi + 8]
lea r8, [rdi + 0x58]
or edx, 0xffffffff
lea r10, [rax + rax*4]
shl r10, 5
mov rcx, qword [r10 + rcx + 0x88]
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
jmp 0x18004c0f6
cmp rcx, 0xffffffffffffffff
je 0x18004c0a2
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rdi + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp + 0x28]
call fcn.18001b4b8
test al, al
je 0x18004c0c3
mov rcx, qword [rbp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [0x180069238]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x18004c0f6
mov rdx, rbx
mov rcx, rbx
call fcn.18001f4d0
mov word [rdi + 0x2e], r13w
mov eax, 1
mov word [rdi + 0x4a], ax
mov ebx, r13d
mov qword [r14], rdi
mov eax, ebx
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.180028c10
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret