Function at 0x585b90
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov rax, qword [rcx + 0x168]
mov rdi, qword [rcx + 0x178]
mov rbp, qword [rcx + 0x180]
mov r14, rcx
mov qword [rsp + 0xa8], rdx
mov r10, r8
mov rdx, r9
mov qword [rsp + 0xb8], r9
mov r8, qword [rcx + 0x160]
xor ecx, ecx
movabs r9, 0xfffffffe0
add rdx, qword [r14 + 0x38]
mov qword [rsp + 0x30], rax
setb cl
cmp rdx, r9
ja 0x586228
test rcx, rcx
jne 0x586228
mov eax, dword [r14 + 0x174]
mov qword [r14 + 0x38], rdx
test eax, eax
je 0x58612f
cmp qword [rsp + 0xb8], 0
je 0x58620b
movdqu xmm1, xmmword [r14 + 0x40]
mov eax, dword [r14 + 0xc]
pxor xmm0, xmm0
mov dword [r14 + 0x174], 0
mov dword [rsp + 0x2c], 0x10
mov edx, eax
movups xmmword [r14 + 0x188], xmm1
bswap edx
movups xmmword [r14 + 0x40], xmm0
mov dword [rsp + 0x28], edx
mov edx, 1
cmp qword [rsp + 0xb8], 0xf
jbe 0x585c9e
test dl, dl
je 0x585c9e
mov qword [rsp + 0xb0], r10
mov r9d, dword [rsp + 0x2c]
lea rdx, [r14 + 0x60]
lea rcx, [r14 + 0x40]
mov rax, qword [rsp + 0x30]
lea r8, [r14 + 0x188]
call rax
mov dword [rsp + 0x2c], 0
mov r10, qword [rsp + 0xb0]
cmp qword [rsp + 0xb8], 0xbff
jbe 0x585d9e
lea rax, [r14 + 0x60]
mov qword [rsp + 0x20], r10
lea r12, [r14 + 0x10]
mov qword [rsp + 0x40], rax
lea rax, [r14 + 0x40]
lea rsi, [r10 + 0xc00]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x38], rdi
mov edi, dword [rsp + 0x28]
mov r13, qword [rsp + 0xa8]
mov rbx, qword [rsp + 0x20]
mov r15d, edi
mov rdi, qword [rsp + 0x38]
add r15d, 1
mov r8, rbp
mov rdx, r12
mov rcx, r14
call rdi
mov eax, r15d
add rbx, 0x10
add r13, 0x10
bswap eax
mov dword [r14 + 0xc], eax
mov rax, qword [r13 - 0x10]
xor rax, qword [r14 + 0x10]
mov qword [rbx - 0x10], rax
mov rax, qword [r13 - 8]
xor rax, qword [r14 + 0x18]
mov qword [rbx - 8], rax
cmp rbx, rsi
jne 0x585cf0
mov rdi, qword [rsp + 0x20]
add dword [rsp + 0x28], 0xc0
mov r9d, 0xc00
mov r15, rsi
mov rax, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x40]
add rsi, 0xc00
add qword [rsp + 0xa8], 0xc00
mov rcx, qword [rsp + 0x48]
mov r8, rdi
call rax
mov rax, rdi
sub qword [rsp + 0xb8], 0xc00
add rax, 0xc00
cmp qword [rsp + 0xb8], 0xbff
mov qword [rsp + 0x20], rax
ja 0x585cd7
mov rdi, qword [rsp + 0x38]
mov r10, r15
mov r9, qword [rsp + 0xb8]
and r9, 0xfffffffffffffff0
je 0x585e8d
mov r12d, dword [rsp + 0x28]
lea rdx, [r14 + 0x10]
mov rsi, r10
mov r13, r9
mov rbx, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0xb8]
mov r15, r10
mov rax, rbx
add rax, rcx
mov qword [rsp + 0x20], rax
add r12d, 1
mov qword [rsp + 0x38], rdx
mov r8, rbp
mov rcx, r14
call rdi
mov eax, r12d
add rbx, 0x10
add rsi, 0x10
bswap eax
mov dword [r14 + 0xc], eax
mov rax, qword [rbx - 0x10]
xor rax, qword [r14 + 0x10]
mov rdx, qword [rsp + 0x38]
mov qword [rsi - 0x10], rax
mov rax, qword [rbx - 8]
xor rax, qword [r14 + 0x18]
mov qword [rsi - 8], rax
mov rax, qword [rsp + 0x20]
sub rax, rbx
cmp rax, 0xf
ja 0x585ddd
mov rax, qword [rsp + 0xb8]
mov r10, r15
mov r9, r13
lea rcx, [r14 + 0x40]
and qword [rsp + 0xb8], 0xf
lea rdx, [rax - 0x10]
mov eax, dword [rsp + 0x28]
shr rdx, 4
lea eax, [rax + rdx + 1]
add rdx, 1
shl rdx, 4
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x30]
add r10, rdx
add qword [rsp + 0xa8], rdx
lea rdx, [r14 + 0x60]
mov r8, r10
mov qword [rsp + 0xb0], r10
sub r8, r13
call rax
mov r10, qword [rsp + 0xb0]
cmp qword [rsp + 0xb8], 0
mov qword [rsp + 0xb0], r10
je 0x586111
lea rdx, [r14 + 0x10]
mov r8, rbp
mov rcx, r14
call rdi
mov rax, qword [rsp + 0xa8]
mov edx, dword [rsp + 0x28]
mov r8d, dword [rsp + 0x2c]
mov r10, qword [rsp + 0xb0]
add edx, 1
bswap edx
mov dword [r14 + 0xc], edx
movzx edx, byte [r14 + 0x10]
lea ecx, [r8 + 1]
xor dl, byte [rax]
mov rax, r8
mov byte [r10], dl
mov byte [r14 + r8 + 0x188], dl
mov r8, qword [rsp + 0xb8]
sub r8, 1
je 0x586109
mov rdi, qword [rsp + 0xa8]
movzx edx, byte [r14 + 0x11]
mov r11d, ecx
lea r9d, [rax + 2]
xor dl, byte [rdi + 1]
cmp qword [rsp + 0xb8], 2
mov byte [r10 + 1], dl
mov byte [r14 + r11 + 0x188], dl
je 0x586109
movzx edx, byte [r14 + 0x12]
xor dl, byte [rdi + 2]
lea r11d, [rax + 3]
cmp qword [rsp + 0xb8], 3
mov byte [r10 + 2], dl
mov byte [r14 + r9 + 0x188], dl
je 0x586109
movzx edx, byte [rdi + 3]
xor dl, byte [r14 + 0x13]
lea r9d, [rax + 4]
cmp qword [rsp + 0xb8], 4
mov byte [r10 + 3], dl
mov byte [r14 + r11 + 0x188], dl
je 0x586109
movzx edx, byte [rdi + 4]
xor dl, byte [r14 + 0x14]
lea r11d, [rax + 5]
cmp qword [rsp + 0xb8], 5
mov byte [r10 + 4], dl
mov byte [r14 + r9 + 0x188], dl
je 0x586109
movzx edx, byte [rdi + 5]
xor dl, byte [r14 + 0x15]
lea r9d, [rax + 6]
cmp qword [rsp + 0xb8], 6
mov byte [r10 + 5], dl
mov byte [r14 + r11 + 0x188], dl
je 0x586109
movzx edx, byte [rdi + 6]
xor dl, byte [r14 + 0x16]
lea r11d, [rax + 7]
cmp qword [rsp + 0xb8], 7
mov byte [r10 + 6], dl
mov byte [r14 + r9 + 0x188], dl
je 0x586109
movzx edx, byte [rdi + 7]
xor dl, byte [r14 + 0x17]
lea r9d, [rax + 8]
cmp qword [rsp + 0xb8], 8
mov byte [r10 + 7], dl
mov byte [r14 + r11 + 0x188], dl
je 0x586109
movzx edx, byte [rdi + 8]
xor dl, byte [r14 + 0x18]
lea r11d, [rax + 9]
cmp qword [rsp + 0xb8], 9
mov byte [r10 + 8], dl
mov byte [r14 + r9 + 0x188], dl
je 0x586109
movzx edx, byte [rdi + 9]
xor dl, byte [r14 + 0x19]
lea r9d, [rax + 0xa]
cmp qword [rsp + 0xb8], 0xa
mov byte [r10 + 9], dl
mov byte [r14 + r11 + 0x188], dl
je 0x586109
movzx edx, byte [rdi + 0xa]
xor dl, byte [r14 + 0x1a]
lea r11d, [rax + 0xb]
cmp qword [rsp + 0xb8], 0xb
mov byte [r10 + 0xa], dl
mov byte [r14 + r9 + 0x188], dl
je 0x586109
movzx edx, byte [rdi + 0xb]
xor dl, byte [r14 + 0x1b]
lea r9d, [rax + 0xc]
cmp qword [rsp + 0xb8], 0xc
mov byte [r10 + 0xb], dl
mov byte [r14 + r11 + 0x188], dl
je 0x586109
movzx edx, byte [rdi + 0xc]
xor dl, byte [r14 + 0x1c]
lea r11d, [rax + 0xd]
cmp qword [rsp + 0xb8], 0xd
mov byte [r10 + 0xc], dl
mov byte [r14 + r9 + 0x188], dl
je 0x586109
movzx edx, byte [rdi + 0xd]
add eax, 0xe
xor dl, byte [r14 + 0x1d]
cmp qword [rsp + 0xb8], 0xe
mov byte [r10 + 0xd], dl
mov r9d, eax
mov byte [r14 + r11 + 0x188], dl
je 0x586109
movzx edx, byte [rdi + 0xe]
xor dl, byte [r14 + 0x1e]
mov byte [r10 + 0xe], dl
mov byte [r14 + r9 + 0x188], dl
lea eax, [rcx + r8]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x2c]
mov dword [r14 + 0x170], eax
xor eax, eax
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, dword [r14 + 0xc]
mov r9d, dword [r14 + 0x170]
mov edx, eax
mov eax, r9d
bswap edx
mov dword [rsp + 0x28], edx
and eax, 0xf
je 0x586232
cmp qword [rsp + 0xb8], 0
je 0x5861fd
mov r8, qword [rsp + 0xa8]
mov r11, qword [rsp + 0xb8]
jmp 0x586174
test r11, r11
je 0x5861e5
mov ecx, eax
movzx edx, byte [r8]
add r10, 1
add eax, 1
xor dl, byte [r14 + rcx + 0x10]
mov ecx, r9d
add r8, 1
add r9d, 1
mov byte [r10 - 1], dl
sub r11, 1
mov byte [r14 + rcx + 0x188], dl
and eax, 0xf
jne 0x58616f
mov dword [rsp + 0x2c], eax
mov qword [rsp + 0xa8], r8
mov qword [rsp + 0xb8], r11
mov qword [rsp + 0xb0], r10
mov rax, qword [rsp + 0x30]
lea rdx, [r14 + 0x60]
lea rcx, [r14 + 0x40]
lea r8, [r14 + 0x188]
call rax
mov r10, qword [rsp + 0xb0]
jmp 0x585c9e
mov dword [rsp + 0x2c], eax
mov qword [rsp + 0xa8], r8
mov qword [rsp + 0xb8], r11
test eax, eax
je 0x5861ba
mov dword [r14 + 0x170], r9d
xor eax, eax
jmp 0x58611e
lea rdx, [r14 + 0x60]
lea rcx, [r14 + 0x40]
call r8
xor eax, eax
mov dword [r14 + 0x174], 0
jmp 0x58611e
mov eax, 0xffffffff
jmp 0x58611e
test r9d, r9d
mov dword [rsp + 0x2c], r9d
setne dl
jmp 0x585c5c