Function at 0x4ba230
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
sub rsp, 0x248
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], rdi
mov qword [rax - 0x10], r13
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov rdi, rcx
mov qword [rax - 8], r12
mov dword [rcx + 0xe8], 0
mov ebp, 2
lea r13, [rcx + 0x2d66]
nop
nop
movzx r11d, byte [r13]
mov r9d, 1
xor ebx, ebx
mov r8d, r11d
and r11d, 1
mov r12d, r9d
or r11d, 2
shr r8d, 1
mov r10d, ebp
dec r8d
mov ecx, r8d
shl r11d, cl
shl r12d, cl
lea rsi, [rdi + r11*4 + 0x2464]
add r11d, ebp
test r8d, r8d
je 0x4ba2e3
nop
mov eax, r9d
mov edx, r10d
shr r10d, 1
movzx ecx, word [rsi + rax*2]
and edx, 1
mov eax, edx
shr rcx, 4
lea r9d, [rdx + r9*2]
neg eax
shr rax, 4
and eax, 0x7f
xor rcx, rax
add ebx, dword [rdi + rcx*4 + 0x810]
add r8d, 0xffffffff
jne 0x4ba2b0
mov eax, r9d
inc ebp
inc r13
movzx ecx, word [rsi + rax*2]
mov rax, rcx
mov rdx, rcx
shr rax, 4
xor rdx, 0x7f0
mov eax, dword [rdi + rax*4 + 0x810]
shr rdx, 4
cmp ebp, 0x40
lea ecx, [rbx + rax]
mov eax, dword [rdi + rdx*4 + 0x810]
lea edx, [rbx + rax]
lea eax, [r12 + r11]
mov dword [rsp + r11*4 + 0x20], ecx
mov dword [rsp + rax*4 + 0x20], edx
jb 0x4ba270
lea rbx, [rsp + 0x24]
mov r13d, 4
mov qword [rsp + 0x230], r14
sub rbx, rdi
lea r9, [rdi + 0x2d68]
lea r12, [rdi + 0x2264]
lea r11, [rdi + 0x12e4]
lea rbp, [rdi + 0x16ec]
mov qword [rsp + 8], r13
sub rbx, 0x16e4
mov qword [rsp + 0x228], r15
nop
nop
nop
mov esi, dword [rdi + 0xf0]
inc esi
shr esi, 1
mov dword [rsp], esi
je 0x4ba4d4
mov eax, esi
mov r13d, 0x20
mov r14, r11
mov rsi, rax
lea r15, [r12 + 0x40]
nop
nop
nop
mov r9d, r13d
mov eax, r13d
add r14, 8
and eax, 1
shr r9d, 1
inc r13d
movzx edx, word [r12 + r9*2]
neg eax
add r15, 2
shr rax, 4
shr rdx, 4
and eax, 0x7f
xor rdx, rax
mov eax, r9d
shr r9d, 1
mov r10d, dword [rdi + rdx*4 + 0x810]
movzx edx, word [r12 + r9*2]
and eax, 1
neg eax
shr rdx, 4
shr rax, 4
and eax, 0x7f
xor rdx, rax
mov eax, r9d
shr r9d, 1
add r10d, dword [rdi + rdx*4 + 0x810]
movzx edx, word [r12 + r9*2]
and eax, 1
neg eax
shr rdx, 4
shr rax, 4
and eax, 0x7f
xor rdx, rax
add r10d, dword [rdi + rdx*4 + 0x810]
mov edx, r9d
shr r9d, 1
and edx, 1
mov eax, r9d
mov ecx, r9d
movzx ecx, word [r12 + rcx*2]
shr rax, 1
and r9d, 1
movzx r8d, word [r12 + rax*2]
shr rcx, 4
mov eax, r9d
neg eax
shr r8, 4
shr rax, 4
and eax, 0x7f
xor r8, rax
mov eax, edx
neg eax
shr rax, 4
and eax, 0x7f
xor rcx, rax
mov eax, dword [rdi + r8*4 + 0x810]
add eax, dword [rdi + rcx*4 + 0x810]
add r10d, eax
movzx eax, word [r15 - 2]
mov rdx, rax
shr rax, 4
mov eax, dword [rdi + rax*4 + 0x810]
xor rdx, 0x7f0
lea ecx, [r10 + rax]
shr rdx, 4
dec rsi
mov dword [r14 - 8], ecx
mov eax, dword [rdi + rdx*4 + 0x810]
lea ecx, [r10 + rax]
mov dword [r14 - 4], ecx
jne 0x4ba3b0
mov esi, dword [rsp]
mov r13, qword [rsp + 8]
lea r9, [rdi + 0x2d68]
cmp esi, 7
mov edx, 0x20
jbe 0x4ba501
lea rcx, [r11 + 0x38]
lea r8d, [rsi - 7]
nop
nop
nop
add dword [rcx], edx
add dword [rcx + 4], edx
add rcx, 8
add edx, 0x10
dec r8
jne 0x4ba4f0
mov eax, dword [r11]
lea r8, [rbp + 8]
mov r10d, 0x3e
mov dword [rbp - 8], eax
mov eax, dword [r11 + 4]
mov dword [rbp - 4], eax
mov eax, dword [r11 + 8]
mov dword [rbp], eax
mov eax, dword [r11 + 0xc]
mov dword [rbp + 4], eax
nop
nop
nop
movzx eax, byte [r9]
add r8, 8
add r9, 2
dec r10
mov edx, dword [r11 + rax*4]
mov eax, dword [rbx + r8 - 0xc]
lea ecx, [rdx + rax]
mov eax, dword [rbx + r8 - 8]
mov dword [r8 - 8], ecx
lea ecx, [rdx + rax]
mov dword [r8 - 4], ecx
jne 0x4ba530
add r11, 0x100
sub r12, 0xffffffffffffff80
sub rbx, 0x200
add rbp, 0x200
dec r13
lea r9, [rdi + 0x2d68]
mov qword [rsp + 8], r13
jne 0x4ba380
mov r15, qword [rsp + 0x228]
mov r14, qword [rsp + 0x230]
mov r13, qword [rsp + 0x238]
mov r12, qword [rsp + 0x240]
mov rdi, qword [rsp + 0x268]
mov rsi, qword [rsp + 0x260]
mov rbp, qword [rsp + 0x258]
mov rbx, qword [rsp + 0x250]
add rsp, 0x248
ret