Function at 0x140230250
Capabilities:
Encode data using xor
Encrypt data using salsa20 or chacha

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov rdi, rdx
mov esi, ecx
cmp byte [reloc.WS2_32.dll_accept], 0
je 0x1402306dd
mov rax, qword [0x1403f3968]
mov ecx, 5
call qword [case.0x140318756.0]
mov rbx, rax
test rax, rax
sete bpl
je 0x1402306f2
mov rax, qword [0x1403f3978]
mov rcx, rbx
call qword [case.0x140318756.0]
test esi, esi
jle 0x1402306ce
test rdi, rdi
je 0x1402306ce
xor ebp, ebp
cmp dword [0x14043f7b8], 0
je 0x14023061a
mov al, byte [0x14043f838]
movzx ecx, al
cmp ecx, esi
jb 0x140230326
sub ecx, esi
movsxd rax, ecx
lea rcx, [0x14043f7b8]
lea rdx, [rax + rcx]
add rdx, 0x40
cmp esi, 4
jne 0x14023071a
mov eax, dword [rdx]
mov dword [rdi], eax
sub byte [0x14043f838], sil
test bpl, bpl
jne 0x140230709
mov rax, qword [0x1403f3988]
mov rdx, qword [case.0x140318756.0]
mov rcx, rbx
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp rdx
mov qword [rsp + 0x40], rbx
mov dword [rsp + 0x2c], ebp
test al, al
jne 0x14023072a
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x28], esi
mov eax, dword [0x14043f7e8]
inc eax
mov dword [0x14043f7e8], eax
mov r9d, dword [0x14043f7b8]
mov esi, dword [0x14043f7bc]
mov ebx, dword [0x14043f7c0]
mov ebp, dword [0x14043f7c4]
mov edi, dword [0x14043f7c8]
mov r14d, dword [0x14043f7cc]
mov r13d, dword [0x14043f7d0]
mov r12d, dword [0x14043f7d4]
mov r15d, dword [0x14043f7d8]
mov r10d, dword [0x14043f7dc]
mov ecx, dword [0x14043f7e0]
mov dword [rsp + 0x20], ecx
mov ecx, dword [0x14043f7e4]
mov dword [rsp + 0x24], ecx
mov r8d, dword [0x14043f7ec]
mov edx, dword [0x14043f7f0]
mov dword [rsp + 0x30], 0xa
mov ecx, dword [0x14043f7f4]
add r9d, edi
xor eax, r9d
rol eax, 0x10
add r15d, eax
xor edi, r15d
rol edi, 0xc
add r9d, edi
xor eax, r9d
rol eax, 8
add r15d, eax
xor edi, r15d
rol edi, 7
add esi, r14d
xor r8d, esi
rol r8d, 0x10
add r10d, r8d
xor r14d, r10d
rol r14d, 0xc
add esi, r14d
xor r8d, esi
rol r8d, 8
add r10d, r8d
mov dword [rsp + 0x34], r10d
xor r14d, r10d
rol r14d, 7
add ebx, r13d
xor edx, ebx
rol edx, 0x10
mov r11d, dword [rsp + 0x20]
add r11d, edx
xor r13d, r11d
rol r13d, 0xc
add ebx, r13d
xor edx, ebx
rol edx, 8
add r11d, edx
xor r13d, r11d
rol r13d, 7
add ebp, r12d
xor ecx, ebp
rol ecx, 0x10
mov r10d, dword [rsp + 0x24]
add r10d, ecx
xor r12d, r10d
rol r12d, 0xc
add ebp, r12d
xor ecx, ebp
rol ecx, 8
add r10d, ecx
xor r12d, r10d
rol r12d, 7
add r9d, r14d
xor ecx, r9d
rol ecx, 0x10
add r11d, ecx
xor r14d, r11d
rol r14d, 0xc
add r9d, r14d
xor ecx, r9d
rol ecx, 8
add r11d, ecx
mov dword [rsp + 0x20], r11d
xor r14d, r11d
rol r14d, 7
add esi, r13d
xor eax, esi
rol eax, 0x10
add r10d, eax
xor r13d, r10d
rol r13d, 0xc
add esi, r13d
xor eax, esi
rol eax, 8
add r10d, eax
mov dword [rsp + 0x24], r10d
xor r13d, r10d
rol r13d, 7
add ebx, r12d
xor r8d, ebx
rol r8d, 0x10
add r15d, r8d
xor r12d, r15d
rol r12d, 0xc
add ebx, r12d
xor r8d, ebx
rol r8d, 8
add r15d, r8d
xor r12d, r15d
rol r12d, 7
add ebp, edi
xor edx, ebp
rol edx, 0x10
mov r11d, dword [rsp + 0x34]
add r11d, edx
xor edi, r11d
rol edi, 0xc
add ebp, edi
xor edx, ebp
rol edx, 8
add r11d, edx
mov r10d, r11d
xor edi, r11d
rol edi, 7
dec dword [rsp + 0x30]
jne 0x1402303bf
add r9d, dword [0x14043f7b8]
mov dword [0x14043f7f8], r9d
add esi, dword [0x14043f7bc]
mov dword [0x14043f7fc], esi
add ebx, dword [0x14043f7c0]
mov dword [0x14043f800], ebx
add ebp, dword [0x14043f7c4]
mov dword [0x14043f804], ebp
add edi, dword [0x14043f7c8]
mov dword [0x14043f808], edi
add r14d, dword [0x14043f7cc]
mov dword [0x14043f80c], r14d
add r13d, dword [0x14043f7d0]
mov dword [0x14043f810], r13d
add r12d, dword [0x14043f7d4]
mov dword [0x14043f814], r12d
add r15d, dword [0x14043f7d8]
mov dword [0x14043f818], r15d
add r10d, dword [0x14043f7dc]
mov dword [0x14043f81c], r10d
mov r9d, dword [rsp + 0x20]
add r9d, dword [0x14043f7e0]
mov dword [0x14043f820], r9d
mov r9d, dword [rsp + 0x24]
add r9d, dword [0x14043f7e4]
mov dword [0x14043f824], r9d
add eax, dword [0x14043f7e8]
mov dword [0x14043f828], eax
add r8d, dword [0x14043f7ec]
mov dword [0x14043f82c], r8d
add edx, dword [0x14043f7f0]
mov dword [0x14043f830], edx
add ecx, dword [0x14043f7f4]
mov dword [0x14043f834], ecx
mov byte [0x14043f838], 0x40
mov ecx, 0x40
mov al, 0x40
mov esi, dword [rsp + 0x28]
cmp esi, 0x40
mov rdi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x40]
mov ebp, dword [rsp + 0x2c]
jle 0x1402302d1
jmp 0x14023032f
cmp byte [reloc.WS2_32.dll_accept], 0
je 0x140230757
mov rax, qword [0x1403f3968]
mov ecx, 2
call qword [case.0x140318756.0]
test rax, rax
je 0x140230757
mov r15, rax
mov rax, qword [0x1403f3978]
mov rcx, r15
call qword [case.0x140318756.0]
mov r14, qword [0x14043f790]
mov rax, qword [0x1403f3988]
mov rcx, r15
call qword [case.0x140318756.0]
movaps xmm0, xmmword [str.expand_32_byte_k]
movups xmmword [0x14043f7b8], xmm0
test r14, r14
je 0x140230763
mov eax, dword [0x1403f3aa8]
test eax, eax
jne 0x14023077d
mov rax, qword [r14 + 0x68]
lea r8, [0x14043f7c8]
mov rcx, r14
mov edx, 0x2c
call qword [case.0x140318756.0]
mov eax, dword [0x14043f7e8]
mov dword [0x14043f7f4], eax
mov dword [0x14043f7e8], 0
mov byte [0x14043f838], 0
xor eax, eax
jmp 0x1402302ca
mov dword [0x14043f7b8], 0
jmp 0x140230302
test esi, esi
jle 0x1402306ff
test rdi, rdi
je 0x1402306ff
mov eax, esi
xor ebx, ebx
mov bpl, 1
jmp 0x1402302b7
test esi, esi
jle 0x1402306ff
test rdi, rdi
jne 0x1402302b7
mov dword [0x14043f7b8], 0
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
movsxd r8, esi
mov rcx, rdi
call fcn.14031b320
jmp 0x1402302f2
movzx r8d, al
mov rcx, rdi
lea rdx, [0x14043f7f8]
call fcn.14031b320
movzx eax, byte [0x14043f838]
sub esi, eax
mov dword [rsp + 0x28], esi
add rdi, rax
mov qword [rsp + 0x38], rdi
jmp 0x140230340
mov r14, qword [0x14043f790]
jmp 0x14023066c
xorps xmm0, xmm0
movups xmmword [0x14043f7e4], xmm0
movups xmmword [0x14043f7d8], xmm0
movups xmmword [0x14043f7c8], xmm0
jmp 0x14023079f
xorps xmm0, xmm0
movups xmmword [0x14043f7dc], xmm0
movups xmmword [0x14043f7cc], xmm0
mov qword [0x14043f7ec], 0
mov dword [0x14043f7c8], eax
xor eax, eax
jmp 0x1402306b0