Function at 0x1801fa480
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
push rbx
sub rsp, 0x280
mov rbx, r8
mov r11, rcx
test r8b, 1
jne 0x1801faf97
mov r10d, dword [rdx + 0x30]
mov r9d, r10d
mov qword [rax + 0x18], rdi
not r9d
movaps xmmword [rax - 0x18], xmm6
xor edi, edi
movaps xmmword [rax - 0x28], xmm7
cmp r9d, 3
movaps xmmword [rax - 0x38], xmm8
mov r8d, edi
movaps xmmword [rax - 0x48], xmm9
setb r8b
movaps xmmword [rax - 0x58], xmm10
cmp r9d, 2
movaps xmmword [rax - 0x68], xmm11
mov ecx, edi
movdqa xmm11, xmmword [0x18037e250]
setb cl
movaps xmmword [rax - 0x78], xmm12
cmp r9d, 1
movaps xmmword [rax - 0x88], xmm13
movaps xmmword [rax - 0x98], xmm14
movaps xmmword [rax - 0xa8], xmm15
mov eax, edi
setb al
movd xmm10, edi
movd xmm1, r8d
movd xmm2, ecx
punpckldq xmm2, xmm1
movd xmm0, eax
punpckldq xmm10, xmm0
movd xmm0, dword [rdx]
pshufd xmm0, xmm0, 0
movdqa xmmword [rsp + 0x130], xmm0
movdqa xmm15, xmm0
movd xmm0, dword [rdx + 4]
pshufd xmm0, xmm0, 0
movdqa xmmword [rsp + 0x140], xmm0
movdqa xmm7, xmm0
movd xmm0, dword [rdx + 8]
pshufd xmm0, xmm0, 0
movdqa xmmword [rsp + 0xc0], xmm0
movdqa xmm9, xmm0
movd xmm0, dword [rdx + 0xc]
pshufd xmm0, xmm0, 0
movdqa xmmword [rsp + 0x150], xmm0
movdqa xmm8, xmm0
movd xmm0, dword [rdx + 0x10]
pshufd xmm0, xmm0, 0
movdqa xmmword [rsp + 0x160], xmm0
movdqa xmm12, xmm0
movd xmm0, dword [rdx + 0x14]
pshufd xmm0, xmm0, 0
movdqa xmmword [rsp + 0x170], xmm0
movdqa xmm14, xmm0
movdqa xmmword [rsp + 0x60], xmm0
movd xmm0, dword [rdx + 0x18]
pshufd xmm0, xmm0, 0
movdqa xmmword [rsp + 0x180], xmm0
movdqa xmm13, xmm0
movd xmm0, dword [rdx + 0x1c]
pshufd xmm0, xmm0, 0
movdqa xmmword [rsp + 0x190], xmm0
movdqa xmmword [rsp + 0x70], xmm0
movd xmm0, dword [rdx + 0x20]
pshufd xmm0, xmm0, 0
movdqa xmmword [rsp + 0x1a0], xmm0
movdqa xmm1, xmm0
movd xmm0, dword [rdx + 0x24]
pshufd xmm0, xmm0, 0
movdqa xmmword [rsp + 0x1b0], xmm0
movdqa xmmword [rsp + 0x30], xmm0
movd xmm0, dword [rdx + 0x28]
pshufd xmm0, xmm0, 0
movdqa xmmword [rsp + 0x1c0], xmm0
movdqa xmm3, xmm0
movd xmm0, dword [rdx + 0x2c]
pshufd xmm0, xmm0, 0
punpcklqdq xmm10, xmm2
movdqa xmmword [rsp + 0x1d0], xmm0
movdqa xmmword [rsp + 0x110], xmm10
shr rbx, 1
movd xmm5, dword [rdx + 0x3c]
mov rdi, qword [rsp + 0x2a0]
movdqa xmmword [rsp + 0x40], xmm0
pshufd xmm5, xmm5, 0
movd xmm0, r10d
movdqa xmm6, xmm5
pshufd xmm0, xmm0, 0
movdqa xmm2, xmm0
movdqa xmmword [rsp + 0xd0], xmm0
movd xmm0, dword [rdx + 0x34]
paddd xmm2, xmm11
pshufd xmm0, xmm0, 0
movdqa xmm4, xmm0
movdqa xmmword [rsp + 0xe0], xmm0
movd xmm0, dword [rdx + 0x38]
paddd xmm4, xmm10
pshufd xmm0, xmm0, 0
movdqa xmmword [rsp + 0xa0], xmm0
movdqa xmmword [rsp + 0x100], xmm0
movdqa xmmword [rsp + 0xf0], xmm4
movdqa xmmword [rsp + 0x120], xmm5
movdqa xmmword [rsp + 0x80], xmm5
je 0x1801fac8f
movdqa xmm11, xmm14
movdqa xmm14, xmmword [rsp + 0x70]
nop dword [rax]
nop word [rax + rax]
movdqa xmm0, xmmword [rsp + 0xf0]
paddd xmm15, xmm12
movdqa xmm10, xmmword [rsp + 0x100]
xorps xmm2, xmm15
movdqa xmm4, xmm11
movdqa xmm5, xmm13
paddd xmm4, xmm7
paddd xmm5, xmm9
movdqa xmm7, xmmword [rsp + 0x80]
xorps xmm0, xmm4
xorps xmm10, xmm5
movdqa xmm6, xmm14
paddd xmm6, xmm8
movdqa xmm9, xmm10
movdqa xmm8, xmm0
psrld xmm10, 0x10
psrld xmm0, 0x10
xorps xmm7, xmm6
movdqa xmmword [rsp + 0x80], xmm7
movdqa xmm7, xmm2
psrld xmm2, 0x10
pslld xmm8, 0x10
orps xmm8, xmm0
pslld xmm9, 0x10
movdqa xmm0, xmmword [rsp + 0x80]
orps xmm9, xmm10
movdqa xmm10, xmm0
pslld xmm7, 0x10
orps xmm7, xmm2
psrld xmm0, 0x10
pslld xmm10, 0x10
movdqa xmm2, xmm9
paddd xmm2, xmm3
orps xmm10, xmm0
movdqa xmmword [rsp + 0x80], xmm2
movdqa xmm0, xmm7
paddd xmm0, xmm1
xorps xmm2, xmm13
movdqa xmmword [rsp + 0x70], xmm0
movdqa xmm13, xmm2
xorps xmm0, xmm12
pslld xmm2, 0xc
movdqa xmm1, xmm8
psrld xmm13, 0x14
paddd xmm1, xmmword [rsp + 0x30]
orps xmm13, xmm2
movdqa xmmword [rsp + 0x60], xmm1
movdqa xmm3, xmm10
paddd xmm3, xmmword [rsp + 0x40]
xorps xmm1, xmm11
movdqa xmm11, xmm0
movdqa xmmword [rsp + 0x30], xmm3
xorps xmm3, xmm14
pslld xmm0, 0xc
movdqa xmm12, xmm1
psrld xmm11, 0x14
movdqa xmm14, xmm3
pslld xmm1, 0xc
pslld xmm3, 0xc
orps xmm11, xmm0
psrld xmm12, 0x14
movdqa xmm0, xmm11
orps xmm12, xmm1
psrld xmm14, 0x14
orps xmm14, xmm3
paddd xmm0, xmm15
movdqa xmm2, xmm12
xorps xmm7, xmm0
paddd xmm2, xmm4
movdqa xmm1, xmm13
paddd xmm1, xmm5
movdqa xmmword [rsp + 0x90], xmm2
movdqa xmm3, xmm14
movdqa xmmword [rsp + 0x40], xmm1
paddd xmm3, xmm6
movdqa xmm4, xmm7
psrld xmm4, 0x18
xorps xmm8, xmm2
movdqa xmmword [rsp + 0x50], xmm3
xorps xmm9, xmm1
xorps xmm10, xmm3
movdqa xmm2, xmmword [rsp + 0x80]
movdqa xmm3, xmm8
movdqa xmm6, xmmword [rsp + 0x70]
movdqa xmm1, xmm10
movdqa xmm5, xmmword [rsp + 0x30]
movdqa xmm15, xmm9
pslld xmm7, 8
orps xmm4, xmm7
psrld xmm3, 0x18
movdqa xmm7, xmmword [rsp + 0x60]
paddd xmm6, xmm4
xorps xmm11, xmm6
movdqa xmmword [rsp + 0x70], xmm6
movdqa xmm6, xmmword [rsp + 0x40]
pslld xmm8, 8
orps xmm3, xmm8
psrld xmm1, 0x18
paddd xmm7, xmm3
pslld xmm10, 8
orps xmm1, xmm10
psrld xmm15, 0x18
movdqa xmm10, xmmword [rsp + 0x90]
paddd xmm5, xmm1
xorps xmm14, xmm5
movdqa xmmword [rsp + 0x30], xmm5
xorps xmm12, xmm7
pslld xmm9, 8
orps xmm15, xmm9
movdqa xmmword [rsp + 0x60], xmm7
paddd xmm2, xmm15
movdqa xmm5, xmm11
xorps xmm13, xmm2
psrld xmm5, 0x19
movdqa xmmword [rsp + 0x80], xmm2
movdqa xmm7, xmm12
pslld xmm11, 7
movdqa xmm2, xmm13
orps xmm5, xmm11
psrld xmm7, 0x19
movdqa xmm11, xmmword [rsp + 0x50]
movdqa xmm8, xmm14
paddd xmm11, xmm5
movdqa xmmword [rsp + 0xb0], xmm5
xorps xmm15, xmm11
pslld xmm12, 7
orps xmm7, xmm12
psrld xmm2, 0x19
pslld xmm13, 7
movdqa xmm9, xmm7
paddd xmm9, xmm0
psrld xmm8, 0x19
orps xmm2, xmm13
pslld xmm14, 7
paddd xmm10, xmm2
movdqa xmmword [rsp + 0x50], xmm11
xorps xmm4, xmm10
movdqa xmmword [rsp + 0x90], xmm10
movdqa xmm5, xmm4
orps xmm8, xmm14
paddd xmm6, xmm8
psrld xmm4, 0x10
movdqa xmmword [rsp + 0x40], xmm6
movdqa xmm0, xmm9
xorps xmm0, xmm1
pslld xmm5, 0x10
movdqa xmm1, xmm6
orps xmm5, xmm4
xorps xmm1, xmm3
movdqa xmm6, xmm0
movdqa xmm3, xmm1
pslld xmm6, 0x10
movdqa xmm4, xmm15
psrld xmm0, 0x10
pslld xmm3, 0x10
orps xmm6, xmm0
psrld xmm1, 0x10
movdqa xmm10, xmm6
pslld xmm4, 0x10
orps xmm3, xmm1
psrld xmm15, 0x10
orps xmm4, xmm15
paddd xmm10, xmmword [rsp + 0x80]
movdqa xmm13, xmm4
paddd xmm13, xmmword [rsp + 0x60]
xorps xmm7, xmm10
movdqa xmm1, xmmword [rsp + 0xb0]
movdqa xmm12, xmm3
paddd xmm12, xmmword [rsp + 0x70]
xorps xmm1, xmm13
movdqa xmm14, xmm7
xorps xmm8, xmm12
pslld xmm7, 0xc
movdqa xmm15, xmm8
pslld xmm8, 0xc
movdqa xmm11, xmm5
paddd xmm11, xmmword [rsp + 0x30]
psrld xmm14, 0x14
movdqa xmm0, xmm11
xorps xmm0, xmm2
psrld xmm15, 0x14
movdqa xmm2, xmmword [rsp + 0x50]
orps xmm14, xmm7
movdqa xmm7, xmm0
orps xmm15, xmm8
pslld xmm0, 0xc
movdqa xmm8, xmm1
pslld xmm1, 0xc
psrld xmm7, 0x14
orps xmm7, xmm0
psrld xmm8, 0x14
orps xmm8, xmm1
movdqa xmm0, xmm14
movdqa xmm1, xmmword [rsp + 0x90]
paddd xmm0, xmm9
movdqa xmmword [rsp + 0xb0], xmm0
paddd xmm1, xmm7
xorps xmm0, xmm6
movdqa xmmword [rsp + 0x90], xmm1
xorps xmm1, xmm5
paddd xmm2, xmm8
movdqa xmmword [rsp + 0x50], xmm2
movdqa xmm9, xmm15
paddd xmm9, xmmword [rsp + 0x40]
movdqa xmm2, xmm9
xorps xmm2, xmm3
movdqa xmm3, xmmword [rsp + 0x50]
xorps xmm3, xmm4
movdqa xmm4, xmm0
pslld xmm0, 8
psrld xmm4, 0x18
orps xmm4, xmm0
movdqa xmm0, xmm1
psrld xmm0, 0x18
movdqa xmm6, xmm4
pslld xmm1, 8
orps xmm0, xmm1
movdqa xmmword [rsp + 0x80], xmm4
movdqa xmmword [rsp + 0x30], xmm0
movdqa xmm4, xmm2
movdqa xmm0, xmm3
pslld xmm2, 8
pslld xmm3, 8
psrld xmm0, 0x18
orps xmm0, xmm3
psrld xmm4, 0x18
orps xmm4, xmm2
movdqa xmmword [rsp + 0x100], xmm0
movdqa xmm2, xmmword [rsp + 0x30]
movdqa xmm3, xmm6
paddd xmm3, xmm10
movdqa xmmword [rsp + 0xf0], xmm4
movdqa xmm10, xmm2
movdqa xmm1, xmm4
paddd xmm10, xmm11
movdqa xmm5, xmm0
paddd xmm1, xmm12
movdqa xmmword [rsp + 0x40], xmm10
paddd xmm5, xmm13
xorps xmm7, xmm10
movdqa xmmword [rsp + 0x30], xmm5
xorps xmm14, xmm3
xorps xmm15, xmm1
movdqa xmm11, xmm14
pslld xmm14, 7
psrld xmm11, 0x19
xorps xmm8, xmm5
orps xmm11, xmm14
movdqa xmm14, xmm15
pslld xmm15, 7
movdqa xmm13, xmm7
pslld xmm7, 7
movdqa xmm12, xmm8
pslld xmm8, 7
psrld xmm14, 0x19
psrld xmm13, 0x19
orps xmm14, xmm15
movdqa xmm15, xmmword [rsp + 0xb0]
orps xmm13, xmm7
movdqa xmm7, xmmword [rsp + 0x90]
psrld xmm12, 0x19
orps xmm12, xmm8
movdqa xmm8, xmmword [rsp + 0x50]
sub rbx, 1
jne 0x1801fa700
movdqa xmm10, xmmword [rsp + 0x110]
movdqa xmm5, xmmword [rsp + 0x120]
movdqa xmmword [rsp + 0x60], xmm11
movdqa xmm11, xmmword [0x18037e250]
movdqa xmmword [rsp + 0x70], xmm14
movdqa xmm14, xmmword [rsp + 0x60]
paddd xmm0, xmmword [rsp + 0xa0]
paddd xmm6, xmm5
paddd xmm8, xmmword [rsp + 0x150]
paddd xmm1, xmmword [rsp + 0x1a0]
paddd xmm7, xmmword [rsp + 0x140]
movdqa xmm5, xmm1
paddd xmm3, xmmword [rsp + 0x1c0]
paddd xmm9, xmmword [rsp + 0xc0]
paddd xmm14, xmmword [rsp + 0x170]
paddd xmm11, xmmword [rsp + 0xd0]
paddd xmm15, xmmword [rsp + 0x130]
paddd xmm11, xmm2
paddd xmm12, xmmword [rsp + 0x160]
movdqa xmm2, xmm0
paddd xmm10, xmmword [rsp + 0xe0]
paddd xmm13, xmmword [rsp + 0x180]
paddd xmm10, xmm4
movdqa xmmword [rsp + 0x50], xmm8
movdqa xmm4, xmm3
movdqa xmm8, xmmword [rsp + 0x70]
paddd xmm8, xmmword [rsp + 0x190]
movdqa xmmword [rsp + 0x70], xmm8
movdqa xmm8, xmmword [rsp + 0x30]
paddd xmm8, xmmword [rsp + 0x1b0]
movdqa xmmword [rsp + 0x30], xmm8
punpckhdq xmm1, xmmword [rsp + 0x30]
movdqa xmm8, xmmword [rsp + 0x40]
paddd xmm8, xmmword [rsp + 0x1d0]
punpckldq xmm5, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0xe0], xmm1
movdqa xmmword [rsp + 0xa0], xmm6
movdqa xmm6, xmm13
punpckhdq xmm0, xmmword [rsp + 0xa0]
punpckldq xmm2, xmmword [rsp + 0xa0]
punpckldq xmm6, xmmword [rsp + 0x70]
punpckhdq xmm13, xmmword [rsp + 0x70]
movdqa xmmword [rsp + 0xa0], xmm0
movdqa xmmword [rsp + 0xc0], xmm9
movdqa xmm9, xmm15
punpckldq xmm9, xmm7
movdqa xmmword [rsp + 0x60], xmm14
movdqa xmm0, xmm9
movdqa xmm14, xmmword [rsp + 0xc0]
movdqa xmmword [rsp + 0x40], xmm8
movdqa xmm8, xmm14
punpckhdq xmm3, xmmword [rsp + 0x40]
punpckldq xmm8, xmmword [rsp + 0x50]
punpckldq xmm4, xmmword [rsp + 0x40]
punpckhdq xmm14, xmmword [rsp + 0x50]
punpcklqdq xmm0, xmm8
punpckhdq xmm15, xmm7
movdqa xmm7, xmm12
punpckldq xmm7, xmmword [rsp + 0x60]
punpckhdq xmm12, xmmword [rsp + 0x60]
movdqa xmm1, xmm7
punpcklqdq xmm1, xmm6
movdqu xmmword [r11], xmm0
movdqu xmmword [r11 + 0x10], xmm1
movdqa xmmword [rsp + 0xd0], xmm3
movdqa xmm0, xmm5
punpcklqdq xmm0, xmm4
movdqa xmm3, xmm11
punpckldq xmm3, xmm10
movdqa xmm1, xmm3
punpckhqdq xmm9, xmm8
punpcklqdq xmm1, xmm2
movdqu xmmword [r11 + 0x20], xmm0
movdqu xmmword [r11 + 0x30], xmm1
movdqa xmm0, xmm15
punpckhqdq xmm7, xmm6
punpcklqdq xmm0, xmm14
movdqa xmm1, xmm12
punpckhqdq xmm5, xmm4
punpckhqdq xmm3, xmm2
movdqu xmmword [r11 + 0x80], xmm0
punpckhdq xmm11, xmm10
movdqu xmmword [r11 + 0x40], xmm9
movdqu xmmword [r11 + 0x50], xmm7
movdqu xmmword [r11 + 0x60], xmm5
movdqu xmmword [r11 + 0x70], xmm3
punpcklqdq xmm1, xmm13
movdqa xmm2, xmmword [rsp + 0xe0]
movaps xmm10, xmmword [rsp + 0x230]
movdqa xmm0, xmm2
punpcklqdq xmm0, xmmword [rsp + 0xd0]
punpckhqdq xmm2, xmmword [rsp + 0xd0]
movaps xmm9, xmmword [rsp + 0x240]
movaps xmm8, xmmword [rsp + 0x250]
movaps xmm7, xmmword [rsp + 0x260]
movaps xmm6, xmmword [rsp + 0x270]
movdqu xmmword [r11 + 0x90], xmm1
movdqa xmm1, xmm11
punpckhqdq xmm15, xmm14
punpckhqdq xmm11, xmmword [rsp + 0xa0]
punpcklqdq xmm1, xmmword [rsp + 0xa0]
movaps xmm14, xmmword [rsp + 0x1f0]
punpckhqdq xmm12, xmm13
movaps xmm13, xmmword [rsp + 0x200]
movdqu xmmword [r11 + 0xc0], xmm15
movaps xmm15, xmmword [rsp + 0x1e0]
movdqu xmmword [r11 + 0xd0], xmm12
movaps xmm12, xmmword [rsp + 0x210]
movdqu xmmword [r11 + 0xf0], xmm11
movaps xmm11, xmmword [rsp + 0x220]
movdqu xmmword [r11 + 0xa0], xmm0
movdqu xmmword [r11 + 0xb0], xmm1
movdqu xmmword [r11 + 0xe0], xmm2
add dword [rdx + 0x30], 4
cmp dword [rdx + 0x30], 4
jae 0x1801faf8e
inc dword [rdx + 0x34]
add rsp, 0x280
pop rbx
ret
lea r9, [0x1803e4180]
mov dword [rsp + 0x20], reloc.WS2_32.dll_ntohs
lea r8, str.chacha_simd32_x4
lea rdx, str.Valid_rounds
lea rcx, str.rounds___2__0
call fcn.1800d1f70
int3