Function at 0x14005fa00
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 0x14005fa5e
vxorps xmm0, xmm0, xmm0
vmovaps 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.140052b60
mov qword [r14], 0xffffffffffffffff
mov r15d, dword [rsp + 0xd8]
mov r13d, dword [rsp + 0xd0]
mov rax, qword [rdi + 8]
lock inc dword [rax + 0x30]
test rsi, rsi
je 0x14005fb1a
mfence
mov eax, dword [rsi]
cmp eax, 1
jne 0x14005fb1a
mov rsi, qword [rdi + 8]
mov r9, qword [rsp + 0xf8]
mov dword [r9 + 0x30], 1
lea rax, [0x1400c1350]
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 0x14005fb1a
lea r12, [rsi + 0x60]
mov rcx, r12
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, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
xor r12d, r12d
mov ecx, ebp
mov edx, r13d
mov r8d, r15d
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x14005fb8a
mov r13d, 0
mov esi, 0
cmp ebp, 0x17
jne 0x14005fbd6
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x50]
mov rcx, r15
mov edx, 0x29
mov r8d, 0x1b
call qword [sym.imp.WS2_32.dll_setsockopt]
xor r12d, r12d
xor r13d, r13d
xor esi, esi
jmp 0x14005fbd6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r12d, eax
mov rax, qword [0x1400c1358]
shr rax, 1
movabs rcx, 0x595588bd12bf6fe8
cmp rax, rcx
jne 0x14005fbb4
test r12d, r12d
setne al
jmp 0x14005fbc8
mov rax, qword [0x1400c1350]
lea rcx, [0x1400c1350]
mov edx, r12d
call qword [rax + 0x30]
movzx esi, al
or rsi, 2
lea r13, [0x1400c1350]
mov rcx, qword [r14]
cmp rcx, 0xffffffffffffffff
je 0x14005fc09
vxorps xmm0, xmm0, xmm0
vmovaps 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.140052b60
mov qword [r14], r15
cmp r15, 0xffffffffffffffff
je 0x14005fc8a
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, r15
xor r9d, r9d
call sub.MSWSOCK.dll_AcceptEx
mov ebp, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebp, ebp
jne 0x14005fcbc
cmp eax, 0x3e5
je 0x14005fcbc
mov rbx, qword [rdi + 8]
mov dword [rsi + 0x30], 1
lea rcx, [0x1400c1350]
mov qword [rsi], rcx
mov dword [rsi + 0x10], eax
mov dword [rsi + 0x14], 0
jmp 0x14005fcf8
mov rbx, qword [rdi + 8]
mov r14, qword [rsp + 0xf8]
mov dword [r14 + 0x30], 1
test rsi, rsi
je 0x14005fd4f
cmp esi, 1
jne 0x14005fd56
lea r13, [0x1400c2e20]
jmp 0x14005fd56
mov rax, qword [rsp + 0xf0]
test rax, rax
je 0x14005fcdf
mfence
mov eax, dword [rax]
cmp eax, 1
jne 0x14005fcdf
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 0x14005fdc7
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 0x14005fdc7
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 0x14005fdb6
lea r13, [0x1400c1350]
mov qword [r14], r13
mov dword [r14 + 0x10], r12d
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 0x14005fdc7
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