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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x30], 0xfffffffffffffffe
mov qword [rsp + 0xc8], rbx
mov rax, qword [0x14031f2d0]
xor rax, rsp
mov qword [rbp - 8], rax
mov r15, rdx
mov r14, rcx
mov qword [rbp - 0x28], rcx
lea eax, [r8 - 0x10]
test eax, 0xffffffe7
jne 0x1400cb004
cmp r8d, 0x28
je 0x1400cb004
xor ebx, ebx
mov dword [rbp - 0x60], ebx
mov dword [rbp - 0x5c], 1
mov dword [rbp - 0x58], 2
mov dword [rbp - 0x54], 4
mov dword [rbp - 0x50], 8
mov dword [rbp - 0x4c], InitCommonControls
mov dword [rbp - 0x48], 0x20
mov dword [rbp - 0x44], 0x40
mov dword [rbp - 0x40], 0x80
mov dword [rbp - 0x3c], 0x1b
mov dword [rbp - 0x38], gethostname
mov eax, r8d
cdq
and edx, 3
add eax, edx
sar eax, 2
movsxd rdi, eax
cmp r8d, 0x10
je 0x1400cae1b
cmp r8d, 0x18
je 0x1400cae10
cmp r8d, 0x20
jne 0x1400cafe3
lea esi, [rbx + 0x3c]
lea r12d, [rbx + 0xf]
jmp 0x1400cae24
mov esi, reloc.WS2_32.dll_gethostbyname
lea r12d, [rsi - 0x27]
jmp 0x1400cae24
mov esi, 0x2c
lea r12d, [rsi - 0x21]
xor eax, eax
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x10], rax
mov edx, esi
lea rcx, [rbp - 0x20]
call fcn.1400cc100
nop
test edi, edi
jle 0x1400cae63
mov rdx, rbx
nop word [rax + rax]
mov ecx, dword [r15 + rdx*4]
mov rax, qword [rbp - 0x20]
mov dword [rax + rdx*4], ecx
inc rdx
cmp rdx, rdi
jl 0x1400cae50
mov r9d, edi
cmp edi, esi
jge 0x1400caf56
lea r11, [rdi*4]
lea r13, [0x1402be950]
nop dword [rax]
lea rax, [r11 + rbx]
mov r10, qword [rbp - 0x20]
mov ecx, dword [rax + r10 - 4]
mov eax, r9d
cdq
idiv edi
movsxd r15, eax
test edx, edx
jne 0x1400caee8
ror ecx, 8
mov r8d, ecx
mov eax, ecx
shr rax, 0x10
movzx ecx, al
movzx ecx, byte [rcx + r13]
mov eax, r8d
shr rax, 0x18
movzx eax, byte [rax + r13]
shl eax, 8
or ecx, eax
shl ecx, 8
mov eax, r8d
shr rax, 8
movzx edx, al
movzx eax, byte [rdx + r13]
or ecx, eax
shl ecx, 8
movzx eax, r8b
movzx edx, byte [rax + r13]
or ecx, edx
xor ecx, dword [rbp + r15*4 - 0x60]
jmp 0x1400caf37
cmp edi, 6
jle 0x1400caf37
cmp edx, 4
jne 0x1400caf37
mov r8, rcx
mov rax, rcx
shr rax, 0x10
movzx ecx, al
movzx ecx, byte [rcx + r13]
mov rax, r8
shr rax, 0x18
movzx eax, byte [rax + r13]
shl eax, 8
or ecx, eax
shl ecx, 8
mov rax, r8
shr rax, 8
movzx edx, al
movzx eax, byte [rdx + r13]
or ecx, eax
shl ecx, 8
movzx eax, r8b
movzx edx, byte [rax + r13]
or ecx, edx
mov r8d, dword [rbx + r10]
xor r8d, ecx
lea rax, [r11 + rbx]
mov dword [rax + r10], r8d
inc r9d
add rbx, 4
cmp r9d, esi
jl 0x1400cae80
xor eax, eax
mov qword [r14], rax
mov qword [r14 + 8], rax
mov qword [r14 + 0x10], rax
mov rdx, r12
mov rcx, r14
call fcn.1400cc210
mov r8, qword [rbp - 0x18]
mov rdx, qword [rbp - 0x20]
sub r8, rdx
sar r8, 2
lea r8, [r8*4]
mov rcx, qword [r14]
call fcn.14021eff0
nop
lea rcx, [rbp - 0x20]
call fcn.140004b20
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x1400cafb9
mov rdx, qword [rbp - 0x10]
sub rdx, rcx
sar rdx, 2
lea rdx, [rdx*4]
call fcn.140006c10
nop
mov rax, r14
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.14013a450
mov rbx, qword [rsp + 0xc8]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rdx, str.Invalid_key_size
lea rcx, [rbp - 0x60]
call fcn.1400c9df0
lea rdx, [0x14031ac88]
lea rcx, [rbp - 0x60]
call fcn.14021f4dc
int3
lea rdx, str.Invalid_key_size
lea rcx, [rbp - 0x60]
call fcn.1400c9df0
lea rdx, [0x14031ac88]
lea rcx, [rbp - 0x60]
call fcn.14021f4dc
int3