Function at 0x14006ba70
Capabilities:
Set socket configuration

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x78
mov rbx, r9
mov rsi, qword [rsp + 0x108]
mov r13d, dword [rsp + 0x100]
mov rdi, qword [rsp + 0xf8]
mov eax, dword [rsp + 0xf0]
mov r9d, dword [rsp + 0xe8]
mov ebp, dword [rsp + 0xe0]
mov r10, qword [rcx + 8]
lock inc dword [r10 + 0x30]
cmp qword [rdx], 0xffffffffffffffff
je 0x14006bae4
test r8b, r8b
je 0x14006bb2f
mov rbx, qword [rcx + 8]
mov dword [rsi + 0x30], 1
lea rax, [0x140134e30]
mov qword [rsi], rax
mov qword [rsi + 0x10], 1
jmp 0x14006bb01
mov rbx, qword [rcx + 8]
mov dword [rsi + 0x30], 1
lea rax, [0x140134e30]
mov qword [rsi], rax
mov qword [rsi + 0x10], 0x2719
mov rcx, qword [rbx + 0x28]
mov r8d, 2
xor edx, edx
mov r9, rsi
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
je 0x14006bbb3
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov r14, rdx
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
mov ecx, ebp
mov edx, r9d
mov r8d, eax
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x14006bc0d
mov eax, 0
mov r15d, 0
cmp ebp, 0x17
mov ebp, 0
jne 0x14006bc57
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 ebp, ebp
xor eax, eax
xor r15d, r15d
jmp 0x14006bc57
lea rdi, [rbx + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rax, [rbx + 0x90]
mov qword [rsi + 0x20], 0
mov rcx, qword [rbx + 0x98]
lea rdx, [rcx + 0x20]
test rcx, rcx
cmove rdx, rax
mov qword [rdx], rsi
mov qword [rbx + 0x98], rsi
mov eax, 1
xchg dword [rbx + 0x58], eax
mov rcx, rdi
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
mov rax, qword [0x140134e38]
shr rax, 1
movabs rcx, 0x595588bd12bf6fe8
cmp rax, rcx
jne 0x14006bc35
test ebp, ebp
setne al
jmp 0x14006bc48
mov rax, qword [0x140134e30]
lea rcx, [0x140134e30]
mov edx, ebp
call qword [rax + 0x30]
movzx r15d, al
or r15, 2
lea rax, [0x140134e30]
mov qword [rsp + 0x70], rbp
mov rbp, rax
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x14006bc90
xorps xmm0, xmm0
movaps xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], 0
mov byte [rsp + 0x47], 0
lea rdx, [rsp + 0x47]
lea r9, [rsp + 0x50]
mov r8b, 1
call fcn.14005fa70
mov qword [rbx], r12
cmp r12, 0xffffffffffffffff
je 0x14006bd04
mov dword [rsp + 0x50], 0
mov rcx, qword [r14]
mov qword [rsp + 0x38], rsi
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r13d
mov rdx, r12
mov r8, rdi
xor r9d, r9d
call sub.MSWSOCK.dll_AcceptEx
mov edi, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rsp + 0x48]
mov rbx, qword [rcx + 8]
test edi, edi
jne 0x14006bd28
cmp eax, 0x3e5
je 0x14006bd28
mov dword [rsi + 0x30], 1
lea rcx, [0x140134e30]
mov qword [rsi], rcx
mov dword [rsi + 0x10], eax
mov dword [rsi + 0x14], 0
jmp 0x14006bd3d
mov rax, qword [rsp + 0x48]
mov rbx, qword [rax + 8]
mov dword [rsi + 0x30], 1
test r15, r15
je 0x14006bd78
cmp r15d, 1
jne 0x14006bd7f
lea rbp, [0x140136090]
jmp 0x14006bd7f
mov ecx, 1
xor eax, eax
lock cmpxchg dword [rsi + 0x30], ecx
cmp eax, 1
jne 0x14006bb1e
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 0x14006bb1e
lea rdi, [rbx + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov qword [rsi + 0x20], 0
lea rax, [rbx + 0x90]
jmp 0x14006bdca
lea rbp, [0x140134e30]
mov qword [rsi], rbp
mov rax, qword [rsp + 0x70]
mov dword [rsi + 0x10], eax
mov dword [rsi + 0x14], 0
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 0x14006bb1e
lea rdi, [rbx + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rax, [rbx + 0x90]
mov qword [rsi + 0x20], 0
mov rcx, qword [rbx + 0x98]
lea rdx, [rcx + 0x20]
test rcx, rcx
cmove rdx, rax
mov qword [rdx], rsi
mov qword [rbx + 0x98], rsi
mov eax, 1
xchg dword [rbx + 0x58], eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14006bb1e