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

Disassembly:
lea r12, [rsp - 0x10]
cmp r12, qword [r14 + 0x10]
jbe 0x49466b
sub rsp, 0x90
mov qword [rsp + 0x88], rbp
lea rbp, [rsp + 0x88]
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xa0], rbx
mov qword [rsp + 0xa8], rcx
mov qword [rsp + 0xb0], rdi
mov qword [rsp + 0xb8], rsi
mov qword [rsp + 0xc0], r8
mov qword [rsp + 0xc8], r9
mov qword [rsp + 0xd0], r10
mov qword [rsp + 0xd8], r11
mov qword [rsp + 0x50], 0
mov rdx, qword [rsp + 0xa0]
mov qword [rsp + 0x68], rdx
shr rdx, 2
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x50], 0
jmp 0x4941d8
mov rdx, qword [rsp + 0x50]
nop dword [rax]
cmp qword [rsp + 0x30], rdx
jg 0x4941ec
jmp 0x494291
mov rax, qword [rsp + 0x50]
shl rax, 2
mov qword [rsp + 0x68], rax
mov rcx, qword [rsp + 0xa0]
mov rdx, qword [rsp + 0x98]
mov rsi, qword [rsp + 0xa8]
jmp 0x494214
cmp rcx, rax
jae 0x49421e
jmp 0x494665
sub rsi, rax
mov rdi, rsi
neg rsi
sar rsi, 0x3f
and rsi, rax
add rdx, rsi
mov qword [rsp + 0x70], rdx
sub rcx, rax
mov qword [rsp + 0x78], rcx
mov qword [rsp + 0x80], rdi
mov rax, rdx
mov rbx, rcx
mov rcx, rdi
call fcn.0048f840
mov dword [rsp + 0x2c], eax
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0xb8]
mov rsi, qword [rsp + 0xb0]
cmp rcx, rdx
ja 0x494277
jmp 0x49465b
lea rdx, [rsi + rdx*4]
mov dword [rdx], eax
jmp 0x49427f
mov rdx, qword [rsp + 0x50]
inc rdx
mov qword [rsp + 0x50], rdx
jmp 0x4941d8
jmp 0x494293
mov rdx, qword [rsp + 0xb8]
mov qword [rsp + 0x68], rdx
cmp qword [rsp + 0x50], rdx
jl 0x4942ac
jmp 0x49444f
mov rcx, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0xb0]
mov rax, qword [rsp + 0x50]
lea rbx, [rax - 1]
cmp rcx, rbx
ja 0x4942cf
jmp 0x494653
lea rdx, [rdx + rax*4]
lea rdx, [rdx - 4]
mov edx, dword [rdx]
mov dword [rsp + 0x24], edx
mov rbx, qword [rsp + 0x30]
mov rax, qword [rsp + 0x50]
test rbx, rbx
jne 0x4942f1
jmp 0x49464e
mov ecx, edx
cmp rbx, 0xffffffffffffffff
je 0x494302
cqo
idiv rbx
nop
jmp 0x494307
neg rax
xor edx, edx
test rdx, rdx
je 0x49430e
jmp 0x494382
mov eax, ecx
call fcn.00494100
mov dword [rsp + 0x2c], eax
call fcn.00494060
mov dword [rsp + 0x28], eax
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x50]
test rcx, rcx
jne 0x494336
jmp 0x494649
mov ebx, eax
mov rax, rdx
nop dword [rax + rax]
cmp rcx, 0xffffffffffffffff
je 0x49434d
cqo
idiv rcx
jmp 0x494352
neg rax
xor edx, edx
lea rdx, [rax - 1]
cmp rdx, 0x10
jb 0x494365
nop dword [rax]
jmp 0x49463c
lea rdx, [0x0063e920]
lea rdx, [rax + rdx]
lea rdx, [rdx - 1]
movzx edx, byte [rdx]
shl edx, 0x18
xor ebx, edx
mov dword [rsp + 0x24], ebx
jmp 0x4943e8
cmp qword [rsp + 0x30], 6
setg byte [rsp + 0x1f]
jg 0x494391
jmp 0x4943ca
mov rdx, qword [rsp + 0x30]
mov rax, qword [rsp + 0x50]
nop dword [rax + rax]
test rdx, rdx
jne 0x4943aa
jmp 0x494637
mov rbx, rdx
cmp rbx, 0xffffffffffffffff
je 0x4943ba
cqo
idiv rbx
jmp 0x4943bf
neg rax
xor edx, edx
cmp rdx, 4
sete byte [rsp + 0x1f]
jmp 0x4943cc
jmp 0x4943cc
cmp byte [rsp + 0x1f], 0
jne 0x4943d5
jmp 0x4943e4
mov eax, dword [rsp + 0x24]
call fcn.00494060
mov dword [rsp + 0x24], eax
jmp 0x4943e6
jmp 0x4943e6
jmp 0x4943e8
mov rcx, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0xb0]
mov rax, qword [rsp + 0x50]
sub rax, qword [rsp + 0x30]
cmp rcx, rax
ja 0x49440c
jmp 0x494632
mov rbx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0xb8]
mov rsi, qword [rsp + 0xb0]
lea rdx, [rdx + rax*4]
mov edx, dword [rdx]
xor edx, dword [rsp + 0x24]
cmp rcx, rbx
ja 0x494435
jmp 0x49462a
lea rbx, [rsi + rbx*4]
mov dword [rbx], edx
jmp 0x49443d
mov rdx, qword [rsp + 0x50]
inc rdx
mov qword [rsp + 0x50], rdx
jmp 0x494293
cmp qword [rsp + 0xc8], 0
jne 0x49445c
jmp 0x494474
mov rdx, qword [rsp + 0xb8]
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x48], 0
jmp 0x494484
mov rbp, qword [rsp + 0x88]
add rsp, 0x90
ret
mov rdx, qword [rsp + 0x48]
cmp qword [rsp + 0x38], rdx
jg 0x494492
jmp 0x4944b0
mov rdx, qword [rsp + 0x38]
sub rdx, qword [rsp + 0x48]
add rdx, 0xfffffffffffffffc
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x40], 0
jmp 0x4944c1
mov rbp, qword [rsp + 0x88]
add rsp, 0x90
nop
ret
cmp qword [rsp + 0x40], 4
jl 0x4944ce
jmp 0x494606
mov rcx, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0xb0]
mov rax, qword [rsp + 0x58]
add rax, qword [rsp + 0x40]
cmp rcx, rax
ja 0x4944f2
jmp 0x494625
lea rdx, [rdx + rax*4]
mov edx, dword [rdx]
mov dword [rsp + 0x20], edx
cmp qword [rsp + 0x48], 0
setg byte [rsp + 0x1f]
jg 0x49450b
jmp 0x494522
mov rdx, qword [rsp + 0x48]
add rdx, 4
cmp qword [rsp + 0x38], rdx
setg byte [rsp + 0x1f]
nop
jmp 0x494524
jmp 0x494524
cmp byte [rsp + 0x1f], 0
jne 0x494530
jmp 0x4945c0
mov edx, dword [rsp + 0x20]
shr edx, 0x18
lea rbx, str.cw
add rdx, rbx
movzx edx, byte [rdx]
lea rbx, [0x00649bc0]
lea rdx, [rbx + rdx*4]
mov edx, dword [rdx]
mov ebx, dword [rsp + 0x20]
shr ebx, 0x10
movzx ebx, bl
lea rsi, str.cw
add rbx, rsi
movzx ebx, byte [rbx]
lea rsi, [0x00649fc0]
lea rbx, [rsi + rbx*4]
xor edx, dword [rbx]
mov ebx, dword [rsp + 0x20]
shr ebx, 8
movzx ebx, bl
lea rsi, str.cw
add rbx, rsi
movzx ebx, byte [rbx]
lea rsi, [0x0064a3c0]
lea rbx, [rsi + rbx*4]
xor edx, dword [rbx]
movzx ebx, byte [rsp + 0x20]
lea rsi, str.cw
add rbx, rsi
movzx ebx, byte [rbx]
lea rsi, [0x0064a7c0]
lea rbx, [rsi + rbx*4]
xor edx, dword [rbx]
mov dword [rsp + 0x20], edx
jmp 0x4945c2
jmp 0x4945c2
mov rax, qword [rsp + 0x48]
add rax, qword [rsp + 0x40]
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0xd0]
mov rdx, qword [rsp + 0xc8]
mov ebx, dword [rsp + 0x20]
cmp rcx, rax
ja 0x4945ec
jmp 0x49461b
lea rdx, [rdx + rax*4]
mov dword [rdx], ebx
jmp 0x4945f4
mov rdx, qword [rsp + 0x40]
inc rdx
mov qword [rsp + 0x40], rdx
jmp 0x4944c1
jmp 0x494608
mov rdx, qword [rsp + 0x48]
add rdx, 4
mov qword [rsp + 0x48], rdx
jmp 0x494484
nop dword [rax + rax]
call fcn.00466520
call fcn.00466520
mov rax, rbx
call fcn.00466520
call fcn.00466520
call fcn.00439980
mov rax, rdx
mov ecx, 0x10
call fcn.00466520
call fcn.00439980
call fcn.00439980
mov rax, rbx
call fcn.00466520
mov rax, rdx
nop
call fcn.00466520
call fcn.004665e0
nop
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rcx
mov qword [rsp + 0x20], rdi
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x38], r9
mov qword [rsp + 0x40], r10
mov qword [rsp + 0x48], r11
call fcn.00463e40
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
mov rcx, qword [rsp + 0x18]
mov rdi, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x28]
mov r8, qword [rsp + 0x30]
mov r9, qword [rsp + 0x38]
mov r10, qword [rsp + 0x40]
mov r11, qword [rsp + 0x48]
jmp fcn.00494140