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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov eax, 0xffffff53
mov ebx, dword [rsp + 0xa0]
mov r14, rdx
mov rbp, rcx
mov edx, dword [rsp + 0xa8]
mov r15d, r8d
mov r12, r9
test rcx, rcx
je 0x140049056
cmp r8d, 0x20
ja 0x140049056
mov ecx, 0x10101
shl rcx, 0x10
bt rcx, r8
jae 0x140049056
test edx, edx
je 0x140048b00
mov edx, r8d
and edx, 0xfffffff7
cmp edx, 0x10
je 0x140048b00
cmp r8d, 0x20
jne 0x140049056
mov eax, r15d
mov dword [rbp + 0xf4], r15d
mov rdx, r12
mov rcx, rbp
mov dword [rbp + 0x3a8], 0
shr eax, 2
add eax, 6
mov dword [rbp + 0xf0], eax
call fcn.140048a49
test eax, eax
jne 0x140049056
mov ecx, r15d
mov rdi, rbp
mov rsi, r14
mov r8d, r15d
rep movsb byte [rdi], byte [rsi]
mov rdx, rbp
mov rcx, rbp
mov rdi, rbp
mov rsi, r14
mov r13, rbp
call fcn.1400489f7
mov ecx, r15d
mov r8d, r15d
mov rdx, rbp
rep movsb byte [rdi], byte [rsi]
mov rcx, rbp
call fcn.1400489f7
cmp r15d, 0x18
je 0x140048bb5
cmp r15d, 0x20
je 0x140048b98
cmp r15d, 0x10
jne 0x140048dde
lea r9, [0x1400a6380]
lea r10, [rbp + 0x90]
mov rdx, rbp
lea r8, [0x1400a5380]
jmp 0x140048bd2
lea r9, [0x1400a6380]
lea r10, [rbp + 0xc0]
mov rdx, rbp
lea r8, [0x1400a5380]
jmp 0x140048cee
lea r9, [0x1400a6380]
lea r10, [rbp + 0xa8]
mov rdx, rbp
lea r8, [0x1400a5380]
jmp 0x140048c5a
mov ecx, dword [rdx + 0xc]
mov r11d, dword [rdx]
add r9, 4
xor r11d, dword [r9 - 4]
movzx eax, cl
movzx edi, ch
mov eax, dword [r8 + rax*4]
and eax, 0xff00
xor eax, r11d
mov r11d, ecx
shr r11d, 0x18
movzx r11d, byte [r8 + r11*4 + 0x400]
xor eax, r11d
mov r11d, ecx
shr r11d, 0x10
movzx r11d, r11b
mov r11d, dword [r8 + r11*4 + 0x800]
and r11d, 0xff000000
xor eax, r11d
mov r11d, dword [r8 + rdi*4 + 0xc00]
and r11d, 0xff0000
xor eax, r11d
mov dword [rdx + 0x10], eax
xor eax, dword [rdx + 4]
mov dword [rdx + 0x14], eax
xor eax, dword [rdx + 8]
mov dword [rdx + 0x18], eax
xor eax, ecx
mov dword [rdx + 0x1c], eax
cmp rdx, r10
je 0x140048dda
add rdx, 0x10
jmp 0x140048bd2
mov ecx, dword [rdx + 0x14]
mov r11d, dword [rdx]
add r9, 4
xor r11d, dword [r9 - 4]
movzx eax, cl
movzx edi, ch
mov eax, dword [r8 + rax*4]
and eax, 0xff00
xor eax, r11d
mov r11d, ecx
shr r11d, 0x18
movzx r11d, byte [r8 + r11*4 + 0x400]
xor eax, r11d
mov r11d, ecx
shr r11d, 0x10
movzx r11d, r11b
mov r11d, dword [r8 + r11*4 + 0x800]
and r11d, 0xff000000
xor eax, r11d
mov r11d, dword [r8 + rdi*4 + 0xc00]
and r11d, 0xff0000
xor eax, r11d
mov dword [rdx + 0x18], eax
xor eax, dword [rdx + 4]
mov dword [rdx + 0x1c], eax
xor eax, dword [rdx + 8]
mov dword [rdx + 0x20], eax
xor eax, dword [rdx + 0xc]
mov dword [rdx + 0x24], eax
cmp rdx, r10
je 0x140048dda
xor eax, dword [rdx + 0x10]
add rdx, 0x18
mov dword [rdx + 0x10], eax
xor eax, ecx
mov dword [rdx + 0x14], eax
jmp 0x140048c5a
mov ecx, dword [rdx + 0x1c]
mov r11d, dword [rdx]
add r9, 4
xor r11d, dword [r9 - 4]
movzx eax, cl
movzx edi, ch
mov eax, dword [r8 + rax*4]
and eax, 0xff00
xor eax, r11d
mov r11d, ecx
shr r11d, 0x18
movzx r11d, byte [r8 + r11*4 + 0x400]
xor eax, r11d
mov r11d, ecx
shr r11d, 0x10
movzx r11d, r11b
mov r11d, dword [r8 + r11*4 + 0x800]
and r11d, 0xff000000
xor eax, r11d
mov r11d, dword [r8 + rdi*4 + 0xc00]
and r11d, 0xff0000
xor eax, r11d
mov dword [rdx + 0x20], eax
xor eax, dword [rdx + 4]
mov dword [rdx + 0x24], eax
xor eax, dword [rdx + 8]
mov dword [rdx + 0x28], eax
xor eax, dword [rdx + 0xc]
mov dword [rdx + 0x2c], eax
cmp rdx, r10
je 0x140048dda
mov r11d, eax
movzx esi, ah
movzx r14d, al
add rdx, 0x20
shr r11d, 0x10
mov esi, dword [r8 + rsi*4]
movzx r11d, r11b
mov r11d, dword [r8 + r11*4 + 0xc00]
and esi, 0xff00
and r11d, 0xff0000
or r11d, esi
mov esi, eax
xor r11d, dword [rdx - 0x10]
movzx eax, byte [r8 + r14*4 + 0x400]
shr esi, 0x18
mov esi, dword [r8 + rsi*4 + 0x800]
and esi, 0xff000000
or eax, esi
xor eax, r11d
mov dword [rdx + 0x10], eax
xor eax, dword [rdx - 0xc]
mov dword [rdx + 0x14], eax
xor eax, dword [rdx - 8]
mov dword [rdx + 0x18], eax
xor eax, ecx
mov dword [rdx + 0x1c], eax
jmp 0x140048cee
mov dword [rsp + 0x2c], ecx
lea r10, [rsp + 0x2c]
mov edx, 4
mov rcx, r10
call fcn.140046df4
dec ebx
je 0x140048e0f
mov rdx, r12
mov rcx, rbp
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.140048a49
mov eax, dword [rbp + 0xf0]
mov ecx, dword [rsp + 0x2c]
xor r8d, r8d
xor edx, edx
shl eax, 2
cmp edx, eax
jae 0x140048e9f
mov ecx, edx
lea r8, [rbp + rcx*4]
mov ecx, eax
lea rcx, [rbp + rcx*4]
mov r9d, dword [r8]
mov r11d, dword [rcx]
mov dword [r8], r11d
mov dword [rcx], r9d
lea ecx, [rdx + 1]
lea r8, [rbp + rcx*4]
lea ecx, [rax + 1]
lea rcx, [rbp + rcx*4]
mov r9d, dword [r8]
mov r11d, dword [rcx]
mov dword [r8], r11d
mov dword [rcx], r9d
lea ecx, [rdx + 2]
lea r8, [rbp + rcx*4]
lea ecx, [rax + 2]
lea rcx, [rbp + rcx*4]
mov r9d, dword [r8]
mov r11d, dword [rcx]
mov dword [r8], r11d
lea r8d, [rax + 3]
sub eax, 4
mov dword [rcx], r9d
lea ecx, [rdx + 3]
lea r8, [rbp + r8*4]
add edx, 4
lea r9, [rbp + rcx*4]
mov r11d, dword [r8]
mov ecx, dword [r9]
mov dword [r9], r11d
mov dword [r8], ecx
mov r8b, 1
jmp 0x140048e21
test r8b, r8b
je 0x140048ea8
mov dword [rsp + 0x2c], ecx
mov edx, 4
mov rcx, r10
call fcn.140046df4
mov r8d, 1
lea rax, [0x1400a4380]
lea rdx, [0x1400a5380]
cmp r8d, dword [rbp + 0xf0]
jae 0x140048df4
mov ebx, dword [r13 + 0x10]
add r13, 0x10
inc r8d
mov ecx, ebx
movzx r9d, bl
movzx r9d, byte [rdx + r9*4 + 0x400]
shr ecx, 0x18
movzx ecx, byte [rdx + rcx*4 + 0x400]
mov ecx, dword [rax + rcx*4]
xor ecx, dword [rax + r9*4 + 0xc00]
mov r9d, ebx
movzx ebx, bh
shr r9d, 0x10
movzx r9d, r9b
movzx r9d, byte [rdx + r9*4 + 0x400]
xor ecx, dword [rax + r9*4 + 0x400]
movzx r9d, byte [rdx + rbx*4 + 0x400]
mov ebx, dword [r13 + 4]
xor ecx, dword [rax + r9*4 + 0x800]
mov dword [r13], ecx
mov ecx, ebx
movzx r9d, bl
movzx r9d, byte [rdx + r9*4 + 0x400]
shr ecx, 0x18
movzx ecx, byte [rdx + rcx*4 + 0x400]
mov ecx, dword [rax + rcx*4]
xor ecx, dword [rax + r9*4 + 0xc00]
mov r9d, ebx
movzx ebx, bh
shr r9d, 0x10
movzx r9d, r9b
movzx r9d, byte [rdx + r9*4 + 0x400]
xor ecx, dword [rax + r9*4 + 0x400]
movzx r9d, byte [rdx + rbx*4 + 0x400]
mov ebx, dword [r13 + 8]
xor ecx, dword [rax + r9*4 + 0x800]
mov dword [r13 + 4], ecx
mov ecx, ebx
movzx r9d, bl
movzx r9d, byte [rdx + r9*4 + 0x400]
shr ecx, 0x18
movzx ecx, byte [rdx + rcx*4 + 0x400]
mov ecx, dword [rax + rcx*4]
xor ecx, dword [rax + r9*4 + 0xc00]
mov r9d, ebx
movzx ebx, bh
shr r9d, 0x10
movzx r9d, r9b
movzx r9d, byte [rdx + r9*4 + 0x400]
xor ecx, dword [rax + r9*4 + 0x400]
movzx r9d, byte [rdx + rbx*4 + 0x400]
mov ebx, dword [r13 + 0xc]
xor ecx, dword [rax + r9*4 + 0x800]
mov dword [r13 + 8], ecx
mov ecx, ebx
movzx r9d, bl
shr ecx, 0x18
movzx ecx, byte [rdx + rcx*4 + 0x400]
movzx r9d, byte [rdx + r9*4 + 0x400]
mov ecx, dword [rax + rcx*4]
xor ecx, dword [rax + r9*4 + 0xc00]
mov r9d, ebx
movzx ebx, bh
shr r9d, 0x10
movzx r9d, r9b
movzx r9d, byte [rdx + r9*4 + 0x400]
xor ecx, dword [rax + r9*4 + 0x400]
movzx r9d, byte [rdx + rbx*4 + 0x400]
xor ecx, dword [rax + r9*4 + 0x800]
mov dword [r13 + 0xc], ecx
jmp 0x140048ec9
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret