Function at 0x403090
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push r15
lea r9, [rcx + 0xf0]
lea r11, [0x00411b00]
push r14
lea r10, [0x00411f00]
push r13
push r12
push rbp
push rdi
lea rdi, [0x00411700]
push rsi
push rbx
sub rsp, 0x48
mov eax, dword [rdx + 4]
mov ebp, dword [rdx + 8]
mov r12d, dword [rdx + 0xc]
mov qword [rsp + 0xa0], r8
mov r8d, dword [rdx]
mov edx, dword [rcx + 0x1e0]
bswap eax
bswap ebp
xor eax, dword [rcx + 0xf4]
bswap r12d
xor ebp, dword [rcx + 0xf8]
shr edx, 1
bswap r8d
xor r8d, dword [rcx + 0xf0]
mov r13d, eax
sub edx, 1
xor r12d, dword [rcx + 0xfc]
mov eax, r8d
shl rdx, 5
lea rsi, [rcx + rdx + 0x110]
mov qword [rsp + 0x30], rsi
lea rsi, [0x00412300]
jmp 0x40319d
mov eax, dword [rdi + r8*4]
mov r8d, dword [rsp + 0xc]
mov ebx, ebx
xor eax, dword [rsi + rbp*4]
xor eax, dword [rsp + 0x10]
xor eax, dword [r11 + r15*4]
xor eax, dword [r10 + r8*4]
mov r8d, dword [rsp + 0x2c]
mov ebp, dword [rsp + 0x38]
mov r8d, dword [rdi + r8*4]
xor r8d, dword [rsi + r14*4]
xor r8d, r13d
xor r8d, dword [r11 + rbp*4]
mov ebp, dword [rsp + 0x14]
xor r8d, dword [r10 + rbp*4]
mov ebp, dword [rsp + 0x20]
mov r13d, r8d
mov r8d, dword [rsp + 0x18]
mov r8d, dword [rdi + r8*4]
xor r8d, dword [rsi + r12*4]
mov r12d, dword [rsp + 0x1c]
xor r8d, dword [rsp + 0x24]
xor r8d, dword [r11 + r12*4]
xor r8d, dword [r10 + rbp*4]
mov ebp, r8d
mov r8d, dword [rsp + 0x28]
mov r12d, dword [rdi + r8*4]
xor r12d, dword [rsi + rcx*4]
xor r12d, dword [rsp + 8]
xor r12d, dword [r11 + rdx*4]
xor r12d, dword [r10 + rbx*4]
mov edx, eax
movzx r8d, r13b
mov ebx, ebp
add r9, 0x20
shr edx, 0x18
mov ecx, dword [rdi + rdx*4]
mov edx, r12d
xor ecx, dword [rsi + r8*4]
movzx r8d, bpl
shr edx, 0x10
xor ecx, dword [r9 - 0x10]
movzx edx, dl
xor ecx, dword [r11 + rdx*4]
movzx edx, bh
xor ecx, dword [r10 + rdx*4]
mov edx, r13d
shr edx, 0x18
mov r15d, ecx
movzx ecx, ah
mov ebx, dword [rdi + rdx*4]
mov edx, eax
xor ebx, dword [rsi + r8*4]
movzx r8d, r12b
shr edx, 0x10
xor ebx, dword [r9 - 0xc]
movzx edx, dl
xor ebx, dword [r11 + rdx*4]
mov edx, r12d
shr r12d, 0x18
movzx edx, dh
xor ebx, dword [r10 + rdx*4]
mov edx, ebp
shr ebp, 0x10
shr edx, 0x18
movzx ebp, bpl
mov edx, dword [rdi + rdx*4]
xor edx, dword [rsi + r8*4]
mov r8d, r13d
shr r8d, 0x10
xor edx, dword [r9 - 8]
movzx r8d, r8b
xor edx, dword [r11 + r8*4]
xor edx, dword [r10 + rcx*4]
mov ecx, r13d
mov r13d, r15d
movzx r8d, al
mov eax, dword [rdi + r12*4]
mov r12d, r13d
mov dword [rsp + 8], r13d
shr r12d, 0x10
movzx ecx, ch
xor eax, dword [rsi + r8*4]
xor eax, dword [r9 - 4]
movzx r13d, r12b
mov r12d, edx
xor eax, dword [r11 + rbp*4]
xor eax, dword [r10 + rcx*4]
shr r12d, 0x18
movzx ecx, dh
mov r14d, dword [r9]
mov r8d, r15d
mov dword [rsp + 0xc], ecx
movzx ecx, ah
mov r15d, eax
shr r8d, 0x18
mov dword [rsp + 0x18], r12d
mov r12d, ebx
shr r15d, 0x10
movzx ebp, bl
mov dword [rsp + 0x14], ecx
shr r12d, 0x10
mov ecx, dword [rsp + 8]
movzx r15d, r15b
mov dword [rsp + 0x10], r14d
movzx r12d, r12b
mov r14d, ebx
movzx ebx, bh
shr r14d, 0x18
mov dword [rsp + 0x1c], r12d
movzx ecx, ch
movzx r12d, al
shr eax, 0x18
mov dword [rsp + 0x2c], r14d
movzx r14d, dl
shr edx, 0x10
mov dword [rsp + 0x38], r13d
mov r13d, dword [r9 + 4]
movzx edx, dl
mov dword [rsp + 0x20], ecx
mov ecx, dword [r9 + 8]
mov dword [rsp + 0x28], eax
mov eax, dword [r9 + 0xc]
mov dword [rsp + 0x24], ecx
movzx ecx, byte [rsp + 8]
mov dword [rsp + 8], eax
cmp qword [rsp + 0x30], r9
jne 0x403120
mov r10d, edx
mov edx, dword [rsp + 0x14]
mov r11d, ecx
mov dword [rsp + 0x3c], ebp
lea r9, str.RRRR_t_t_t_tjjjj
mov ebp, dword [rsp + 0x38]
mov eax, r13d
mov r13d, dword [rsp + 0x2c]
mov edx, dword [r9 + rdx*4]
movzx ecx, byte [r9 + r14*4]
mov dword [rsp + 0x30], r8d
and edx, 0xff00
or edx, ecx
mov esi, edx
mov edx, dword [r9 + rbp*4]
xor esi, eax
mov eax, dword [r9 + r13*4]
and edx, 0xff0000
mov ecx, esi
and eax, 0xff000000
or eax, edx
movzx edx, byte [r9 + r12*4]
mov r12d, dword [rsp + 0x1c]
xor ecx, eax
mov eax, dword [rsp + 0x20]
mov r8d, dword [r9 + r12*4]
bswap ecx
mov eax, dword [r9 + rax*4]
and r8d, 0xff0000
and eax, 0xff00
or eax, edx
mov edx, dword [rsp + 0x18]
xor eax, dword [rsp + 0x24]
mov edx, dword [r9 + rdx*4]
and edx, 0xff000000
or edx, r8d
mov r8d, dword [rsp + 0x28]
xor eax, edx
mov edx, ebx
mov ebx, dword [rsp + 8]
mov edx, dword [r9 + rdx*4]
bswap eax
mov edi, edx
mov edx, r11d
movzx edx, byte [r9 + rdx*4]
and edi, 0xff00
or edx, edi
mov edi, dword [rsp + 0x10]
xor ebx, edx
mov edx, dword [r9 + r8*4]
mov esi, edx
mov edx, r10d
mov r10d, r15d
mov edx, dword [r9 + rdx*4]
and esi, 0xff000000
and edx, 0xff0000
or edx, esi
xor ebx, edx
mov edx, dword [rsp + 0xc]
bswap ebx
mov r8d, dword [r9 + rdx*4]
mov edx, dword [rsp + 0x3c]
movzx edx, byte [r9 + rdx*4]
and r8d, 0xff00
or edx, r8d
xor edi, edx
mov edx, dword [rsp + 0x30]
mov edx, dword [r9 + rdx*4]
mov r9d, dword [r9 + r10*4]
and edx, 0xff000000
and r9d, 0xff0000
or edx, r9d
xor edx, edi
mov rdi, qword [rsp + 0xa0]
bswap edx
mov dword [rdi], edx
mov dword [rdi + 4], ecx
mov dword [rdi + 8], eax
mov dword [rdi + 0xc], ebx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret