Function at 0x2016c1930
Capabilities:
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, 0x98
test r8, r8
mov r15, rdx
mov qword [rsp + 0xe0], rcx
mov qword [rsp + 0xf0], r8
lea rdx, [rcx + 0xf0]
je 0x2016c228e
movzx eax, byte [rcx + 0xf0]
mov rsi, rcx
mov r14, r15
mov qword [rsp + 0x88], rdx
mov qword [rsp + 0x78], 0
add rsi, 0x10
mov qword [rsp + 0x80], rsi
mov rsi, rcx
lea r11, [0x2016f6120]
add rsi, 0xe0
mov qword [rsp + 0x70], rsi
mov rsi, rdx
mov edx, eax
xor dl, byte [r14]
movzx r12d, byte [r14 + 1]
movzx edi, byte [r14 + 2]
movzx r9d, byte [r14 + 4]
mov byte [r14], dl
xor r12b, byte [rsi + 1]
mov ebp, edx
movzx edx, byte [r14 + 3]
movzx r8d, byte [r14 + 5]
movzx ecx, byte [r14 + 6]
mov byte [r14 + 1], r12b
xor dil, byte [rsi + 2]
movzx eax, byte [r14 + 7]
movzx ebx, byte [r14 + 8]
movzx r10d, byte [r14 + 9]
mov byte [r14 + 2], dil
xor dl, byte [rsi + 3]
movzx r13d, byte [r14 + 0xa]
mov byte [r14 + 3], dl
xor r9b, byte [rsi + 4]
mov byte [r14 + 4], r9b
xor r8b, byte [rsi + 5]
mov byte [r14 + 5], r8b
xor cl, byte [rsi + 6]
mov byte [r14 + 6], cl
xor al, byte [rsi + 7]
mov byte [r14 + 7], al
xor bl, byte [rsi + 8]
mov byte [rsp + 0x63], al
mov byte [r14 + 8], bl
xor r10b, byte [rsi + 9]
mov byte [r14 + 9], r10b
xor r13b, byte [rsi + 0xa]
mov byte [r14 + 0xa], r13b
movzx r15d, byte [r14 + 0xb]
xor r15b, byte [rsi + 0xb]
movzx eax, byte [r14 + 0xd]
mov byte [r14 + 0xb], r15b
mov byte [rsp + 0x64], r15b
movzx r15d, byte [r14 + 0xc]
xor r15b, byte [rsi + 0xc]
mov byte [r14 + 0xc], r15b
xor al, byte [rsi + 0xd]
mov byte [r14 + 0xd], al
mov byte [rsp + 0x66], al
movzx eax, byte [r14 + 0xe]
xor al, byte [rsi + 0xe]
mov byte [r14 + 0xe], al
mov byte [rsp + 0x67], al
movzx eax, byte [r14 + 0xf]
xor al, byte [rsi + 0xf]
mov rsi, qword [rsp + 0xe0]
mov byte [r14 + 0xf], al
xor bpl, byte [rsi]
mov byte [rsp + 0x68], al
mov byte [r14], bpl
xor r12b, byte [rsi + 1]
mov byte [r14 + 1], r12b
xor dil, byte [rsi + 2]
mov byte [rsp + 0x65], r12b
mov r12, rsi
mov byte [r14 + 2], dil
xor dl, byte [rsi + 3]
mov byte [rsp + 0x50], dil
mov rdi, rsi
mov byte [r14 + 3], dl
xor r9b, byte [rsi + 4]
mov byte [rsp + 0x6c], dl
mov byte [r14 + 4], r9b
xor r8b, byte [rsi + 5]
movzx eax, byte [rsp + 0x63]
mov byte [r14 + 5], r8b
xor cl, byte [rsi + 6]
mov byte [r14 + 6], cl
xor al, byte [rsi + 7]
mov byte [r14 + 7], al
xor bl, byte [rsi + 8]
mov byte [r14 + 8], bl
xor r10b, byte [rsi + 9]
mov byte [r14 + 9], r10b
movzx edx, byte [rsi + 0xa]
movzx esi, byte [rsp + 0x64]
xor edx, r13d
movzx r13d, byte [rsp + 0x66]
mov byte [r14 + 0xa], dl
xor sil, byte [r12 + 0xb]
mov byte [r14 + 0xb], sil
xor r15b, byte [r12 + 0xc]
mov byte [rsp + 0x6b], sil
mov byte [r14 + 0xc], r15b
xor r13b, byte [r12 + 0xd]
mov esi, r15d
mov r15, r12
movzx r12d, byte [rsp + 0x67]
mov byte [r14 + 0xd], r13b
xor r12b, byte [rdi + 0xe]
movzx edi, byte [rsp + 0x68]
mov byte [r14 + 0xe], r12b
xor dil, byte [r15 + 0xf]
mov r15, r14
mov byte [rsp + 0x6a], dil
mov rdi, qword [rsp + 0x80]
mov r14, rdi
jmp 0x2016c1f9d
mov ebx, ebp
mov edx, esi
xor ebx, r9d
xor edx, eax
mov r12d, ebx
xor r12d, edx
mov edi, r12d
mov r12d, ebx
movzx ebx, bl
shr r12b, 7
add ebx, ebx
movzx r12d, r12b
neg r12d
and r12d, 0x1b
xor ebx, r12d
mov r12d, edi
xor r12d, ebp
xor r12d, ebx
mov ebx, r9d
xor r9d, edi
xor ebx, esi
mov byte [rsp + 0x50], r12b
xor esi, edi
xor edi, eax
mov r12d, ebx
movzx ebx, bl
shr r12b, 7
add ebx, ebx
movzx r12d, r12b
neg r12d
and r12d, 0x1b
xor ebx, r12d
movzx r12d, byte [rsp + 0x68]
xor r9d, ebx
mov ebx, edx
movzx edx, dl
shr bl, 7
mov byte [rsp + 0x6b], r9b
add edx, edx
movzx r9d, bl
mov ebx, esi
movzx esi, byte [rsp + 0x69]
neg r9d
and r9d, 0x1b
xor edx, r9d
xor ebx, edx
mov byte [rsp + 0x6c], bl
mov ebx, ebp
movzx ebp, byte [rsp + 0x64]
xor ebx, eax
mov eax, ecx
movzx r9d, bl
mov edx, r9d
add r9d, r9d
shr dl, 7
movzx edx, dl
neg edx
and edx, 0x1b
xor edx, r9d
xor edi, edx
mov edx, esi
xor eax, r10d
xor edx, r8d
mov ebx, edx
xor ebx, eax
mov r9d, ebx
mov ebx, edx
movzx edx, dl
shr bl, 7
add edx, edx
movzx ebx, bl
neg ebx
and ebx, 0x1b
xor edx, ebx
mov ebx, esi
xor esi, r10d
xor ebx, r9d
xor ebx, edx
mov edx, r8d
xor r8d, r9d
xor edx, ecx
mov byte [rsp + 0x69], bl
xor ecx, r9d
mov ebx, edx
movzx edx, dl
shr bl, 7
add edx, edx
movzx ebx, bl
neg ebx
and ebx, 0x1b
xor edx, ebx
xor r8d, edx
mov edx, eax
movzx eax, al
shr dl, 7
add eax, eax
mov byte [rsp + 0x6d], r8b
movzx edx, dl
neg edx
and edx, 0x1b
xor eax, edx
movzx edx, sil
movzx esi, byte [rsp + 0x63]
xor ecx, eax
mov eax, edx
add edx, edx
shr al, 7
mov byte [rsp + 0x6e], cl
movzx eax, al
neg eax
and eax, 0x1b
xor eax, edx
xor r9d, r10d
movzx r10d, byte [rsp + 0x66]
mov edx, r9d
movzx r9d, byte [rsp + 0x67]
xor edx, eax
mov byte [rsp + 0x6f], dl
mov edx, esi
xor edx, r10d
mov r8d, edx
mov eax, r9d
mov ecx, edx
shr r8b, 7
movzx edx, dl
xor eax, r13d
movzx r8d, r8b
add edx, edx
xor ecx, eax
neg r8d
and r8d, 0x1b
xor edx, r8d
mov r8d, esi
xor esi, r13d
xor r8d, ecx
mov ebx, r8d
xor ebx, edx
mov edx, r10d
xor r10d, ecx
xor edx, r9d
mov r8d, edx
movzx edx, dl
shr r8b, 7
add edx, edx
movzx r8d, r8b
neg r8d
and r8d, 0x1b
xor edx, r8d
movzx r8d, sil
shr sil, 7
xor r10d, edx
mov edx, eax
movzx eax, al
shr dl, 7
add eax, eax
add r8d, r8d
movzx edx, dl
neg edx
and edx, 0x1b
xor eax, edx
mov edx, r9d
xor edx, ecx
xor edx, eax
movzx eax, sil
neg eax
and eax, 0x1b
xor eax, r8d
xor ecx, r13d
movzx r13d, byte [rsp + 0x65]
mov r8d, ebp
xor ecx, eax
movzx eax, byte [rsp + 0x6a]
mov byte [rsp + 0x63], cl
xor r8d, r13d
xor eax, r12d
mov esi, eax
xor esi, r8d
mov ecx, esi
mov esi, r8d
movzx r8d, r8b
shr sil, 7
add r8d, r8d
movzx r9d, sil
neg r9d
and r9d, 0x1b
xor r8d, r9d
mov r9d, ebp
xor r9d, ecx
mov esi, r9d
xor esi, r8d
mov r8d, r13d
xor r13d, ecx
xor r8d, r12d
mov r9d, r8d
movzx r8d, r8b
shr r9b, 7
add r8d, r8d
movzx r9d, r9b
neg r9d
and r9d, 0x1b
xor r8d, r9d
movzx r9d, byte [rsp + 0x6a]
xor r13d, r8d
mov r8d, eax
movzx eax, al
shr r8b, 7
add eax, eax
movzx r8d, r8b
neg r8d
and r8d, 0x1b
xor eax, r8d
mov r8d, r12d
xor r8d, ecx
mov r12d, r8d
mov r8d, ebp
xor r8d, r9d
xor r12d, eax
mov eax, r8d
movzx r8d, r8b
shr al, 7
movzx eax, al
neg eax
and eax, 0x1b
add r8d, r8d
xor ecx, r9d
movzx r9d, byte [rsp + 0x50]
xor eax, r8d
xor ecx, eax
movzx eax, byte [rsp + 0x6e]
mov r8d, ecx
movzx ecx, byte [rsp + 0x6f]
mov byte [rsp + 0x64], r8b
mov rbp, r9
shl rcx, 8
or rcx, rax
movzx eax, byte [rsp + 0x6d]
shl rcx, 8
or rcx, rax
movzx eax, byte [rsp + 0x69]
shl rcx, 8
or rcx, rax
movzx eax, dil
shl rcx, 8
or rcx, rax
movzx eax, byte [rsp + 0x6c]
shl rcx, 8
or rcx, rax
movzx eax, byte [rsp + 0x6b]
shl rcx, 8
or rcx, rax
movzx eax, r8b
movzx r8d, r12b
shl rax, 8
shl rcx, 8
or rax, r8
movzx r8d, r13b
or rcx, r9
shl rax, 8
mov qword [rsp + 0x50], rcx
or rax, r8
movzx r8d, sil
shl rax, 8
or rax, r8
movzx r8d, byte [rsp + 0x63]
shl rax, 8
or rax, r8
movzx r8d, dl
shl rax, 8
or rax, r8
movzx r8d, r10b
shl rax, 8
or rax, r8
movzx r8d, bl
shl rax, 8
mov rcx, rax
or rcx, r8
mov qword [rsp + 0x58], rcx
movdqa xmm1, xmmword [rsp + 0x50]
movups xmmword [r15], xmm1
xor bpl, byte [r14]
add r14, 0x10
mov byte [r15], bpl
movzx r9d, byte [rsp + 0x6b]
xor r9b, byte [r14 - 0xf]
movzx eax, byte [rsp + 0x6c]
movzx r8d, byte [rsp + 0x6d]
movzx ecx, byte [rsp + 0x6e]
mov byte [r15 + 1], r9b
xor al, byte [r14 - 0xe]
mov byte [rsp + 0x65], r9b
movzx r9d, byte [rsp + 0x69]
mov byte [r15 + 2], al
xor dil, byte [r14 - 0xd]
mov byte [rsp + 0x50], al
movzx eax, byte [rsp + 0x6f]
mov byte [r15 + 3], dil
xor r9b, byte [r14 - 0xc]
mov byte [rsp + 0x6c], dil
movzx edi, byte [rsp + 0x63]
mov byte [r15 + 4], r9b
xor r8b, byte [r14 - 0xb]
mov byte [r15 + 5], r8b
xor cl, byte [r14 - 0xa]
mov byte [r15 + 6], cl
xor al, byte [r14 - 9]
mov byte [r15 + 7], al
xor bl, byte [r14 - 8]
mov byte [r15 + 8], bl
xor r10b, byte [r14 - 7]
mov byte [r15 + 9], r10b
xor dl, byte [r14 - 6]
mov byte [r15 + 0xa], dl
xor dil, byte [r14 - 5]
mov byte [rsp + 0x6b], dil
mov byte [r15 + 0xb], dil
xor sil, byte [r14 - 4]
movzx edi, byte [rsp + 0x64]
mov byte [r15 + 0xc], sil
xor r13b, byte [r14 - 3]
mov byte [r15 + 0xd], r13b
xor r12b, byte [r14 - 2]
mov byte [r15 + 0xe], r12b
xor dil, byte [r14 - 1]
mov byte [rsp + 0x6a], dil
movzx r9d, r9b
movzx esi, sil
movzx ebx, bl
movzx edi, byte [r11 + r9]
movzx r8d, r8b
movzx r10d, r10b
movzx edx, dl
movzx r9d, byte [r11 + rsi]
movzx r13d, r13b
movzx ecx, cl
movzx r12d, r12b
movzx ebx, byte [r11 + rbx]
movzx eax, al
movzx ebp, bpl
movzx ecx, byte [r11 + rcx]
movzx esi, byte [r11 + rdx]
mov byte [rsp + 0x69], dil
mov byte [rsp + 0x64], r9b
movzx r9d, byte [rsp + 0x65]
movzx edi, byte [rsp + 0x50]
mov byte [rsp + 0x63], bl
movzx edx, byte [rsp + 0x6c]
mov byte [rsp + 0x68], cl
movzx ecx, byte [r11 + r12]
movzx ebx, byte [r11 + r9]
movzx r9d, byte [r11 + r8]
movzx r8d, byte [r11 + r10]
movzx r10d, byte [r11 + r13]
mov byte [rsp + 0x65], bl
movzx r13d, byte [r11 + rax]
movzx ebx, byte [r11 + rdx]
movzx edx, cl
movzx eax, byte [rsp + 0x6b]
mov byte [rsp + 0x66], r10b
movzx r10d, byte [r11 + rdi]
movzx ebp, byte [r11 + rbp]
movzx edi, byte [r11 + rax]
mov byte [rsp + 0x67], r10b
movzx eax, byte [rsp + 0x6a]
mov r10, rbx
shl rbx, 8
or rbx, rdx
movzx edx, r8b
movzx r12d, bpl
shl rbx, 8
or rbx, rdx
movzx edx, byte [rsp + 0x69]
mov byte [rsp + 0x6a], dil
movzx eax, byte [r11 + rax]
shl rbx, 8
or rbx, rdx
shl rbx, 8
movzx edx, al
or rbx, rdx
movzx edx, sil
shl rbx, 8
or rbx, rdx
movzx edx, r9b
shl rbx, 8
or rbx, rdx
movzx edx, dil
movzx edi, byte [rsp + 0x68]
shl rdx, 8
shl rbx, 8
or rbx, r12
or rdx, rdi
movzx edi, byte [rsp + 0x65]
shl rdx, 8
or rdx, rdi
movzx edi, byte [rsp + 0x64]
mov qword [rsp + 0x50], rbx
shl rdx, 8
or rdx, rdi
movzx edi, r13b
shl rdx, 8
or rdx, rdi
movzx edi, byte [rsp + 0x67]
shl rdx, 8
or rdx, rdi
movzx edi, byte [rsp + 0x66]
shl rdx, 8
or rdx, rdi
movzx edi, byte [rsp + 0x63]
shl rdx, 8
mov rbx, rdx
or rbx, rdi
mov qword [rsp + 0x58], rbx
mov rbx, qword [rsp + 0x70]
movdqa xmm0, xmmword [rsp + 0x50]
movups xmmword [r15], xmm0
cmp r14, rbx
jne 0x2016c1b60
mov rdi, qword [rsp + 0xe0]
mov r14, r15
movzx r15d, byte [rsp + 0x69]
movzx edx, byte [rdi + 0xe0]
mov rbx, rdi
xor edx, ebp
mov byte [r14], dl
movzx edi, byte [rdi + 0xe1]
xor edi, r9d
mov byte [r14 + 1], dil
xor sil, byte [rbx + 0xe2]
mov byte [r14 + 2], sil
xor al, byte [rbx + 0xe3]
mov rsi, r14
mov byte [r14 + 3], al
movzx eax, byte [rbx + 0xe4]
xor eax, r15d
mov byte [r14 + 4], al
xor r8b, byte [rbx + 0xe5]
movzx eax, byte [rsp + 0x63]
mov byte [r14 + 5], r8b
xor cl, byte [rbx + 0xe6]
mov byte [r14 + 6], cl
xor r10b, byte [rbx + 0xe7]
mov byte [r14 + 7], r10b
xor al, byte [rbx + 0xe8]
mov byte [r14 + 8], al
movzx eax, byte [rsp + 0x66]
xor al, byte [rbx + 0xe9]
mov byte [r14 + 9], al
movzx eax, byte [rsp + 0x67]
xor al, byte [rbx + 0xea]
mov byte [r14 + 0xa], al
movzx eax, byte [rbx + 0xeb]
xor eax, r13d
mov byte [r14 + 0xb], al
movzx eax, byte [rsp + 0x64]
xor al, byte [rbx + 0xec]
mov byte [r14 + 0xc], al
movzx eax, byte [rsp + 0x65]
xor al, byte [rbx + 0xed]
add qword [rsp + 0x78], 0x10
mov rdi, qword [rsp + 0x78]
mov byte [r14 + 0xd], al
movzx eax, byte [rsp + 0x68]
xor al, byte [rbx + 0xee]
mov byte [r14 + 0xe], al
movzx eax, byte [rsp + 0x6a]
xor al, byte [rbx + 0xef]
cmp rdi, qword [rsp + 0xf0]
mov byte [r14 + 0xf], al
lea rax, [r14 + 0x10]
jae 0x2016c222b
mov r14, rax
jmp 0x2016c19ab
mov rdx, qword [rsp + 0x88]
mov r15, r14
mov rcx, qword [sub.msvcrt.dll_memcpy]
mov r9d, 0x10
mov r8, r15
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call fcn.2016c1500
xor eax, eax
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r15, rdx
jmp 0x2016c2236