Function at 0x14018e800
Capabilities:
Set socket configuration

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov rdi, rdx
mov rsi, rcx
mov eax, dword [rdx + 0xf0]
cmp eax, 0x3b9aca00
jne 0x14018e88d
mov r14, qword [rdi + 0xb0]
mov rax, qword [rdi + 0xc0]
mov rbx, qword [rdi + 0xc8]
cmp rax, rbx
jb 0x14018ea64
mov rax, qword [rdi + 0xb8]
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 0
mov rax, qword [rdi + 0xd0]
mov qword [rsp + 0x40], rax
mov rcx, qword [rdi + 0xd8]
mov rax, qword [rdi + 0xe0]
lea rdx, [rsp + 0x28]
xor r8d, r8d
call qword [rax + 0x48]
test rax, rax
je 0x14018ea46
mov rbx, rax
jmp 0x14018ea7b
mov rcx, qword [rdi + 0xe8]
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x50], eax
call fcn.1401482e0
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x30], edx
lea rcx, [rsp + 0x48]
lea rdx, [rsp + 0x28]
call fcn.1401483c0
cmp edx, 0x3b9aca00
jne 0x14018e91b
movzx eax, byte [0x141af8129]
mov edx, 0x1a
xor ecx, ecx
call fcn.140146820
test rax, rax
je 0x14018eb6c
movups xmm0, xmmword [0x141a9f3c9]
movups xmmword [rax + 0xa], xmm0
movups xmm0, xmmword [0x141a9f3bf]
movups xmmword [rax], xmm0
mov qword [rsp + 0x28], 0x1a
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 0x1a
lea rdx, [rsp + 0x28]
mov cl, 0x16
call fcn.1401a45f0
jmp 0x14018eb54
mov ebp, edx
mov r14, rax
mov rcx, qword [rdi + 0xd8]
mov rax, qword [rdi + 0xe0]
call qword [rax + 0xb8]
test rax, rax
je 0x14018e81f
mov rbx, rax
mov ecx, 0x3e8
mov rax, r14
mul rcx
mov r14, rax
seto r15b
mov eax, 0xffffffff
jo 0x14018e99b
mov ecx, ebp
imul rcx, rcx, 0x431bde83
shr rcx, 0x32
add rcx, r14
jb 0x14018e99b
imul edx, ebp, 0x68c26139
ror edx, 6
xor r8d, r8d
cmp edx, 0x10c7
setae r8b
add rcx, r8
jb 0x14018e99b
mov eax, 0xffffffff
cmp rcx, rax
cmovb rax, rcx
test rax, rax
je 0x14018eb4d
mov dword [rsp + 0x28], eax
mov rcx, qword [rbx]
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x28]
mov edx, 0xffff
mov r8d, 0x1006
call sub.ws2_32.dll_setsockopt
cmp eax, 0xffffffff
je 0x14018ea34
mov eax, 0xffffffff
test r15b, r15b
jne 0x14018ea07
mov ecx, ebp
imul rcx, rcx, 0x431bde83
shr rcx, 0x32
add r14, rcx
jb 0x14018ea07
imul ecx, ecx, 0xf4240
xor edx, edx
sub ebp, ecx
setne dl
add r14, rdx
jb 0x14018ea07
mov eax, 0xffffffff
cmp r14, rax
cmovb rax, r14
test rax, rax
je 0x14018eb4d
mov dword [rsp + 0x28], eax
mov rcx, qword [rbx]
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x28]
mov edx, 0xffff
mov r8d, 0x1005
call sub.ws2_32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x14018e81f
call sub.ws2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
jmp 0x14018eb54
mov qword [rdi + 0xc0], 0
mov rbx, qword [rsp + 0x38]
movups xmm0, xmmword [rsp + 0x38]
movups xmmword [rdi + 0xc8], xmm0
xor eax, eax
sub rbx, rax
test r14, r14
je 0x14018ea7b
add r14, rax
mov qword [rsi], r14
mov qword [rsi + 8], rbx
jmp 0x14018eb5f
mov rcx, rbx
call fcn.140149740
mov ecx, eax
mov rax, rbx
cmp cl, 0xd
jne 0x14018eb54
movzx eax, byte [0x141af8129]
mov edx, 0x1a
xor ecx, ecx
call fcn.140146820
test rax, rax
je 0x14018eb6c
movups xmm0, xmmword [0x141a9f3c9]
movups xmmword [rax + 0xa], xmm0
movups xmm0, xmmword [0x141a9f3bf]
movups xmmword [rax], xmm0
mov qword [rsp + 0x28], 0x1a
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 0x1a
lea rdx, [rsp + 0x28]
mov cl, 0x16
call fcn.1401a45f0
mov ecx, ebx
and ecx, 3
lea rdx, [rcx - 2]
cmp rdx, 2
jb 0x14018eb54
test rcx, rcx
je 0x14018eb54
mov r14, rax
mov rdi, qword [rbx - 1]
mov r15, qword [rbx + 7]
mov rax, qword [r15]
test rax, rax
je 0x14018eb11
mov rcx, rdi
call rax
dec rbx
cmp qword [r15 + 8], 0
je 0x14018eb37
cmp qword [r15 + 0x10], 0x11
jb 0x14018eb26
mov rdi, qword [rdi - 8]
mov rcx, qword [0x141af8068]
xor edx, edx
mov r8, rdi
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [0x141af8068]
xor edx, edx
mov r8, rbx
call sub.KERNEL32.dll_HeapFree
mov rax, r14
jmp 0x14018eb54
lea rax, [0x141a7b1c0]
mov qword [rsi + 8], rax
mov qword [rsi], 0
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
ud2