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

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x90
mov rax, qword [0x140037008]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r15, rdx
mov rsi, rcx
mov qword [rbp - 0x11], rcx
mov qword [rbp - 9], rcx
xor ecx, ecx
lea eax, [r8 - 0x10]
test eax, 0xffffffe7
jne 0x1400046bf
cmp r8d, 0x28
je 0x1400046bf
mov dword [rbp - 0x49], ecx
mov dword [rbp - 0x45], 1
mov dword [rbp - 0x41], 2
mov dword [rbp - 0x3d], 4
mov dword [rbp - 0x39], 8
mov dword [rbp - 0x35], 0x10
mov dword [rbp - 0x31], 0x20
mov dword [rbp - 0x2d], 0x40
mov dword [rbp - 0x29], 0x80
mov dword [rbp - 0x25], 0x1b
mov dword [rbp - 0x21], 0x36
mov eax, r8d
cdq
and edx, 3
add eax, edx
sar eax, 2
movsxd rdi, eax
cmp r8d, 0x10
je 0x14000447b
cmp r8d, 0x18
je 0x14000446d
cmp r8d, 0x20
jne 0x1400046a5
lea r14d, [rcx + 0x3c]
mov r12d, 0xf0
jmp 0x140004487
mov r14d, 0x34
mov r12d, 0xd0
jmp 0x140004487
mov r14d, 0x2c
mov r12d, 0xb0
mov r13, r12
xorps xmm0, xmm0
mov ebx, r14d
movdqu xmmword [rbp - 1], xmm0
mov qword [rbp + 0xf], rcx
mov edx, r14d
call fcn.140017d40
mov qword [rbp - 1], rax
lea r8, [rbx*4]
lea rbx, [r8 + rax]
mov qword [rbp + 0xf], rbx
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov qword [rbp + 7], rbx
test edi, edi
jle 0x1400044e3
xor edx, edx
nop dword [rax]
mov ecx, dword [r15 + rdx*4]
mov rax, qword [rbp - 1]
mov dword [rax + rdx*4], ecx
inc rdx
cmp rdx, rdi
jl 0x1400044d0
mov r10d, edi
cmp edi, r14d
jge 0x1400045de
xor r9d, r9d
lea rbx, [rdi*4]
lea rsi, str.cw
nop dword [rax]
nop word [rax + rax]
lea rax, [rbx + r9]
mov r11, qword [rbp - 1]
mov ecx, dword [rax + r11 - 4]
mov eax, r10d
cdq
idiv edi
movsxd r15, eax
test edx, edx
jne 0x140004574
ror ecx, 8
mov r8d, ecx
mov eax, ecx
shr rax, 0x10
movzx ecx, al
movzx ecx, byte [rcx + rsi]
mov eax, r8d
shr rax, 0x18
movzx eax, byte [rax + rsi]
shl eax, 8
or ecx, eax
shl ecx, 8
mov eax, r8d
shr rax, 8
movzx edx, al
movzx eax, byte [rdx + rsi]
or ecx, eax
shl ecx, 8
movzx eax, r8b
movzx edx, byte [rax + rsi]
or ecx, edx
xor ecx, dword [rbp + r15*4 - 0x49]
jmp 0x1400045bf
cmp edi, 6
jle 0x1400045bf
cmp edx, 4
jne 0x1400045bf
mov r8, rcx
mov rax, rcx
shr rax, 0x10
movzx ecx, al
movzx ecx, byte [rcx + rsi]
mov rax, r8
shr rax, 0x18
movzx eax, byte [rax + rsi]
shl eax, 8
or ecx, eax
shl ecx, 8
mov rax, r8
shr rax, 8
movzx edx, al
movzx eax, byte [rdx + rsi]
or ecx, eax
shl ecx, 8
movzx eax, r8b
movzx edx, byte [rax + rsi]
or ecx, edx
xor ecx, dword [r9 + r11]
lea rax, [r9 + r11]
mov dword [rax + rbx], ecx
inc r10d
add r9, 4
cmp r10d, r14d
jl 0x140004510
mov rsi, qword [rbp - 0x11]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsi], xmm0
mov qword [rsi], rax
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rax
mov rcx, r13
call fcn.140027aa0
mov rbx, rax
mov qword [rsi], rax
add rax, r13
mov qword [rsi + 0x10], rax
mov r8, r12
xor edx, edx
mov rcx, rbx
call sub.VCRUNTIME140.dll_memset
add rbx, r13
mov qword [rsi + 8], rbx
mov r8, qword [rbp + 7]
mov rdx, qword [rbp - 1]
sub r8, rdx
sar r8, 2
lea r8, [r8*4]
mov rcx, qword [rsi]
call sub.VCRUNTIME140.dll_memcpy
nop
mov rcx, qword [rbp - 1]
test rcx, rcx
je 0x14000467b
mov rdx, qword [rbp + 0xf]
sub rdx, rcx
and rdx, 0xfffffffffffffffc
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004676
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004676
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140027bb4
mov rax, rsi
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140027a80
mov rbx, qword [rsp + 0xd8]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rcx, [rbp - 0x49]
call fcn.140001240
lea rdx, [0x140034838]
lea rcx, [rbp - 0x49]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rcx, [rbp - 0x49]
call fcn.140001240
lea rdx, [0x140034838]
lea rcx, [rbp - 0x49]
call sub.VCRUNTIME140.dll__CxxThrowException
int3