Function at 0x140041950
Capabilities:
Set socket configuration

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xa8
movaps xmmword [rsp + 0x90], xmm6
mov r14, r9
mov ebp, r8d
mov rbx, rdx
mov r12, rcx
mov rsi, qword [rsp + 0x118]
mov r15, qword [rsp + 0x110]
cmp r8d, 0x17
je 0x140041996
cmp ebp, 2
jne 0x140041aaa
xor ecx, ecx
xor eax, eax
lock cmpxchg qword [r12 + 0x18], rcx
mov rdi, rax
mov qword [rsp + 0x70], rax
jne 0x140041a16
movups xmm0, xmmword [0x14013587c]
lea r8, [rsp + 0x50]
movaps xmmword [r8], xmm0
lea rax, [rsp + 0x8c]
and dword [rax], 0
mov rcx, qword [rbx]
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 8
mov edx, 0xc8000006
mov r9d, 0x10
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x140041a07
mov qword [rsp + 0x70], r12
mov rax, r12
jmp 0x140041a0c
mov rax, qword [rsp + 0x70]
xchg qword [r12 + 0x18], rax
mov rdi, qword [rsp + 0x70]
cmp rdi, r12
je 0x140041aaa
test rdi, rdi
je 0x140041aaa
cmp ebp, 2
xorps xmm0, xmm0
lea rdx, [rsp + 0x50]
movaps xmmword [rdx], xmm0
movups xmmword [rdx + 0xc], xmm0
mov word [rdx], bp
mov rcx, qword [rbx]
mov eax, 0x10
mov r8d, 0x1c
cmove r8, rax
lea r13, [rsi + 0x38]
mov r9, r13
call fcn.14003ffb1
mov ecx, dword [rsi + 0x38]
mov rdx, qword [rsi + 0x48]
call fcn.14002791a
test al, al
je 0x140041b97
lea rbp, [rsp + 0x70]
mov rcx, rbp
mov edx, 0x2726
call fcn.14003fc9a
mov rcx, r13
mov rdx, rbp
call fcn.1400406ca
test al, al
je 0x140041b97
mov rcx, qword [r12 + 8]
lock inc dword [rcx + 0x30]
mov rdx, rsi
call fcn.14003ef30
jmp 0x140041eba
xor ecx, ecx
xor eax, eax
lock cmpxchg qword [r12 + 0x10], rcx
jne 0x140041aec
mov rax, qword [r12]
mov rcx, qword [rax]
lea rdx, [rsp + 0x50]
and qword [rdx], 0
lea rax, [0x140277b21]
mov qword [rdx + 8], rax
mov r9, qword [rcx + 0x30]
lea r8, [0x1400417e8]
call fcn.14003ed36
mov rdi, rax
xchg qword [r12 + 0x10], rax
jmp 0x140041aef
mov rdi, rax
test byte [rbx + 8], 3
je 0x140041bf5
mov rcx, qword [rbx]
lea r12, [rsi + 0x38]
mov rdx, r14
mov r8, r15
mov r9, r12
call fcn.14003fff2
test eax, eax
je 0x140041c4f
lea r14, [rsp + 0x50]
mov rcx, r14
mov edx, 0x2734
call fcn.14003fc9a
mov rcx, r12
mov rdx, r14
call fcn.140030f34
test al, al
jne 0x140041b5c
lea r14, [rsp + 0x70]
mov rcx, r14
mov edx, 0x2733
call fcn.14003fc9a
mov rcx, r12
mov rdx, r14
call fcn.140030f34
test al, al
je 0x140041c4f
and qword [r12 + 0x10], 0
xorps xmm6, xmm6
movups xmmword [r12], xmm6
mov r14, qword [rbx]
lea rbx, [rdi + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
cmp byte [rdi + 0x248], 0
je 0x140041c5f
mov rcx, rdi
mov rdx, rsi
call fcn.140040464
jmp 0x140041eb0
mov r13, qword [rsp + 0x120]
mov byte [rsi + 0x70], 1
mov rax, qword [r12 + 8]
lock inc dword [rax + 0x30]
mov rcx, qword [rbx]
and qword [rsp + 0x28], 0
mov qword [rsp + 0x30], r13
and dword [rsp + 0x20], 0
mov rdx, r14
mov r8d, r15d
xor r9d, r9d
call rdi
mov esi, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [r12 + 8]
test esi, esi
jne 0x140041c35
cmp eax, 0x3e5
je 0x140041c35
mov rdx, r13
mov r8d, eax
xor r9d, r9d
call fcn.140041400
jmp 0x140041eba
mov rcx, qword [rbx]
lea r12, [rsi + 0x38]
cmp rcx, 0xffffffffffffffff
je 0x140041c42
lea r8, [rsp + 0x50]
mov dword [r8], 1
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov ebp, eax
mov edx, eax
shr edx, 0x1f
mov rcx, r12
call fcn.14003fcd0
test ebp, ebp
js 0x140041c4f
or byte [rbx + 8], 2
jmp 0x140041af9
mov rdx, r13
call fcn.140041496
jmp 0x140041eba
mov rcx, r12
mov edx, 0x2719
call fcn.14003ddc2
mov rcx, rdi
mov rdx, rsi
call fcn.140040464
jmp 0x140041eba
movaps xmmword [rsp + 0x70], xmm6
mov qword [rsp + 0x50], r14
movups xmmword [rsp + 0x58], xmm6
mov rax, qword [rdi + 0x160]
mov r8, qword [rdi + 0x1a0]
inc rax
cmp rax, r8
jb 0x140041dc2
mov rcx, 0xffffffffffffffff
lea rdx, [0x140135900]
cmp rcx, 0x15
je 0x140041cb1
mov r13, qword [rdx]
inc rcx
add rdx, 8
cmp r13, rax
jbe 0x140041c96
cmp rcx, 0x16
jb 0x140041cb7
mov r13d, 0x1800013
cmp r8, r13
je 0x140041dc2
lea r14, [rdi + 0x168]
mov rax, r13
shr rax, 0x3c
mov r15, r13
shl r15, 4
xor ebp, ebp
neg rax
mov ecx, 0
sbb rcx, rcx
or rcx, r15
call fcn.14003b770
mov r12, rax
mov rcx, rax
xor edx, edx
mov r8, r15
call sub.msvcrt.dll_memset
mov rcx, qword [rdi + 0x198]
call sub.msvcrt.dll_free
mov qword [rdi + 0x198], r12
mov qword [rdi + 0x1a0], r13
sub r13, 1
jb 0x140041d37
mov rax, qword [rdi + 0x198]
mov qword [rax + rbp + 8], r14
mov rax, qword [rdi + 0x198]
mov qword [rax + rbp], r14
add rbp, 0x10
jmp 0x140041d14
mov r12, qword [rdi + 0x170]
cmp r12, r14
je 0x140041db6
mov r9, r12
mov rax, qword [r12 + 0x10]
xor edx, edx
div qword [rdi + 0x1a0]
mov r15, rdx
mov rax, qword [rdi + 0x198]
shl r15, 4
add rax, r15
add rax, 8
mov rcx, qword [rax]
cmp rcx, r14
je 0x140041da2
mov rdx, qword [rcx + 8]
mov qword [rax], rdx
mov r12, qword [r9 + 8]
cmp rdx, r9
je 0x140041d3e
mov rcx, r14
mov r8, r14
call fcn.14003fc64
mov rax, qword [rdi + 0x198]
mov rcx, qword [rax + r15 + 8]
mov rcx, qword [rcx]
mov qword [rax + r15 + 8], rcx
jmp 0x140041d3e
mov r12, qword [r9 + 8]
mov qword [rax], r9
mov rax, qword [rdi + 0x198]
mov qword [rax + r15], r9
jmp 0x140041d3e
mov r8, qword [rdi + 0x1a0]
mov r14, qword [rsp + 0x50]
lea rcx, [rdi + 0x160]
lea r15, [rsp + 0x58]
mov rax, r14
xor edx, edx
div r8
mov r13, rdx
mov rax, qword [rdi + 0x198]
shl r13, 4
mov r12, qword [rax + r13]
lea rdx, [rdi + 0x168]
cmp rdx, r12
je 0x140041e10
mov rax, qword [rax + r13 + 8]
mov rdx, qword [rax + 8]
cmp r12, rdx
je 0x140041e36
cmp qword [r12 + 0x10], r14
je 0x140041e63
mov r12, qword [r12 + 8]
jmp 0x140041dfd
lea r8, [rsp + 0x50]
mov rdx, r12
call fcn.1400403f4
mov rcx, qword [rdi + 0x198]
mov qword [rcx + r13 + 8], rax
mov rcx, qword [rdi + 0x198]
mov qword [rcx + r13], rax
jmp 0x140041e4c
lea r8, [rsp + 0x50]
call fcn.1400403f4
mov rcx, qword [rdi + 0x198]
mov qword [rcx + r13 + 8], rax
inc qword [rdi + 0x160]
mov rax, qword [rdi + 0x198]
mov r12, qword [rax + r13 + 8]
xor ebp, ebp
jmp 0x140041e66
mov bpl, 1
mov rcx, r15
call fcn.14003fc3a
lea rcx, [rsp + 0x70]
call fcn.14003fc3a
lea rax, [r12 + 0x18]
and qword [rsi + 0x20], 0
mov rcx, qword [r12 + 0x20]
lea rdx, [rcx + 0x20]
test rcx, rcx
cmove rdx, rax
mov qword [rdx], rsi
mov qword [r12 + 0x20], rsi
mov rax, qword [rdi + 0x28]
lock inc dword [rax + 0x30]
test bpl, bpl
jne 0x140041eb0
mov rcx, qword [rdi + 0x60]
call fcn.1400402ae
mov rcx, rbx
mov dl, 1
call fcn.14003e152
movaps xmm6, xmmword [rsp + 0x90]
add rsp, 0xa8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret