Function at 0x65393a40
Capabilities:
Encrypt data using aes
Inspect section memory permissions
Reference aes constants
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
test rcx, rcx
mov qword [rsp + 0x88], rdx
je 0x65393d6c
cmp qword [rsp + 0x88], 0
je 0x65393d9e
test r8, r8
je 0x65393d85
mov eax, dword [r8 + 0x1e0]
mov r9d, dword [rcx]
mov rsi, r8
mov r11d, dword [rcx + 4]
mov r10d, dword [rcx + 8]
lea r13, [0x65408b60]
mov edx, dword [rcx + 0xc]
lea r12, [0x65407760]
lea rbp, [0x65407f60]
sar eax, 1
bswap r9d
lea rdi, [0x65407b60]
lea r14d, [rax - 1]
bswap r11d
bswap r10d
bswap edx
xor r9d, dword [r8]
xor r11d, dword [r8 + 4]
mov dword [rsp + 0x2c], r14d
add r14, 1
xor r10d, dword [r8 + 8]
shl r14, 5
xor edx, dword [r8 + 0xc]
add r14, r8
jmp 0x65393ba0
mov r9d, dword [rsp + 0x28]
movzx r15d, dl
mov r10d, ecx
shr r10d, 0x10
movzx eax, r10b
mov r10d, ebx
mov r11d, r9d
shr r10d, 0x10
shr r11d, 0x18
mov r9d, dword [r13 + r11*4]
xor r9d, dword [r12 + r15*4]
mov r11d, ecx
movzx r15d, byte [rsp + 0x28]
xor r9d, dword [rsi]
shr r11d, 0x18
xor r9d, dword [rbp + rax*4]
mov r11d, dword [r13 + r11*4]
movzx eax, bh
xor r9d, dword [rdi + rax*4]
movzx eax, r10b
mov r10d, ebx
shr r10d, 0x18
movzx ebx, bl
xor r11d, dword [r12 + r15*4]
movzx r15d, cl
mov r10d, dword [r13 + r10*4]
xor r11d, dword [rsi + 4]
xor r10d, dword [r12 + r15*4]
movzx ecx, ch
xor r11d, dword [rbp + rax*4]
movzx eax, dh
xor r10d, dword [rsi + 8]
xor r11d, dword [rdi + rax*4]
mov eax, edx
shr edx, 0x18
shr eax, 0x10
mov edx, dword [r13 + rdx*4]
xor edx, dword [r12 + rbx*4]
movzx r15d, al
mov eax, dword [rsp + 0x28]
xor edx, dword [rsi + 0xc]
xor r10d, dword [rbp + r15*4]
mov r15d, dword [rsp + 0x28]
movzx eax, ah
shr r15d, 0x10
xor r10d, dword [rdi + rax*4]
movzx eax, r15b
xor edx, dword [rbp + rax*4]
xor edx, dword [rdi + rcx*4]
mov ebx, r9d
movzx r15d, dl
mov ecx, r11d
shr ebx, 0x18
shr ecx, 0x10
add rsi, 0x20
mov eax, dword [r13 + rbx*4]
xor eax, dword [r12 + r15*4]
movzx ebx, cl
xor eax, dword [rsi - 0x10]
mov ecx, r10d
mov r15d, r11d
xor eax, dword [rbp + rbx*4]
movzx ebx, ch
shr r15d, 0x18
xor eax, dword [rdi + rbx*4]
mov ebx, r10d
mov ecx, dword [r13 + r15*4]
shr ebx, 0x10
movzx r15d, bl
mov ebx, r10d
movzx r10d, r10b
shr ebx, 0x18
mov dword [rsp + 0x28], eax
movzx eax, r9b
mov ebx, dword [r13 + rbx*4]
xor ecx, dword [r12 + rax*4]
movzx eax, dh
xor ecx, dword [rsi - 0xc]
xor ecx, dword [rbp + r15*4]
movzx r15d, r11b
xor ecx, dword [rdi + rax*4]
mov eax, edx
xor ebx, dword [r12 + r15*4]
shr eax, 0x10
xor ebx, dword [rsi - 8]
shr edx, 0x18
movzx r15d, al
mov eax, r9d
mov edx, dword [r13 + rdx*4]
xor ebx, dword [rbp + r15*4]
movzx eax, ah
xor edx, dword [r12 + r10*4]
shr r9d, 0x10
xor edx, dword [rsi - 4]
xor ebx, dword [rdi + rax*4]
movzx r9d, r9b
mov eax, r11d
xor edx, dword [rbp + r9*4]
movzx eax, ah
xor edx, dword [rdi + rax*4]
cmp rsi, r14
jne 0x65393ae2
mov r14d, dword [rsp + 0x2c]
mov eax, dword [rsp + 0x28]
lea r12, [0x65406760]
lea rsi, str.cwko0
movzx edi, dl
mov r9d, ecx
lea r11, [0x65406b60]
shr r9d, 0x10
mov r13d, ebx
mov ebp, eax
movzx r10d, r9b
movzx r15d, al
add r14, 1
shr ebp, 0x18
shl r14, 5
add r8, r14
mov r14d, dword [r12 + rbp*4]
xor r14d, dword [rsi + rdi*4]
xor r14d, dword [r8]
lea rdi, [0x65406f60]
movzx ebp, bh
xor r14d, dword [r11 + r10*4]
mov r10d, ecx
mov r9d, dword [rdi + rbp*4]
shr r10d, 0x18
mov ebp, r13d
mov ebx, dword [r12 + r10*4]
shr ebp, 0x10
xor ebx, dword [rsi + r15*4]
mov r10d, r13d
movzx r15d, cl
movzx r13d, r13b
xor r9d, r14d
mov r14, qword [rsp + 0x88]
shr r10d, 0x18
bswap r9d
movzx ecx, ch
mov dword [r14], r9d
movzx r9d, bpl
xor ebx, dword [r8 + 4]
xor ebx, dword [r11 + r9*4]
movzx ebp, dh
mov r9d, edx
xor ebx, dword [rdi + rbp*4]
shr r9d, 0x10
shr edx, 0x18
movzx ebp, r9b
mov edx, dword [r12 + rdx*4]
xor edx, dword [rsi + r13*4]
bswap ebx
mov dword [r14 + 4], ebx
mov ebx, dword [r12 + r10*4]
xor ebx, dword [rsi + r15*4]
xor ebx, dword [r8 + 8]
xor ebx, dword [r11 + rbp*4]
movzx ebp, ah
shr eax, 0x10
xor ebx, dword [rdi + rbp*4]
bswap ebx
mov dword [r14 + 8], ebx
xor edx, dword [r8 + 0xc]
movzx r8d, al
xor edx, dword [r11 + r8*4]
xor eax, eax
xor edx, dword [rdi + rcx*4]
bswap edx
mov dword [r14 + 0xc], edx
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, str.src_ciphers_aes_aes.c
lea rcx, str.pt___NULL
mov r8d, 0x124
call fcn.6539a680
lea rdx, str.src_ciphers_aes_aes.c
lea rcx, str.skey___NULL
mov r8d, 0x126
call fcn.6539a680
lea rdx, str.src_ciphers_aes_aes.c
lea rcx, str.ct___NULL
mov r8d, 0x125
call fcn.6539a680
nop
nop dword [rax + rax]