Function at 0x40ca80
Capabilities:
Encode data using xor

Disassembly:
mov rcx, qword gs:[0x28]
mov rcx, qword [rcx]
cmp rsp, qword [rcx + 0x10]
jbe 0x40ce3a
sub rsp, 0x20
mov r10, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x28]
mov rax, qword [rsp + 0x38]
cmp byte [0x0075c6a8], 0
je 0x40cad8
mov qword [rsp], rcx
mov qword [rsp + 8], r10
mov qword [rsp + 0x10], rax
call fcn.0045a500
mov rbx, qword [rsp + 0x18]
mov qword [rsp + 0x40], rbx
add rsp, 0x20
ret
mov rdx, qword [0x0075c9a0]
imul rdx, rax
add rdx, r10
cmp rax, 0
jne 0x40cb18
mov rax, rdx
shr rax, 0x1d
xor rax, rdx
movabs rcx, 0x83cf8eadf876d2d7
imul rcx, rax
mov rbx, rcx
shr rbx, 0x20
xor rbx, rcx
mov qword [rsp + 0x40], rbx
add rsp, 0x20
ret
cmp rax, 4
jae 0x40cb78
movzx ebx, byte [rcx]
xor rbx, rdx
mov rsi, rbx
mov rdx, rax
shr rdx, 1
mov rbx, rcx
add rbx, rdx
movzx ebx, byte [rbx]
shl rbx, 8
xor rbx, rsi
mov rdx, rbx
dec rax
mov rbx, rcx
add rbx, rax
movzx ebx, byte [rbx]
shl rbx, 0x10
xor rbx, rdx
movabs rdx, 0xea38ec9079f01541
imul rdx, rbx
rol rdx, 0x1f
movabs rbp, 0x2723a30d96da1399
imul rdx, rbp
jmp 0x40caec
cmp rax, 8
ja 0x40cbc2
mov ebp, dword [rcx]
mov ebx, ebp
xor rbx, rdx
mov rdx, rbx
sub rax, 4
mov rbx, rcx
add rbx, rax
mov ebp, dword [rbx]
mov ebx, ebp
shl rbx, 0x20
xor rbx, rdx
movabs rdx, 0xea38ec9079f01541
imul rdx, rbx
rol rdx, 0x1f
movabs rbp, 0x2723a30d96da1399
imul rdx, rbp
jmp 0x40caec
cmp rax, 0x10
ja 0x40cc29
mov rsi, rdx
mov rdx, qword [rcx]
xor rdx, rsi
movabs rbx, 0xea38ec9079f01541
imul rbx, rdx
rol rbx, 0x1f
movabs rbp, 0x2723a30d96da1399
imul rbx, rbp
mov rdx, rbx
sub rax, 8
mov rbx, rcx
add rbx, rax
mov rax, qword [rbx]
xor rax, rdx
movabs rdx, 0xea38ec9079f01541
imul rdx, rax
rol rdx, 0x1f
movabs rbp, 0x2723a30d96da1399
imul rdx, rbp
jmp 0x40caec
cmp rax, 0x20
ja 0x40ccfa
mov rsi, rdx
mov rdx, qword [rcx]
xor rdx, rsi
movabs rsi, 0xea38ec9079f01541
imul rsi, rdx
rol rsi, 0x1f
movabs rbp, 0x2723a30d96da1399
imul rsi, rbp
mov rdx, 8
mov rbx, rcx
add rbx, rdx
mov rdx, qword [rbx]
xor rdx, rsi
movabs rsi, 0xea38ec9079f01541
imul rsi, rdx
rol rsi, 0x1f
movabs rbp, 0x2723a30d96da1399
imul rsi, rbp
mov rdx, rax
sub rdx, 0x10
mov rbx, rcx
add rbx, rdx
mov rdx, qword [rbx]
xor rdx, rsi
movabs rbx, 0xea38ec9079f01541
imul rbx, rdx
rol rbx, 0x1f
movabs rbp, 0x2723a30d96da1399
imul rbx, rbp
mov rdx, rbx
sub rax, 8
mov rbx, rcx
add rbx, rax
mov rax, qword [rbx]
xor rax, rdx
movabs rdx, 0xea38ec9079f01541
imul rdx, rax
rol rdx, 0x1f
movabs rbp, 0x2723a30d96da1399
imul rdx, rbp
jmp 0x40caec
mov rdi, qword [0x0075c9a8]
mov rsi, qword [0x0075c9b0]
mov r8, rdx
mov rdx, qword [0x0075c9b8]
imul rdi, r10
imul rsi, r10
imul rdx, r10
cmp rax, 0x20
jb 0x40ce26
mov r9, r8
mov r8, qword [rcx]
xor r8, r9
movabs rbx, 0xea38ec9079f01541
imul rbx, r8
rol rbx, 0x1f
movabs rbp, 0x2723a30d96da1399
imul rbx, rbp
mov r8, rbx
mov rbx, rcx
mov rcx, 8
add rbx, rcx
mov rcx, rbx
mov r9, rdi
mov rdi, qword [rbx]
xor rdi, r9
movabs rbx, 0x2723a30d96da1399
imul rbx, rdi
rol rbx, 0x1f
movabs rbp, 0x83cf8eadf876d2d7
imul rbx, rbp
mov rdi, rbx
mov rbx, rcx
mov rcx, 8
add rbx, rcx
mov rcx, rbx
mov r9, rsi
mov rsi, qword [rbx]
xor rsi, r9
movabs rbx, 0x83cf8eadf876d2d7
imul rbx, rsi
rol rbx, 0x1f
movabs rbp, 0xdbcfc27b643df693
imul rbx, rbp
mov rsi, rbx
mov rbx, rcx
mov rcx, 8
add rbx, rcx
mov rcx, rbx
mov r9, rdx
mov rdx, qword [rbx]
xor rdx, r9
movabs rbx, 0xdbcfc27b643df693
imul rbx, rdx
rol rbx, 0x1f
movabs rbp, 0xea38ec9079f01541
imul rbx, rbp
mov rdx, rbx
mov rbx, rcx
mov rcx, 8
add rbx, rcx
mov rcx, rbx
sub rax, 0x20
cmp rax, 0x20
jae 0x40cd28
mov rbx, r8
xor rbx, rdi
xor rbx, rsi
xor rbx, rdx
mov rdx, rbx
jmp 0x40cae6
call fcn.00458800
jmp fcn.0040ca80