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

Disassembly:
test r8, r8
je 0x140002689
push rbp
push r13
mov rbp, rsp
sub rsp, 0x58
mov rax, qword [0x14000a038]
xor rax, rsp
mov qword [rbp - 0x38], rax
mov qword [rsp + 0x80], rbx
mov r11, r8
mov qword [rsp + 0x50], rsi
lea rbx, str.cw
mov qword [rsp + 0x48], rdi
mov r10, rdx
mov qword [rsp + 0x40], r12
mov r13, rcx
mov qword [rsp + 0x38], r14
mov r9d, 0x10
mov qword [rsp + 0x30], r15
mov qword [rbp - 0x50], r8
mov qword [rbp - 0x58], rdx
cmp r9, 0x10
jne 0x140002634
movups xmm0, xmmword [r13 + 0xf0]
lea rax, [rbp - 0x48]
mov r15, r13
sub r15, rax
lea rcx, [rbp - 0x48]
movups xmmword [rbp - 0x48], xmm0
lea r8d, [r9 - 0xc]
nop dword [rax + rax]
mov edx, 4
nop word [rax + rax]
movzx eax, byte [r15 + rcx]
xor byte [rcx], al
inc rcx
sub rdx, 1
jne 0x140002400
sub r8, 1
jne 0x1400023f0
mov r12b, 1
nop dword [rax]
lea r8, [rbp - 0x48]
mov r9d, 4
nop word [rax + rax]
mov rcx, r8
mov edx, 4
nop dword [rax + rax]
movzx eax, byte [rcx]
lea rcx, [rcx + 4]
movzx eax, byte [rax + rbx]
mov byte [rcx - 4], al
sub rdx, 1
jne 0x140002440
inc r8
sub r9, 1
jne 0x140002430
movzx eax, byte [rbp - 0x43]
movzx ecx, byte [rbp - 0x47]
mov byte [rbp - 0x47], al
movzx eax, byte [rbp - 0x3f]
mov byte [rbp - 0x43], al
movzx eax, byte [rbp - 0x3b]
mov byte [rbp - 0x3f], al
movzx eax, byte [rbp - 0x3e]
mov byte [rbp - 0x3b], cl
movzx ecx, byte [rbp - 0x46]
mov byte [rbp - 0x46], al
movzx eax, byte [rbp - 0x3a]
mov byte [rbp - 0x3e], cl
movzx ecx, byte [rbp - 0x42]
mov byte [rbp - 0x42], al
movzx eax, byte [rbp - 0x39]
mov byte [rbp - 0x3a], cl
movzx ecx, byte [rbp - 0x45]
mov byte [rbp - 0x45], al
movzx eax, byte [rbp - 0x3d]
mov byte [rbp - 0x39], al
movzx eax, byte [rbp - 0x41]
mov byte [rbp - 0x3d], al
mov byte [rbp - 0x41], cl
cmp r12b, 0xe
je 0x1400025c5
lea rsi, [rbp - 0x47]
lea r14d, [rdx + 4]
movzx r11d, byte [rsi - 1]
movzx edi, byte [rsi + 2]
movzx edx, r11b
movzx r9d, byte [rsi]
movzx r10d, byte [rsi + 1]
lea rsi, [rsi + 4]
xor dl, r9b
movzx r8d, r10b
movzx eax, dl
xor r8b, r9b
shr al, 7
add dl, dl
movzx eax, al
movzx ebx, r8b
imul ecx, eax, 0x1b
xor bl, dil
xor bl, r11b
movzx eax, r8b
shr al, 7
add r8b, r8b
movzx eax, al
xor cl, dl
movzx edx, dil
xor cl, r11b
xor dl, r10b
xor cl, bl
mov byte [rsi - 5], cl
imul ecx, eax, 0x1b
movzx eax, dl
shr al, 7
add dl, dl
movzx eax, al
xor cl, r8b
xor cl, r9b
xor cl, bl
mov byte [rsi - 4], cl
imul ecx, eax, 0x1b
xor cl, dl
movzx edx, dil
xor cl, r10b
xor dl, r11b
xor cl, bl
movzx eax, dl
mov byte [rsi - 3], cl
add dl, dl
shr al, 7
movzx eax, al
imul ecx, eax, 0x1b
xor cl, dl
xor cl, dil
xor cl, bl
mov byte [rsi - 2], cl
sub r14, 1
jne 0x1400024c3
movzx r8d, r12b
lea rcx, [rbp - 0x48]
shl r8, 4
lea rax, [rbp - 0x48]
sub r8, rcx
lea r9d, [r14 + 4]
add r8, r13
nop word [rax + rax]
mov edx, 4
nop word [rax + rax]
movzx ecx, byte [r8 + rax]
xor byte [rax], cl
inc rax
sub rdx, 1
jne 0x1400025a0
sub r9, 1
jne 0x140002590
inc r12b
lea rbx, str.cw
jmp 0x140002420
lea rcx, [rbp - 0x48]
mov r8d, 4
nop
mov edx, 4
nop word [rax + rax]
movzx eax, byte [r15 + rcx + 0xe0]
xor byte [rcx], al
inc rcx
sub rdx, 1
jne 0x1400025e0
sub r8, 1
jne 0x1400025d0
mov eax, 0xf
nop
movzx ecx, byte [rax + r13 + 0xf0]
lea rdx, [rax + r13]
cmp cl, 0xff
jne 0x140002621
sub rax, 1
mov byte [rdx + 0xf0], 0
jns 0x140002600
jmp 0x140002629
inc cl
mov byte [rdx + 0xf0], cl
mov r10, qword [rbp - 0x58]
xor r9d, r9d
mov r11, qword [rbp - 0x50]
movzx eax, byte [rbp + r9 - 0x48]
inc r9
xor byte [r10], al
inc r10
sub r11, 1
mov qword [rbp - 0x58], r10
mov qword [rbp - 0x50], r11
jne 0x1400023c0
mov r15, qword [rsp + 0x30]
mov r14, qword [rsp + 0x38]
mov r12, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x80]
mov rcx, qword [rbp - 0x38]
xor rcx, rsp
call fcn.140003a40
add rsp, 0x58
pop r13
pop rbp
ret