Function at 0x140018240
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 [0x1400c9438]
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, 0xfffffff7
je 0x14001828f
cmp r8d, 0x20
jne 0x140018560
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], reloc.WS2_32.dll_recv
mov dword [rbp - 0x31], 0x20
mov dword [rbp - 0x2d], 0x40
mov dword [rbp - 0x29], pe_nt_image_headers64
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 0x140018317
cmp r8d, 0x18
je 0x140018309
cmp r8d, 0x20
jne 0x140018546
lea r14d, [r8 + 0x1c]
mov r12d, 0xf0
jmp 0x140018323
mov r14d, 0x34
mov r12d, 0xd0
jmp 0x140018323
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.140023bd0
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 0x140018383
xor edx, edx
nop word [rax + rax]
mov ecx, dword [r15 + rdx*4]
mov rax, qword [rbp - 1]
mov dword [rax + rdx*4], ecx
inc rdx
cmp rdx, rdi
jl 0x140018370
mov r10d, edi
cmp edi, r14d
jge 0x14001847e
xor r9d, r9d
lea rbx, [rdi*4]
lea rsi, str.cw
nop dword [rax]
nop word [rax + rax]
lea rcx, [rbx + r9]
mov r11, qword [rbp - 1]
mov ecx, dword [rcx + r11 - 4]
mov eax, r10d
cdq
idiv edi
movsxd r15, eax
test edx, edx
jne 0x140018414
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 0x14001845f
cmp edi, 6
jle 0x14001845f
cmp edx, 4
jne 0x14001845f
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 0x1400183b0
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.1400790f0
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
lea rax, [rbx + r13]
mov qword [rsi + 8], rax
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 0x14001851c
mov rdx, qword [rbp + 0xf]
sub rdx, rcx
and rdx, 0xfffffffffffffffc
mov rax, rcx
cmp rdx, 0x1000
jb 0x140018517
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140018517
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140079384
mov rax, rsi
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1400790d0
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.1400126f0
lea rdx, [0x1400c61b0]
lea rcx, [rbp - 0x49]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rcx, [rbp - 0x49]
call fcn.1400126f0
lea rdx, [0x1400c61b0]
lea rcx, [rbp - 0x49]
call sub.VCRUNTIME140.dll__CxxThrowException
int3