Function at 0x180004c50
Capabilities:
Encode data using xor
Encrypt data using chaskey

Disassembly:
test r9d, r9d
je 0x180004f59
push rbp
push rdi
push r12
mov rbp, rsp
sub rsp, 0x40
mov rax, qword [0x18000a008]
xor rax, rsp
mov qword [rbp - 0x28], rax
mov qword [rsp + 0x60], rbx
lea rax, [rdx + 0xf]
mov qword [rsp + 0x38], rsi
mov edi, r9d
mov qword [rsp + 0x30], r13
mov r11, rdx
mov qword [rsp + 0x28], r14
mov r12, rcx
mov qword [rsp + 0x20], r15
mov qword [rbp - 0x40], rdx
nop dword [rax]
lea rcx, [rbp - 0x38]
cmp rcx, rax
ja 0x180004cbc
lea rax, [rbp - 0x29]
cmp rax, r11
jb 0x180004cbc
movups xmm0, xmmword [r11]
movups xmmword [rbp - 0x38], xmm0
jmp 0x180004cd0
movups xmm0, xmmword [r11]
movups xmmword [rbp - 0x38], xmm0
nop dword [rax]
nop dword [rax + rax]
mov esi, dword [r12 + 4]
mov r13d, 4
mov ecx, dword [rbp - 0x38]
mov r9d, esi
xor r9d, dword [rbp - 0x34]
mov eax, dword [rbp - 0x30]
mov edx, r9d
mov ebx, dword [r12]
xor ecx, ebx
mov r14d, dword [r12 + 8]
xor eax, r14d
mov r15d, dword [r12 + 0xc]
mov r10d, r15d
xor r10d, dword [rbp - 0x2c]
mov dword [rbp - 0x2c], r10d
mov r11d, r10d
mov dword [rbp - 0x34], r9d
add eax, r10d
add ecx, r9d
mov r9d, edx
mov r10d, r11d
rol r9d, 5
xor r9d, ecx
rol r10d, 8
xor r10d, eax
rol ecx, 0x10
lea edx, [rax + r9]
rol r9d, 7
lea eax, [rcx + r10]
xor r9d, edx
rol r10d, 0xd
xor r10d, eax
rol edx, 0x10
lea ecx, [r9 + rax]
rol r9d, 5
xor r9d, ecx
rol ecx, 0x10
lea eax, [rdx + r10]
rol r10d, 8
xor r10d, eax
lea edx, [rax + r9]
rol r9d, 7
xor r9d, edx
rol edx, 0x10
lea eax, [rcx + r10]
rol r10d, 0xd
xor r10d, eax
lea ecx, [r9 + rax]
rol r9d, 5
xor r9d, ecx
rol ecx, 0x10
lea eax, [rdx + r10]
rol r10d, 8
xor r10d, eax
lea edx, [rax + r9]
rol r9d, 7
xor r9d, edx
rol edx, 0x10
lea eax, [rcx + r10]
rol r10d, 0xd
xor r10d, eax
lea ecx, [r9 + rax]
rol r9d, 5
xor r9d, ecx
rol ecx, 0x10
lea eax, [rdx + r10]
rol r10d, 8
xor r10d, eax
add eax, r9d
add ecx, r10d
rol r9d, 7
xor r9d, eax
rol r10d, 0xd
xor r10d, ecx
rol eax, 0x10
mov edx, r9d
mov r11d, r10d
sub r13, 1
jne 0x180004d10
mov r11, qword [rbp - 0x40]
xor r15d, r10d
xor esi, r9d
mov dword [rbp - 0x2c], r15d
xor ebx, ecx
mov dword [rbp - 0x34], esi
xor r14d, eax
mov dword [rbp - 0x38], ebx
cmp edi, 0x10
mov dword [rbp - 0x30], r14d
mov esi, 0x10
mov r10d, edi
cmova r10d, esi
xor edx, edx
test r10d, r10d
je 0x180004f01
cmp r10d, 0x40
jb 0x180004ed3
lea eax, [r10 - 1]
mov ecx, eax
lea r9, [rax + r8]
lea rax, [rbp - 0x38]
add rax, rcx
cmp r8, rax
ja 0x180004e4e
lea rax, [rbp - 0x38]
cmp r9, rax
jae 0x180004ed3
mov ebx, r10d
and ebx, 0xffffffc0
mov r9d, 0x20
nop word [rax + rax]
movdqu xmm0, xmmword [rdx + r8]
lea eax, [r9 - 0x10]
movdqu xmm1, xmmword [rbp + rdx - 0x38]
pxor xmm1, xmm0
movdqu xmmword [rdx + r8], xmm1
add edx, 0x40
movdqu xmm0, xmmword [rax + r8]
movdqu xmm1, xmmword [rbp + rax - 0x38]
pxor xmm1, xmm0
movdqu xmmword [rax + r8], xmm1
mov eax, r9d
movdqu xmm0, xmmword [rax + r8]
movdqu xmm1, xmmword [rbp + rax - 0x38]
pxor xmm1, xmm0
movdqu xmmword [rax + r8], xmm1
lea eax, [r9 + 0x10]
add r9d, 0x40
movdqu xmm0, xmmword [rax + r8]
movdqu xmm1, xmmword [rbp + rax - 0x38]
pxor xmm1, xmm0
movdqu xmmword [rax + r8], xmm1
cmp edx, ebx
jb 0x180004e60
cmp edx, r10d
jae 0x180004f01
mov eax, edx
lea r9, [rbp - 0x38]
add rax, r8
sub r9, r8
mov ecx, r10d
sub ecx, edx
mov edx, ecx
nop word [rax + rax]
movzx ecx, byte [r9 + rax]
xor byte [rax], cl
lea rax, [rax + 1]
sub rdx, 1
jne 0x180004ef0
sub edi, r10d
mov eax, r10d
add r8, rax
mov edx, esi
nop dword [rax]
lea eax, [rdx - 1]
add byte [rax + r11], 1
jne 0x180004f20
dec edx
test edx, edx
jg 0x180004f10
lea rax, [r11 + 0xf]
test edi, edi
jne 0x180004ca0
mov r15, qword [rsp + 0x20]
mov r14, qword [rsp + 0x28]
mov r13, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x60]
mov rcx, qword [rbp - 0x28]
xor rcx, rsp
call fcn.1800054c0
add rsp, 0x40
pop r12
pop rdi
pop rbp
ret