Function at 0x14006ca10
Capabilities:
Set socket configuration

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
mov ebp, r9d
mov r14, r8
mov rbx, rdx
mov rdi, rcx
mov rsi, qword [rsp + 0xf0]
mov rcx, qword [r8]
cmp rcx, 0xffffffffffffffff
je 0x14006ca6c
xorps xmm0, xmm0
movaps xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], 0
mov byte [rsp + 0x4f], 0
lea rdx, [rsp + 0x4f]
lea r9, [rsp + 0x50]
mov r8b, 1
call fcn.14005fa70
mov qword [r14], 0xffffffffffffffff
mov r12d, dword [rsp + 0xd8]
mov r13d, dword [rsp + 0xd0]
mov rax, qword [rdi + 8]
lock inc dword [rax + 0x30]
test rsi, rsi
je 0x14006cb28
mfence
mov eax, dword [rsi]
cmp eax, 1
jne 0x14006cb28
mov rsi, qword [rdi + 8]
mov r9, qword [rsp + 0xf8]
mov dword [r9 + 0x30], 1
lea rax, [0x140134e30]
mov qword [r9], rax
mov qword [r9 + 0x10], 0x3e3
mov rcx, qword [rsi + 0x28]
mov r8d, 2
xor edx, edx
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x14006cb28
lea r15, [rsi + 0x60]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rax, [rsi + 0x90]
mov r8, qword [rsp + 0xf8]
mov qword [r8 + 0x20], 0
mov rcx, qword [rsi + 0x98]
lea rdx, [rcx + 0x20]
test rcx, rcx
cmove rdx, rax
mov qword [rdx], r8
mov qword [rsi + 0x98], r8
mov eax, 1
xchg dword [rsi + 0x58], eax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
xor r15d, r15d
mov ecx, ebp
mov edx, r13d
mov r8d, r12d
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x14006cb98
mov r13d, 0
mov esi, 0
cmp ebp, 0x17
jne 0x14006cbe4
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x50]
mov rcx, r12
mov edx, 0x29
mov r8d, 0x1b
call qword [sym.imp.WS2_32.dll_setsockopt]
xor r15d, r15d
xor r13d, r13d
xor esi, esi
jmp 0x14006cbe4
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r15d, eax
mov rax, qword [0x140134e38]
shr rax, 1
movabs rcx, 0x595588bd12bf6fe8
cmp rax, rcx
jne 0x14006cbc2
test r15d, r15d
setne al
jmp 0x14006cbd6
mov rax, qword [0x140134e30]
lea rcx, [0x140134e30]
mov edx, r15d
call qword [rax + 0x30]
movzx esi, al
or rsi, 2
lea r13, [0x140134e30]
mov rcx, qword [r14]
cmp rcx, 0xffffffffffffffff
je 0x14006cc15
xorps xmm0, xmm0
movaps xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], 0
mov byte [rsp + 0x4f], 0
lea rdx, [rsp + 0x4f]
lea r9, [rsp + 0x50]
mov r8b, 1
call fcn.14005fa70
mov qword [r14], r12
cmp r12, 0xffffffffffffffff
je 0x14006cc96
mov eax, dword [rsp + 0xe8]
mov r8, qword [rsp + 0xe0]
mov dword [rsp + 0x50], 0
mov rsi, qword [rsp + 0xf8]
mov qword [rsp + 0x38], rsi
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], eax
mov rcx, rbx
mov rdx, r12
xor r9d, r9d
call sub.MSWSOCK.dll_AcceptEx
mov ebp, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebp, ebp
jne 0x14006ccc8
cmp eax, 0x3e5
je 0x14006ccc8
mov rbx, qword [rdi + 8]
mov dword [rsi + 0x30], 1
lea rcx, [0x140134e30]
mov qword [rsi], rcx
mov dword [rsi + 0x10], eax
mov dword [rsi + 0x14], 0
jmp 0x14006cd04
mov rbx, qword [rdi + 8]
mov r14, qword [rsp + 0xf8]
mov dword [r14 + 0x30], 1
test rsi, rsi
je 0x14006cd5b
cmp esi, 1
jne 0x14006cd62
lea r13, [0x140136090]
jmp 0x14006cd62
mov rax, qword [rsp + 0xf0]
test rax, rax
je 0x14006cceb
mfence
mov eax, dword [rax]
cmp eax, 1
jne 0x14006cceb
mov rcx, rbx
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_CancelIoEx]
mov rbx, qword [rdi + 8]
mov ecx, 1
xor eax, eax
lock cmpxchg dword [rsi + 0x30], ecx
cmp eax, 1
jne 0x14006cdd3
mov rcx, qword [rbx + 0x28]
mov r8d, 2
xor edx, edx
mov r9, rsi
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x14006cdd3
lea rdi, [rbx + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov qword [rsi + 0x20], 0
lea rax, [rbx + 0x90]
mov rcx, qword [rbx + 0x98]
lea rdx, [rcx + 0x20]
test rcx, rcx
cmove rdx, rax
mov qword [rdx], rsi
mov qword [rbx + 0x98], rsi
jmp 0x14006cdc2
lea r13, [0x140134e30]
mov qword [r14], r13
mov dword [r14 + 0x10], r15d
mov dword [r14 + 0x14], 0
mov rcx, qword [rbx + 0x28]
mov r8d, 2
xor edx, edx
mov r9, r14
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x14006cdd3
lea rdi, [rbx + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rax, [rbx + 0x90]
mov qword [r14 + 0x20], 0
mov rcx, qword [rbx + 0x98]
lea rdx, [rcx + 0x20]
test rcx, rcx
cmove rdx, rax
mov qword [rdx], r14
mov qword [rbx + 0x98], r14
mov eax, 1
xchg dword [rbx + 0x58], eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret