Function at 0x1800410c4
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 [0x1800824d0]
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 0x18004113e
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 0x18004110a
xor edx, edx
mov rcx, rbx
call fcn.1800414e0
mov eax, dword [rbx + 0x18]
mov esi, 1
dec eax
lea r11, str.cw
cmp eax, esi
jl 0x1800412bb
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 0x18004116d
add r8, 4
sub r10, 1
jne 0x18004116a
mov rcx, rbx
call fcn.18004151c
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 0x1800411d8
xor cl, 0x1b
cmp byte [r11], r8b
mov r8b, byte [r11]
jae 0x1800411e5
add r8b, r8b
jmp 0x1800411ec
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 0x180041214
xor r8b, 0x1b
mov cl, r9b
add cl, cl
cmp r9b, 0x80
jb 0x180041222
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 0x180041242
xor cl, 0x1b
mov al, dl
add al, al
cmp dl, r8b
jb 0x18004124d
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 0x180041266
xor al, 0x1b
cmp dl, r8b
jae 0x18004126f
add dl, dl
jmp 0x180041274
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 0x1800411c7
mov edx, esi
mov rcx, rbx
call fcn.1800414e0
mov eax, dword [rbx + 0x18]
inc esi
dec eax
lea r11, str.cw
cmp esi, eax
jle 0x180041161
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 0x1800412c7
add r8, 4
sub r10, 1
jne 0x1800412c4
mov rcx, rbx
call fcn.18004151c
mov edx, dword [rbx + 0x18]
mov rcx, rbx
call fcn.1800414e0
mov eax, dword [rbx + 0x10]
shl eax, 2
cmp eax, edi
jle 0x180041345
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 0x180041313
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.180042bb0
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