Function at 0x140036468
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 [0x14007e090]
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 0x1400364e2
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 0x1400364ae
xor edx, edx
mov rcx, rbx
call fcn.140036884
mov eax, dword [rbx + 0x18]
mov esi, 1
dec eax
lea r11, str.cw
cmp eax, esi
jl 0x14003665f
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 0x140036511
add r8, 4
sub r10, 1
jne 0x14003650e
mov rcx, rbx
call fcn.1400368c0
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 0x14003657c
xor cl, 0x1b
cmp byte [r11], r8b
mov r8b, byte [r11]
jae 0x140036589
add r8b, r8b
jmp 0x140036590
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 0x1400365b8
xor r8b, 0x1b
mov cl, r9b
add cl, cl
cmp r9b, 0x80
jb 0x1400365c6
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 0x1400365e6
xor cl, 0x1b
mov al, dl
add al, al
cmp dl, r8b
jb 0x1400365f1
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 0x14003660a
xor al, 0x1b
cmp dl, r8b
jae 0x140036613
add dl, dl
jmp 0x140036618
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 0x14003656b
mov edx, esi
mov rcx, rbx
call fcn.140036884
mov eax, dword [rbx + 0x18]
inc esi
dec eax
lea r11, str.cw
cmp esi, eax
jle 0x140036505
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 0x14003666b
add r8, 4
sub r10, 1
jne 0x140036668
mov rcx, rbx
call fcn.1400368c0
mov edx, dword [rbx + 0x18]
mov rcx, rbx
call fcn.140036884
mov eax, dword [rbx + 0x10]
shl eax, 2
cmp eax, edi
jle 0x1400366e9
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 0x1400366b7
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140042a40
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