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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x40
mov rax, qword [0x1800764c0]
xor rax, rsp
mov qword [rsp + 0x30], rax
xor eax, eax
xor edi, edi
mov r13, r8
mov qword [rcx], rax
mov qword [rcx + 8], rax
mov eax, dword [rcx + 0x10]
shl eax, 2
mov r10, rdx
mov rbx, rcx
cmp eax, edi
mov r9d, edi
jle 0x18003a73e
mov eax, r9d
inc r9d
cdq
and edx, 3
add eax, edx
mov ecx, eax
and eax, 3
sub eax, edx
sar ecx, 2
movsxd rdx, eax
movsxd rax, ecx
lea rcx, [rbx + rax]
mov al, byte [r10]
inc r10
mov byte [rcx + rdx*4], al
mov eax, dword [rbx + 0x10]
shl eax, 2
cmp r9d, eax
jl 0x18003a70a
xor edx, edx
mov rcx, rbx
call fcn.18003aae0
mov eax, dword [rbx + 0x18]
mov esi, 1
dec eax
lea r11, str.cw
cmp eax, esi
jl 0x18003a8bb
mov r8, rbx
mov r10d, 4
mov r9, rdi
movzx edx, byte [r8 + r9]
mov ecx, edx
and edx, 0xf
shr ecx, 4
shl rcx, 4
add rcx, rdx
mov al, byte [rcx + r11]
mov byte [r8 + r9], al
inc r9
cmp r9, 4
jl 0x18003a76d
add r8, 4
sub r10, 1
jne 0x18003a76a
mov rcx, rbx
call fcn.18003ab1c
mov rax, qword [rbx]
lea r11, [rsp + 0x24]
mov qword [rsp + 0x20], rax
mov rax, qword [rbx + 8]
lea rbp, [rbx + 4]
mov r12d, 4
mov r8b, 0x80
mov qword [rsp + 0x28], rax
mov r10b, byte [r11 - 4]
mov cl, r10b
add cl, cl
cmp r10b, r8b
jb 0x18003a7d8
xor cl, 0x1b
cmp byte [r11], r8b
mov r8b, byte [r11]
jae 0x18003a7e5
add r8b, r8b
jmp 0x18003a7ec
add r8b, r8b
xor r8b, 0x1b
mov dl, byte [r11 + 8]
mov r9b, byte [r11 + 4]
mov al, dl
xor al, r9b
xor al, r8b
mov r8b, byte [r11]
xor al, byte [r11]
add r8b, r8b
xor al, cl
cmp byte [r11], 0x80
mov byte [rbp - 4], al
jb 0x18003a814
xor r8b, 0x1b
mov cl, r9b
add cl, cl
cmp r9b, 0x80
jb 0x18003a822
xor cl, 0x1b
mov al, dl
xor al, cl
mov cl, r9b
xor al, r9b
add cl, cl
xor al, r10b
xor al, r8b
mov r8b, 0x80
mov byte [rbp], al
cmp r9b, r8b
jb 0x18003a842
xor cl, 0x1b
mov al, dl
add al, al
cmp dl, r8b
jb 0x18003a84d
xor al, 0x1b
xor al, dl
xor al, byte [r11]
xor al, r10b
xor al, cl
mov byte [rbp + 4], al
mov al, r10b
add al, al
cmp r10b, r8b
jb 0x18003a866
xor al, 0x1b
cmp dl, r8b
jae 0x18003a86f
add dl, dl
jmp 0x18003a874
add dl, dl
xor dl, 0x1b
xor r9b, al
inc rbp
xor r9b, byte [r11]
inc r11
xor r9b, r10b
xor r9b, dl
sub r12, 1
mov byte [rbp + 7], r9b
jne 0x18003a7c7
mov edx, esi
mov rcx, rbx
call fcn.18003aae0
mov eax, dword [rbx + 0x18]
inc esi
dec eax
lea r11, str.cw
cmp esi, eax
jle 0x18003a761
lea r11, str.cw
mov r8, rbx
mov r10d, 4
mov r9, rdi
movzx edx, byte [r9 + r8]
mov ecx, edx
and edx, 0xf
shr ecx, 4
shl rcx, 4
add rcx, rdx
mov al, byte [rcx + r11]
mov byte [r9 + r8], al
inc r9
cmp r9, 4
jl 0x18003a8c7
add r8, 4
sub r10, 1
jne 0x18003a8c4
mov rcx, rbx
call fcn.18003ab1c
mov edx, dword [rbx + 0x18]
mov rcx, rbx
call fcn.18003aae0
mov eax, dword [rbx + 0x10]
shl eax, 2
cmp eax, edi
jle 0x18003a945
mov eax, edi
inc edi
cdq
and edx, 3
add eax, edx
mov ecx, eax
and eax, 3
sub eax, edx
sar ecx, 2
movsxd rdx, eax
movsxd rax, ecx
lea rcx, [rbx + rax]
mov al, byte [rcx + rdx*4]
mov byte [r13], al
mov eax, dword [rbx + 0x10]
inc r13
shl eax, 2
cmp edi, eax
jl 0x18003a913
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.18003c1a0
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret