Function at 0x14004bb70
Capabilities:
Set socket configuration

Disassembly:
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0xa0
mov rax, qword [0x14007e040]
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 0x14004bbd3
mov rcx, qword [rcx + 8]
xor r9d, r9d
mov r8d, 0x2719
mov rdx, rdi
call fcn.14004be20
jmp 0x14004be00
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.140014ca0
cmp rbx, 0xffffffffffffffff
jne 0x14004bc9c
xor r15d, r15d
mov rcx, qword [r14]
cmp rcx, 0xffffffffffffffff
je 0x14004bc75
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.140050ad0
mov qword [r14], rbx
cmp rbx, 0xffffffffffffffff
jne 0x14004bd7f
mov rax, qword [rsp + 0x60]
mov rbx, qword [rsi + 8]
mov dword [rdi + 0x30], ebp
test rax, rax
jne 0x14004bccd
lea rax, [0x140082900]
jmp 0x14004bd19
cmp r15d, 0x17
jne 0x14004bc44
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 0x14004bc47
cmp rax, rbp
jne 0x14004bd14
mov rcx, qword [rsp + 0x58]
lea rax, [0x140082958]
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 0x14004bd20
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 0x14004bde8
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 0x14004bd62
mov qword [rax + 0x20], rdi
jmp 0x14004bd69
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 0x14004bde8
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 0x14004bddc
cmp eax, 0x3e5
je 0x14004bddc
mov rcx, qword [rsi + 8]
xor r9d, r9d
mov r8d, eax
mov rdx, rdi
call fcn.14004be20
jmp 0x14004bde8
mov rcx, qword [rsi + 8]
mov rdx, rdi
call fcn.14004beb0
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.14005f1d0
add rsp, 0xa0
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret