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

Disassembly:
sub rsp, 8
mov qword [rsp], rbp
lea rbp, [rsp]
mov rcx, qword [rsp + 0x18]
mov rdx, rcx
shr rcx, 2
mov rbx, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x10]
xor eax, eax
jmp 0x514dd3
mov dword [rbx + r8*4], r10d
lea rax, [r8 + 1]
cmp rax, rcx
jge 0x514e45
mov r8, rax
shl rax, 2
cmp rax, rdx
jae 0x5150fb
movzx r9d, byte [rdi + rax]
lea r10, [rax + 1]
cmp r10, rdx
jae 0x5150fb
shl r9d, 0x18
movzx r10d, byte [rax + rdi + 1]
shl r10d, 0x10
or r9d, r10d
lea r10, [rax + 2]
cmp r10, rdx
jae 0x5150fb
movzx r10d, byte [rax + rdi + 2]
shl r10d, 8
or r9d, r10d
lea r10, [rax + 3]
cmp r10, rdx
jae 0x5150fb
movzx r10d, byte [rax + rdi + 3]
or r10d, r9d
cmp r8, rsi
jb 0x514dcb
jmp 0x5150fb
jmp 0x514e4f
mov dword [rbx + r9*4], r8d
lea rax, [r9 + 1]
cmp rax, rsi
jge 0x514fa8
lea rdx, [rax - 1]
cmp rdx, rsi
jae 0x5150f4
mov edx, dword [rbx + rax*4 - 4]
test rcx, rcx
je 0x5150ed
mov rdi, rax
mov r8d, edx
cmp rcx, 0xffffffffffffffff
je 0x514e85
cqo
idiv rcx
jmp 0x514e8a
neg rax
xor edx, edx
test rdx, rdx
jne 0x514f2d
lea rdx, [rax - 1]
rol r8d, 8
mov r9d, r8d
shr r8d, 0x18
lea r10, str.cw
movzx r8d, byte [r10 + r8]
shl r8d, 0x18
mov r11d, r9d
shr r9d, 0x10
movzx r9d, r9b
movzx r9d, byte [r9 + r10]
shl r9d, 0x10
or r8d, r9d
mov r9d, r11d
shr r11d, 8
movzx r11d, r11b
movzx r11d, byte [r11 + r10]
shl r11d, 8
or r8d, r11d
movzx r9d, r9b
movzx r9d, byte [r9 + r10]
or r9d, r8d
cmp rdx, 0x10
jae 0x5150e6
lea rdx, [0x00d1a9a0]
movzx r8d, byte [rax + rdx - 1]
shl r8d, 0x18
xor r8d, r9d
mov r9, rdi
sub rdi, rcx
cmp rdi, rsi
jae 0x5150df
mov edi, dword [rbx + rdi*4]
xor r8d, edi
cmp r9, rsi
jb 0x514e47
jmp 0x5150df
cmp rcx, 6
jle 0x514f9c
cmp rdx, 4
jne 0x514f9c
mov edx, r8d
shr r8d, 0x18
lea r9, str.cw
movzx r8d, byte [r9 + r8]
shl r8d, 0x18
mov r10d, edx
shr edx, 0x10
movzx edx, dl
movzx edx, byte [rdx + r9]
shl edx, 0x10
or r8d, edx
mov edx, r10d
shr r10d, 8
movzx r10d, r10b
movzx r10d, byte [r10 + r9]
shl r10d, 8
or r8d, r10d
movzx edx, dl
movzx edx, byte [rdx + r9]
or edx, r8d
lea r10, str.cw
mov r8d, edx
lea rdx, [0x00d1a9a0]
jmp 0x514f0a
lea r9, str.cw
mov edx, r8d
jmp 0x514f86
mov rax, qword [rsp + 0x40]
test rax, rax
je 0x5150c8
mov rcx, qword [rsp + 0x48]
xor edx, edx
jmp 0x5150ac
mov dword [rax + r9*4], r10d
inc r8
cmp r8, 4
jge 0x5150a5
lea r9, [r8 + rsi - 4]
cmp r9, rdi
jae 0x5150d8
mov r9d, dword [rbx + r9*4]
test rdx, rdx
jle 0x51507d
lea r10, [rdx + 4]
cmp r10, rdi
jge 0x51507d
mov r10d, r9d
shr r9d, 0x18
lea r11, str.cw
movzx r9d, byte [r11 + r9]
lea r12, [0x00d279c0]
mov r9d, dword [r12 + r9*4]
mov r13d, r10d
shr r10d, 0x10
movzx r10d, r10b
movzx r10d, byte [r10 + r11]
lea r14, [0x00d27dc0]
mov r10d, dword [r14 + r10*4]
xor r9d, r10d
mov r10d, r13d
shr r13d, 8
movzx r13d, r13b
movzx r13d, byte [r13 + r11]
lea r15, [0x00d281c0]
mov r13d, dword [r15 + r13*4]
xor r9d, r13d
movzx r10d, r10b
movzx r10d, byte [r10 + r11]
lea r13, [0x00d285c0]
mov r10d, dword [r13 + r10*4]
xor r10d, r9d
lea r9, [r8 + rdx]
cmp r9, rcx
jb 0x514fc2
jmp 0x5150d1
lea r11, str.cw
lea r12, [0x00d279c0]
lea r13, [0x00d285c0]
lea r14, [0x00d27dc0]
lea r15, [0x00d281c0]
mov r10d, r9d
jmp 0x51506e
add rdx, 4
mov rsi, rdi
cmp rdx, rsi
jge 0x5150bf
mov rdi, rsi
sub rsi, rdx
xor r8d, r8d
jmp 0x514fc9
mov rbp, qword [rsp]
add rsp, 8
ret
mov rbp, qword [rsp]
add rsp, 8
ret
call fcn.0042ba70
ud2
call fcn.0042ba70
ud2
call fcn.0042ba70
ud2
call fcn.0042ba70
ud2
call fcn.0042bcd0
ud2
call fcn.0042ba70
ud2
call fcn.0042ba70
ud2