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

Disassembly:
sub rsp, 0x88
mov rax, qword [0x0047e2e8]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x60], r13
lea r9, [rsp + 0x30]
mov r13, r8
mov r12, rdx
mov r11d, 4
nop
mov r10, rcx
mov r8d, 4
nop
nop
movzx eax, byte [r10]
inc r9
add r10, 4
dec r8
mov byte [r9 - 1], al
jne 0x401650
inc rcx
dec r11
jne 0x401640
mov r8d, dword [0x0047e004]
lea rcx, [rsp + 0x34]
lea r9d, [r11 + 4]
movzx eax, r8b
add rax, rax
lea rdx, [r13 + rax*8 + 2]
nop
nop
movzx eax, byte [rdx - 2]
inc rcx
add rdx, 4
xor byte [rcx - 5], al
movzx eax, byte [rdx - 5]
xor byte [rcx - 1], al
movzx eax, byte [rdx - 4]
xor byte [rcx + 3], al
movzx eax, byte [rdx - 3]
xor byte [rcx + 7], al
dec r9
jne 0x401690
dec r8b
mov qword [rsp + 0xa8], rbx
mov qword [rsp + 0x58], r14
cmp r8b, 1
lea r14, [0x0047e110]
jb 0x40185a
mov qword [rsp + 0x80], rbp
mov qword [rsp + 0x78], rsi
movzx eax, r8b
add rax, rax
mov byte [rsp + 0x20], 0xe
mov byte [rsp + 0x21], 9
mov byte [rsp + 0x22], 0xd
mov byte [rsp + 0x23], 0xb
movzx ebp, r8b
lea rsi, [r13 + rax*8 + 2]
mov qword [rsp + 0x70], rdi
nop
mov bl, 1
lea r9, [rsp + 0x34]
test bl, bl
je 0x401747
movzx r8d, bl
nop
movzx r10d, byte [r9 + 3]
mov dl, 3
lea rcx, [r9 + 3]
nop
nop
movzx eax, byte [rcx - 1]
dec rcx
add dl, 0xff
mov byte [rcx + 1], al
jne 0x401730
dec r8
mov byte [r9], r10b
jne 0x401720
inc bl
add r9, 4
cmp bl, 4
jb 0x401717
lea rdx, [rsp + 0x30]
mov r9d, 4
nop
mov r8d, 4
nop
nop
nop
movzx eax, byte [rdx]
inc rdx
mov rcx, rax
and eax, 0xf
and rcx, 0xfffffffffffffff0
add rcx, rax
dec r8
movzx eax, byte [rcx + r14]
mov byte [rdx - 1], al
jne 0x401770
dec r9
jne 0x401760
lea rcx, [rsp + 0x34]
mov rdx, rsi
lea r8d, [r9 + 4]
movzx eax, byte [rdx - 2]
inc rcx
add rdx, 4
xor byte [rcx - 5], al
movzx eax, byte [rdx - 5]
xor byte [rcx - 1], al
movzx eax, byte [rdx - 4]
xor byte [rcx + 3], al
movzx eax, byte [rdx - 3]
xor byte [rcx + 7], al
dec r8
jne 0x4017a1
lea rbx, [rsp + 0x30]
lea edi, [r8 + 4]
lea rcx, [rsp + 0x24]
mov rdx, rbx
mov r8d, 4
movzx eax, byte [rdx]
inc rcx
add rdx, 4
dec r8
mov byte [rcx - 1], al
jne 0x4017e0
lea r8, [rsp + 0x28]
lea rdx, [rsp + 0x24]
lea rcx, [rsp + 0x20]
call section..text
lea r11, [rsp + 0x28]
mov rcx, rbx
mov edx, 4
nop
nop
nop
nop
movzx eax, byte [r11]
add rcx, 4
inc r11
dec rdx
mov byte [rcx - 4], al
jne 0x401820
inc rbx
dec rdi
jne 0x4017d2
sub rsi, 0x10
dec rbp
jne 0x401710
mov rdi, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x80]
mov bl, 1
lea r9, [rsp + 0x34]
test bl, bl
je 0x401897
movzx r8d, bl
nop
nop
movzx r10d, byte [r9 + 3]
mov dl, 3
lea rcx, [r9 + 3]
nop
nop
movzx eax, byte [rcx - 1]
dec rcx
add dl, 0xff
mov byte [rcx + 1], al
jne 0x401880
dec r8
mov byte [r9], r10b
jne 0x401870
inc bl
add r9, 4
cmp bl, 4
jb 0x401861
mov rbx, qword [rsp + 0xa8]
lea rdx, [rsp + 0x30]
mov r9d, 4
nop
nop
nop
mov r8d, 4
nop
nop
nop
movzx eax, byte [rdx]
inc rdx
mov rcx, rax
and eax, 0xf
and rcx, 0xfffffffffffffff0
add rcx, rax
dec r8
movzx eax, byte [rcx + r14]
mov byte [rdx - 1], al
jne 0x4018d0
dec r9
jne 0x4018c0
mov r14, qword [rsp + 0x58]
lea rdx, [r13 + 2]
mov r13, qword [rsp + 0x60]
lea rcx, [rsp + 0x34]
lea r8d, [r9 + 4]
nop
movzx eax, byte [rdx - 2]
inc rcx
add rdx, 4
xor byte [rcx - 5], al
movzx eax, byte [rdx - 5]
xor byte [rcx - 1], al
movzx eax, byte [rdx - 4]
xor byte [rcx + 3], al
movzx eax, byte [rdx - 3]
xor byte [rcx + 7], al
dec r8
jne 0x401910
lea rcx, [rsp + 0x30]
lea r9d, [r8 + 4]
nop
nop
nop
nop
mov rdx, r12
mov r8d, 4
nop
nop
movzx eax, byte [rcx]
add rdx, 4
inc rcx
dec r8
mov byte [rdx - 4], al
jne 0x401960
inc r12
dec r9
jne 0x401950
mov r12, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x40]
call fcn.00462020
add rsp, 0x88
ret