Function at 0x12ffc
Capabilities:
Encode data using xor
Manually build aes constants

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r13
push r14
sub rsp, 0x800
xor r8d, r8d
lea r9, [rax - 0x418]
mov r11d, 0x100
lea edx, [r8 + 1]
movsxd rax, edx
mov dword [r9], edx
mov dword [rsp + rax*4], r8d
mov eax, edx
and al, 0x80
neg al
lea eax, [rdx + rdx]
sbb ecx, ecx
inc r8d
add r9, 4
and ecx, 0x1b
xor ecx, eax
xor ecx, edx
cmp r8d, r11d
movzx edx, cl
jl 0x13030
mov edx, 1
lea r8, [0x00016718]
lea r9d, [rdx + 9]
mov eax, edx
mov dword [r8], edx
and al, 0x80
neg al
lea eax, [rdx + rdx]
sbb ecx, ecx
add r8, 4
and ecx, 0x1b
xor ecx, eax
sub r9, 1
movzx edx, cl
jne 0x1306b
mov byte [0x000188a3], r9b
lea r8d, [r9 + 1]
mov byte [0x00016740], 0x63
lea r9, [0x00016741]
lea r10, [rsp + 4]
lea rbx, [0x00010000]
movsxd rcx, dword [r10]
lea rax, [rsp + 0x7fc]
add r10, 4
shl rcx, 2
sub rax, rcx
mov edx, dword [rax]
mov ecx, edx
sar ecx, 7
lea eax, [rdx + rdx]
or ecx, eax
movzx eax, cl
xor edx, eax
mov ecx, eax
add eax, eax
sar ecx, 7
or ecx, eax
movzx eax, cl
xor edx, eax
mov ecx, eax
add eax, eax
sar ecx, 7
or ecx, eax
movzx eax, cl
xor edx, eax
mov ecx, eax
add eax, eax
sar ecx, 7
or ecx, eax
xor ecx, 0x63
movzx eax, cl
xor edx, eax
movsxd rax, edx
mov byte [r9], dl
inc r9
mov byte [rax + rbx + 0x8840], r8b
inc r8d
cmp r8d, r11d
jl 0x130b0
mov ebp, dword [rsp + 0x38]
mov r13d, dword [rsp + 0x34]
mov r14d, dword [rsp + 0x2c]
mov r12d, dword [rsp + 0x24]
xor r10d, r10d
movzx edx, byte [r10 + rbx + 0x6740]
movzx r9d, byte [r10 + rbx + 0x8840]
mov eax, edx
and al, 0x80
neg al
lea eax, [rdx + rdx]
sbb ecx, ecx
and ecx, 0x1b
xor ecx, eax
movzx eax, cl
mov ecx, eax
xor ecx, edx
shl ecx, 8
xor ecx, edx
shl ecx, 8
xor ecx, edx
shl ecx, 8
xor ecx, eax
mov dword [rbx + r10*4 + 0x8440], ecx
rol ecx, 8
mov dword [rbx + r10*4 + 0x8040], ecx
rol ecx, 8
mov dword [rbx + r10*4 + 0x7c40], ecx
rol ecx, 8
mov dword [rbx + r10*4 + 0x7840], ecx
test r9d, r9d
je 0x131ce
movsxd rax, r9d
mov ecx, dword [rsp + rax*4]
mov eax, 0x80808081
lea r8d, [rbp + rcx]
imul r8d
add edx, r8d
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0xff
sub r8d, edx
movsxd rax, r8d
mov esi, dword [rsp + rax*4 + 0x400]
jmp 0x131d0
xor esi, esi
test r9d, r9d
je 0x13209
movsxd rax, r9d
mov ecx, dword [rsp + rax*4]
mov eax, 0x80808081
lea r8d, [r12 + rcx]
imul r8d
add edx, r8d
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0xff
sub r8d, edx
movsxd rax, r8d
mov edi, dword [rsp + rax*4 + 0x400]
jmp 0x1320b
xor edi, edi
test r9d, r9d
je 0x13245
movsxd rax, r9d
mov ecx, dword [rsp + rax*4]
mov eax, 0x80808081
lea r8d, [r13 + rcx]
imul r8d
add edx, r8d
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0xff
sub r8d, edx
movsxd rax, r8d
mov ebx, dword [rsp + rax*4 + 0x400]
jmp 0x13247
xor ebx, ebx
test r9d, r9d
je 0x1327e
mov ecx, dword [rsp + r9*4]
mov eax, 0x80808081
lea r8d, [r14 + rcx]
imul r8d
add edx, r8d
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0xff
sub r8d, edx
movsxd rax, r8d
mov ecx, dword [rsp + rax*4 + 0x400]
jmp 0x13280
xor ecx, ecx
shl ecx, 8
inc r10
xor ecx, ebx
lea rbx, [0x00010000]
shl ecx, 8
xor ecx, edi
shl ecx, 8
xor ecx, esi
mov dword [rbx + r10*4 + 0x743c], ecx
rol ecx, 8
mov dword [rbx + r10*4 + 0x703c], ecx
rol ecx, 8
mov dword [rbx + r10*4 + 0x6c3c], ecx
rol ecx, 8
sub r11, 1
mov dword [rbx + r10*4 + 0x683c], ecx
jne 0x13133
lea r11, [rsp + 0x800]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop r12
ret