Function at 0x8e77b0
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 r12, rdx
mov edx, dword [rsp + 0xc0]
mov r14, rcx
mov r15, r8
add qword [r12 + 0x138], rdx
cmp dword [rsp + 0xc0], 0xf
mov qword [rsp + 0xb8], r9
jbe 0x8e6da0
mov eax, dword [rsp + 0xc0]
lea r13, [r12 + 0x10]
mov rbx, r9
lea rsi, [rsp + 0x30]
lea rdi, [r12 + 0x120]
lea ebp, [rax - 0x10]
shr ebp, 4
add ebp, 1
shl rbp, 4
lea rax, [rcx + rbp]
mov qword [rsp + 0x28], rax
mov r8, rdi
mov rcx, rsi
add rbx, 0x10
add r14, 0x10
mov edx, dword [r12 + 0x12c]
bswap edx
add edx, 1
bswap edx
mov dword [r12 + 0x12c], edx
mov rdx, r15
call fcn.00916710
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
xor rcx, qword [rbx - 0x10]
xor rdx, qword [rbx - 8]
xor qword [r12], rcx
xor qword [r12 + 8], rdx
mov qword [rsp + 0x30], rcx
mov rcx, r12
mov qword [rsp + 0x38], rdx
mov rdx, r13
call fcn.00917120
mov rdx, qword [rsp + 0x30]
mov qword [r14 - 0x10], rdx
mov rdx, qword [rsp + 0x38]
mov qword [r14 - 8], rdx
cmp qword [rsp + 0x28], r14
jne 0x8e6af0
add qword [rsp + 0xb8], rbp
and dword [rsp + 0xc0], 0xf
mov eax, dword [rsp + 0xc0]
test eax, eax
jne 0x8e6b98
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, dword [r12 + 0x12c]
lea rsi, [rsp + 0x30]
mov rdx, r15
lea rbp, [rsp + 0x40]
bswap eax
add eax, 1
mov rcx, rsi
lea r8, [r12 + 0x120]
bswap eax
mov dword [r12 + 0x12c], eax
call fcn.00916710
cmp dword [rsp + 0xc0], 8
mov ebx, dword [rsp + 0xc0]
mov rcx, rbp
mov qword [rsp + 0x40], 0
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0x48], 0
jae 0x8e6d60
xor edx, edx
test byte [rsp + 0xc0], 4
jne 0x8e6d40
test byte [rsp + 0xc0], 2
jne 0x8e6d20
test byte [rsp + 0xc0], 1
jne 0x8e6d10
mov edi, dword [rsp + 0xc0]
mov rax, rbp
lea edx, [rdi - 1]
lea rcx, [rsp + rdx + 0x41]
nop dword [rax]
movzx edx, byte [rsi]
xor byte [rax], dl
add rax, 1
add rsi, 1
cmp rcx, rax
jne 0x8e6c40
mov rax, qword [rsp + 0x40]
xor qword [r12], rax
lea rdx, [r12 + 0x10]
mov rcx, r12
mov rax, qword [rsp + 0x48]
xor qword [r12 + 8], rax
call fcn.00917120
cmp ebx, 8
jb 0x8e6cd0
mov rdi, qword [rsp + 0x28]
mov rax, qword [rsp + 0x40]
mov qword [rdi], rax
mov rax, qword [rbp + rbx - 8]
lea rcx, [rdi + 8]
and rcx, 0xfffffffffffffff8
mov qword [rdi + rbx - 8], rax
mov rax, rdi
sub rax, rcx
mov rdi, rax
sub rbp, rax
add edi, ebx
and edi, 0xfffffff8
cmp edi, 8
jb 0x8e6b81
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rbp + rdx]
mov qword [rcx + rdx], r8
cmp eax, edi
jb 0x8e6cb5
jmp 0x8e6b81
test bl, 4
jne 0x8e6daa
test ebx, ebx
je 0x8e6b81
movzx eax, byte [rbp]
mov rdi, qword [rsp + 0x28]
mov byte [rdi], al
test bl, 2
je 0x8e6b81
movzx eax, word [rbp + rbx - 2]
mov rdi, qword [rsp + 0x28]
mov word [rdi + rbx - 2], ax
jmp 0x8e6b81
movzx eax, byte [rax + rdx]
mov byte [rcx + rdx], al
jmp 0x8e6c2a
movzx r8d, word [rax + rdx]
mov word [rcx + rdx], r8w
add rdx, 2
test byte [rsp + 0xc0], 1
je 0x8e6c2a
jmp 0x8e6d10
mov edx, dword [rax]
mov dword [rcx], edx
mov edx, 4
test byte [rsp + 0xc0], 2
je 0x8e6c1c
jmp 0x8e6d20
mov r8d, dword [rsp + 0xc0]
xor eax, eax
and r8d, 0xfffffff8
mov rdi, qword [rsp + 0xb8]
mov edx, eax
add eax, 8
mov rcx, qword [rdi + rdx]
mov qword [rbp + rdx], rcx
cmp eax, r8d
jb 0x8e6d6e
lea rcx, [rbp + rax]
add rax, rdi
jmp 0x8e6bfe
mov qword [rsp + 0x28], rcx
jmp 0x8e6b76
mov eax, dword [rbp]
mov rdi, qword [rsp + 0x28]
mov dword [rdi], eax
mov eax, dword [rbp + rbx - 4]
mov dword [rdi + rbx - 4], eax
jmp 0x8e6b81
jmp 0x8e6a80