Function at 0x14004af30
Capabilities:
Set socket configuration

Disassembly:
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0xa0
mov rax, qword [0x14007d040]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov r13, qword [rsp + 0x108]
mov r14, r9
mov rdi, qword [rsp + 0x118]
mov r12, rdx
mov rax, qword [rcx + 8]
mov rsi, rcx
lock inc dword [rax + 0x30]
cmp qword [rdx], 0xffffffffffffffff
jne 0x14004af93
mov rcx, qword [rcx + 8]
xor r9d, r9d
mov r8d, 0x2719
mov rdx, rdi
call fcn.14004b1e0
jmp 0x14004b1c0
mov r8d, dword [rsp + 0x100]
xor eax, eax
mov edx, dword [rsp + 0xf8]
xorps xmm0, xmm0
mov qword [rsp + 0xe0], rbx
xor r9d, r9d
mov qword [rsp + 0x98], rbp
mov ebp, 1
mov qword [rsp + 0x90], r15
mov r15d, dword [rsp + 0xf0]
mov ecx, r15d
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], eax
movups xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], rax
call qword [sym.imp.WS2_32.dll_WSASocketW]
cmp rax, 0xffffffffffffffff
lea rcx, [rsp + 0x50]
mov rbx, rax
sete dl
call fcn.140014e40
cmp rbx, 0xffffffffffffffff
jne 0x14004b05c
xor r15d, r15d
mov rcx, qword [r14]
cmp rcx, 0xffffffffffffffff
je 0x14004b035
xorps xmm0, xmm0
mov qword [rsp + 0x78], r15
lea r9, [rsp + 0x68]
mov byte [rsp + 0x40], 0
movzx r8d, bpl
lea rdx, [rsp + 0x40]
movups xmmword [rsp + 0x68], xmm0
call fcn.14004fe70
mov qword [r14], rbx
cmp rbx, 0xffffffffffffffff
jne 0x14004b13f
mov rax, qword [rsp + 0x60]
mov rbx, qword [rsi + 8]
mov dword [rdi + 0x30], ebp
test rax, rax
jne 0x14004b08d
lea rax, [0x140081920]
jmp 0x14004b0d9
cmp r15d, 0x17
jne 0x14004b004
xor r15d, r15d
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x44]
mov dword [rsp + 0x44], r15d
mov rcx, rbx
lea edx, [r15 + 0x29]
lea r8d, [r15 + 0x1b]
call qword [sym.imp.WS2_32.dll_setsockopt]
jmp 0x14004b007
cmp rax, rbp
jne 0x14004b0d4
mov rcx, qword [rsp + 0x58]
lea rax, [0x140081978]
mov qword [rdi], rax
movabs rax, 0x4800144005b3
mul rcx
mov rax, rcx
sub rax, rdx
shr rax, 1
add rax, rdx
shr rax, 0x14
imul rax, rax, 0x1ffff7
sub rcx, rax
imul eax, ecx, 0x3e8
add eax, dword [rsp + 0x50]
jmp 0x14004b0e0
mov rax, qword [rsp + 0x58]
mov qword [rdi], rax
mov eax, dword [rsp + 0x50]
xor edx, edx
mov dword [rdi + 0x10], eax
mov dword [rdi + 0x14], r15d
mov r9, rdi
mov rcx, qword [rbx + 0x28]
lea r8d, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x14004b1a8
lea rcx, [rbx + 0x60]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov qword [rdi + 0x20], r15
mov rax, qword [rbx + 0x98]
test rax, rax
je 0x14004b122
mov qword [rax + 0x20], rdi
jmp 0x14004b129
mov qword [rbx + 0x90], rdi
mov qword [rbx + 0x98], rdi
lea rcx, [rbx + 0x60]
xchg dword [rbx + 0x58], ebp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14004b1a8
mov rcx, qword [r12]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x38], rdi
xor r9d, r9d
mov qword [rsp + 0x30], rax
mov r8, r13
mov eax, dword [rsp + 0x110]
mov rdx, rbx
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], eax
mov dword [rsp + 0x48], r15d
call qword [sym.imp.MSWSOCK.dll_AcceptEx]
mov ebx, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebx, ebx
jne 0x14004b19c
cmp eax, 0x3e5
je 0x14004b19c
mov rcx, qword [rsi + 8]
xor r9d, r9d
mov r8d, eax
mov rdx, rdi
call fcn.14004b1e0
jmp 0x14004b1a8
mov rcx, qword [rsi + 8]
mov rdx, rdi
call fcn.14004b270
mov rbp, qword [rsp + 0x98]
mov rbx, qword [rsp + 0xe0]
mov r15, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14005e550
add rsp, 0xa0
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret