Function at 0x18003a98c
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 [0x180071080]
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 0x18003aa06
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 0x18003a9d2
xor edx, edx
mov rcx, rbx
call fcn.18003ada8
mov eax, dword [rbx + 0x18]
mov esi, 1
dec eax
lea r11, str.cw
cmp eax, esi
jl 0x18003ab83
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 0x18003aa35
add r8, 4
sub r10, 1
jne 0x18003aa32
mov rcx, rbx
call fcn.18003ade4
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 0x18003aaa0
xor cl, 0x1b
cmp byte [r11], r8b
mov r8b, byte [r11]
jae 0x18003aaad
add r8b, r8b
jmp 0x18003aab4
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 0x18003aadc
xor r8b, 0x1b
mov cl, r9b
add cl, cl
cmp r9b, 0x80
jb 0x18003aaea
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 0x18003ab0a
xor cl, 0x1b
mov al, dl
add al, al
cmp dl, r8b
jb 0x18003ab15
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 0x18003ab2e
xor al, 0x1b
cmp dl, r8b
jae 0x18003ab37
add dl, dl
jmp 0x18003ab3c
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 0x18003aa8f
mov edx, esi
mov rcx, rbx
call fcn.18003ada8
mov eax, dword [rbx + 0x18]
inc esi
dec eax
lea r11, str.cw
cmp esi, eax
jle 0x18003aa29
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 0x18003ab8f
add r8, 4
sub r10, 1
jne 0x18003ab8c
mov rcx, rbx
call fcn.18003ade4
mov edx, dword [rbx + 0x18]
mov rcx, rbx
call fcn.18003ada8
mov eax, dword [rbx + 0x10]
shl eax, 2
cmp eax, edi
jle 0x18003ac0d
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 0x18003abdb
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.18003c160
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