Function at 0x20797c550
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov qword [rsp + 0xa0], rcx
mov qword [rsp + 0xb0], r8
test r8, r8
je 0x20797cc58
mov rax, rcx
lea rbx, [rdx + 0x10]
mov r15, rdx
add rax, 0xd0
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x40], rax
mov rax, 0xfffffffffffffff0
sub rax, rdx
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0xa0]
movzx r13d, byte [r15]
movdqu xmm0, xmmword [r15]
mov rbx, qword [rsp + 0xa0]
xor r13b, byte [rax + 0xe0]
movzx esi, byte [r15 + 1]
movzx r8d, byte [r15 + 2]
movzx edi, byte [r15 + 4]
mov byte [r15], r13b
xor sil, byte [rax + 0xe1]
movzx r9d, byte [r15 + 5]
mov byte [r15 + 1], sil
xor r8b, byte [rax + 0xe2]
movzx eax, byte [r15 + 3]
movzx r10d, byte [r15 + 8]
mov byte [r15 + 2], r8b
xor al, byte [rbx + 0xe3]
mov byte [r15 + 3], al
xor dil, byte [rbx + 0xe4]
mov byte [r15 + 4], dil
xor r9b, byte [rbx + 0xe5]
mov byte [r15 + 5], r9b
mov byte [rsp], al
movzx eax, byte [r15 + 6]
xor al, byte [rbx + 0xe6]
mov byte [r15 + 6], al
mov byte [rsp + 0x2f], al
movzx eax, byte [r15 + 7]
xor al, byte [rbx + 0xe7]
movzx r14d, al
mov rax, rbx
mov byte [r15 + 7], r14b
xor r10b, byte [rbx + 0xe8]
mov byte [r15 + 8], r10b
movzx ebx, byte [r15 + 9]
mov rdx, qword [rsp + 0xa0]
xor bl, byte [rax + 0xe9]
movzx r11d, byte [r15 + 0xa]
movzx r12d, byte [r15 + 0xc]
mov byte [r15 + 9], bl
xor r11b, byte [rax + 0xea]
movzx eax, byte [r15 + 0xb]
mov byte [r15 + 0xa], r11b
xor al, byte [rdx + 0xeb]
movzx ecx, al
movzx ebp, byte [r15 + 0xd]
movzx eax, byte [r15 + 0xe]
mov byte [r15 + 0xb], cl
xor r12b, byte [rdx + 0xec]
mov byte [r15 + 0xc], r12b
xor bpl, byte [rdx + 0xed]
mov byte [r15 + 0xd], bpl
xor al, byte [rdx + 0xee]
mov byte [r15 + 0xe], al
movzx edx, byte [r15 + 0xf]
mov byte [rsp + 0x30], al
mov rax, qword [rsp + 0xa0]
xor dl, byte [rax + 0xef]
mov rax, qword [rsp + 0x40]
mov byte [r15 + 0xf], dl
mov qword [rsp + 0x38], rax
nop dword [rax]
movzx r10d, r10b
movzx r13d, r13b
movzx edi, dil
movzx r12d, r12b
movzx ebx, bl
movzx r11d, r11b
movzx ebp, bpl
movzx esi, sil
lea rax, [0x207a42d40]
movzx r9d, r9b
movzx r8d, r8b
movzx edx, dl
movzx r13d, byte [rax + r13]
movzx edi, byte [rax + rdi]
movzx eax, byte [rax + r10]
lea r10, [0x207a42d40]
movzx r12d, byte [r10 + r12]
mov byte [rsp + 0x2c], al
movzx eax, byte [rsp + 0x30]
mov byte [rsp + 0x20], r12b
mov r12, r10
movzx r10d, byte [r10 + rbp]
movzx ebx, byte [r12 + rbx]
movzx r11d, byte [r12 + r11]
mov rbp, r12
movzx esi, byte [r12 + rsi]
movzx r9d, byte [r12 + r9]
mov byte [rsp + 0x2d], bl
movzx ebx, byte [r12 + rax]
movzx eax, byte [rsp + 0x2f]
movzx r8d, byte [r12 + r8]
mov byte [rsp + 0x2e], r11b
mov r11, r12
movzx r11d, byte [r11 + rcx]
movzx r12d, byte [r12 + rax]
mov rax, rbp
movzx ebp, byte [rbp + r14]
mov rcx, rax
movzx r14d, byte [rax + rdx]
movzx eax, byte [rsp]
movzx edx, r11b
shl rdx, 8
movzx ecx, byte [rcx + rax]
movzx eax, bl
or rdx, rax
movzx eax, sil
shl rdx, 8
mov byte [rsp + 0x2f], cl
or rdx, rax
movzx eax, dil
shl rdx, 8
or rdx, rax
movzx eax, bpl
shl rdx, 8
or rdx, rax
movzx eax, byte [rsp + 0x2e]
shl rdx, 8
or rdx, rax
movzx eax, r10b
shl rdx, 8
or rdx, rax
movzx eax, r13b
mov qword [rsp + 0x30], rax
movzx eax, cl
movzx ecx, r12b
shl rdx, 8
shl rax, 8
or rdx, qword [rsp + 0x30]
or rax, rcx
movzx ecx, byte [rsp + 0x2d]
mov qword [rsp], rdx
shl rax, 8
or rax, rcx
movzx ecx, byte [rsp + 0x20]
shl rax, 8
or rax, rcx
movzx ecx, r14b
shl rax, 8
or rax, rcx
movzx ecx, r8b
shl rax, 8
or rax, rcx
movzx ecx, r9b
shl rax, 8
or rax, rcx
movzx ecx, byte [rsp + 0x2c]
shl rax, 8
mov rdx, rax
or rdx, rcx
mov qword [rsp + 8], rdx
mov rax, qword [rsp + 0x38]
movdqu xmm1, xmmword [rsp]
movzx edx, byte [rsp + 0x2e]
movzx ecx, byte [rsp + 0x2c]
movups xmmword [r15], xmm1
xor r13b, byte [rax]
mov byte [r15], r13b
xor r10b, byte [rax + 1]
mov byte [r15 + 1], r10b
xor dl, byte [rax + 2]
mov byte [r15 + 2], dl
xor bpl, byte [rax + 3]
mov byte [r15 + 3], bpl
xor dil, byte [rax + 4]
mov byte [r15 + 4], dil
xor sil, byte [rax + 5]
mov byte [r15 + 5], sil
xor bl, byte [rax + 6]
mov byte [r15 + 6], bl
xor r11b, byte [rax + 7]
mov byte [r15 + 7], r11b
xor cl, byte [rax + 8]
mov byte [r15 + 8], cl
xor r9b, byte [rax + 9]
mov byte [r15 + 9], r9b
xor r8b, byte [rax + 0xa]
mov byte [rsp], dl
mov rdx, rax
mov byte [r15 + 0xa], r8b
xor r14b, byte [rax + 0xb]
mov byte [rsp + 0x2c], cl
movzx eax, byte [rsp + 0x20]
mov ecx, r14d
mov byte [r15 + 0xb], r14b
xor al, byte [rdx + 0xc]
mov byte [r15 + 0xc], al
movzx r14d, byte [rsp + 0x2d]
xor r14b, byte [rdx + 0xd]
mov byte [r15 + 0xd], r14b
xor r12b, byte [rdx + 0xe]
mov byte [rsp + 0x20], r14b
movzx r14d, byte [rsp + 0x2f]
mov byte [r15 + 0xe], r12b
xor r14b, byte [rdx + 0xf]
mov byte [r15 + 0xf], r14b
cmp rdx, qword [rsp + 0xa0]
je 0x20797cb3a
mov qword [rsp + 0x20], r15
mov rax, r15
movzx r8d, byte [rax]
movzx esi, byte [rax + 1]
movzx edx, byte [rax + 2]
movzx ebp, byte [rax + 3]
mov ecx, r8d
lea r9d, [r8 + r8]
mov r15d, esi
mov byte [rsp], sil
shr cl, 7
shr r15b, 7
lea ecx, [rcx + rcx*2]
lea r15d, [r15 + r15*2]
shr bpl, 7
lea ecx, [rcx + rcx*8]
lea r15d, [r15 + r15*8]
xor r9d, ecx
lea ebp, [rbp + rbp*2]
mov r13d, r9d
mov edi, r9d
mov byte [rsp + 0x2c], r9b
movzx r9d, byte [rax + 3]
shr r13b, 7
lea ecx, [rdi + rdi]
lea r13d, [r13 + r13*2]
lea r13d, [r13 + r13*8]
xor r13d, ecx
mov ebx, r13d
lea ecx, [r13 + r13]
shr bl, 7
lea ebx, [rbx + rbx*2]
lea ebx, [rbx + rbx*8]
xor ebx, ecx
lea ecx, [rsi + rsi]
xor r15d, ecx
mov r14d, r15d
lea ecx, [r15 + r15]
shr r14b, 7
mov edi, r14d
mov r14d, edx
lea edi, [rdi + rdi*2]
shr r14b, 7
lea edi, [rdi + rdi*8]
lea r14d, [r14 + r14*2]
xor edi, ecx
lea r14d, [r14 + r14*8]
mov r11d, edi
lea ecx, [rdi + rdi]
shr r11b, 7
lea r11d, [r11 + r11*2]
lea r11d, [r11 + r11*8]
xor r11d, ecx
lea ecx, [rdx + rdx]
xor r14d, ecx
mov r12d, r14d
shr r12b, 7
lea r12d, [r12 + r12*2]
lea ecx, [r12 + r12*8]
lea r12d, [r14 + r14]
xor r12d, ecx
mov r10d, r12d
shr r10b, 7
lea r10d, [r10 + r10*2]
lea ecx, [r10 + r10*8]
lea r10d, [r12 + r12]
xor r10d, ecx
lea ecx, [rbp + rbp*8]
lea ebp, [r9 + r9]
xor ebp, ecx
mov r9d, ebp
shr r9b, 7
mov esi, r9d
lea esi, [rsi + rsi*2]
lea ecx, [rsi + rsi*8]
lea esi, [rbp + rbp]
xor esi, ecx
mov r9d, esi
shr r9b, 7
lea r9d, [r9 + r9*2]
lea ecx, [r9 + r9*8]
lea r9d, [rsi + rsi]
xor r9d, ecx
movzx ecx, byte [rsp]
xor ecx, edx
xor cl, byte [rax + 3]
xor cl, byte [rsp + 0x2c]
xor ecx, r15d
xor ecx, r13d
xor ecx, r12d
xor ecx, ebx
xor ecx, r11d
xor ecx, r10d
add rax, 4
xor ecx, r9d
mov byte [rax - 4], cl
mov ecx, r8d
xor r8b, byte [rsp]
xor ecx, edx
xor cl, byte [rax - 1]
xor ecx, r15d
xor ecx, r14d
xor ecx, edi
xor ecx, esi
xor ecx, ebx
xor ecx, r11d
xor ecx, r10d
xor ecx, r9d
mov byte [rax - 3], cl
movzx ecx, byte [rax - 1]
xor ecx, r8d
xor r8d, edx
xor r8b, byte [rsp + 0x2c]
xor ecx, r14d
xor ecx, ebp
xor ebp, r8d
xor ecx, r13d
xor edi, ebp
xor r12d, ecx
xor esi, edi
xor r12d, ebx
xor ebx, esi
xor r12d, r11d
xor r11d, ebx
xor r12d, r10d
xor r10d, r11d
xor r12d, r9d
xor r9d, r10d
mov byte [rax - 2], r12b
mov byte [rax - 1], r9b
cmp rax, qword [rsp + 0x18]
jne 0x20797c91c
mov r15, qword [rsp + 0x20]
sub qword [rsp + 0x38], 0x10
movzx eax, byte [r15 + 6]
movzx ebp, byte [r15 + 0xd]
movzx ebx, byte [r15 + 9]
movzx r9d, byte [r15 + 5]
movzx esi, byte [r15 + 1]
movzx r8d, byte [r15 + 2]
mov byte [rsp + 0x2f], al
movzx eax, byte [r15 + 0xe]
movzx r11d, byte [r15 + 0xa]
movzx r14d, byte [r15 + 7]
movzx ecx, byte [r15 + 0xb]
movzx edx, byte [r15 + 0xf]
movzx r13d, byte [r15]
mov byte [rsp + 0x30], al
movzx eax, byte [r15 + 3]
movzx edi, byte [r15 + 4]
movzx r10d, byte [r15 + 8]
movzx r12d, byte [r15 + 0xc]
mov byte [rsp], al
jmp 0x20797c6e0
mov byte [rsp + 0x2d], al
mov rax, qword [rsp + 0xa0]
add r15, 0x10
movzx edx, byte [rsp + 0x20]
mov byte [rsp + 0x20], r12b
movzx r12d, byte [rsp]
mov byte [rsp], r14b
mov r14d, r13d
mov r13d, r10d
xor r14b, byte [rax + 0xf0]
movzx r10d, byte [rsp + 0x2c]
mov byte [r15 - 0x10], r14b
xor r13b, byte [rax + 0xf1]
mov byte [r15 - 0xf], r13b
xor r12b, byte [rax + 0xf2]
mov byte [r15 - 0xe], r12b
xor bpl, byte [rax + 0xf3]
mov byte [r15 - 0xd], bpl
xor dil, byte [rax + 0xf4]
mov byte [r15 - 0xc], dil
xor sil, byte [rax + 0xf5]
mov byte [r15 - 0xb], sil
xor bl, byte [rax + 0xf6]
mov byte [r15 - 0xa], bl
xor r11b, byte [rax + 0xf7]
mov byte [r15 - 9], r11b
movzx ebx, byte [rax + 0xf8]
xor ebx, r10d
mov byte [r15 - 8], bl
xor r9b, byte [rax + 0xf9]
mov byte [r15 - 7], r9b
xor r8b, byte [rax + 0xfa]
mov byte [r15 - 6], r8b
xor cl, byte [rax + 0xfb]
mov byte [r15 - 5], cl
movzx ebx, byte [rsp + 0x2d]
xor bl, byte [rax + 0xfc]
mov rax, qword [rsp + 0xa0]
movzx r10d, byte [rsp + 0x20]
movzx r11d, byte [rsp]
mov byte [r15 - 4], bl
xor dl, byte [rax + 0xfd]
add qword [rsp + 0x18], 0x10
mov byte [r15 - 3], dl
xor r10b, byte [rax + 0xfe]
mov byte [r15 - 2], r10b
xor r11b, byte [rax + 0xff]
mov byte [r15 - 1], r11b
mov rbx, qword [rsp + 0x48]
movups xmmword [rax + 0xf0], xmm0
mov rax, qword [rsp + 0x18]
add rbx, rax
cmp qword [rsp + 0xb0], rbx
ja 0x20797c5a2
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret