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

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x1e8
mov qword [rsp + 0xe0], 0xfffffffffffffffe
cmp qword [rsp + 0x1f8], 0
jne 0x14018597f
lea rax, [rsp + 0x130]
mov qword [rsp + 0x88], rax
mov rcx, qword [rsp + 0x88]
call fcn.14017df60
mov qword [rsp + 0xb0], rax
lea rdx, [rsp + 0xb0]
lea rcx, [rsp + 0x118]
call fcn.1401b8444
lea rdx, [0x1401efde8]
lea rcx, [rsp + 0x118]
call fcn.1401b61f4
nop
lea rcx, [rsp + 0x130]
call fcn.14017d360
nop
cmp dword [rsp + 0x208], 0x10
je 0x1401859f4
cmp dword [rsp + 0x208], 0x18
je 0x1401859f4
cmp dword [rsp + 0x208], 0x20
je 0x1401859f4
lea rax, [rsp + 0x14e]
mov qword [rsp + 0x70], rax
mov rcx, qword [rsp + 0x70]
call fcn.140180390
mov qword [rsp + 0xb8], rax
lea rdx, [rsp + 0xb8]
lea rcx, [rsp + 0x100]
call fcn.1401b8444
lea rdx, [0x1401efde8]
lea rcx, [rsp + 0x100]
call fcn.1401b61f4
nop
lea rcx, [rsp + 0x14e]
call fcn.14017d3a0
nop
cmp dword [rsp + 0x210], 0x10
je 0x140185a6f
cmp dword [rsp + 0x210], 0x18
je 0x140185a6f
cmp dword [rsp + 0x210], 0x20
je 0x140185a6f
lea rax, [rsp + 0x18e]
mov qword [rsp + 0x98], rax
mov rcx, qword [rsp + 0x98]
call fcn.14017f260
mov qword [rsp + 0xc8], rax
lea rdx, [rsp + 0xc8]
lea rcx, [rsp + 0xe8]
call fcn.1401b8444
lea rdx, [0x1401efde8]
lea rcx, [rsp + 0xe8]
call fcn.1401b61f4
nop
lea rcx, [rsp + 0x18e]
call fcn.14017d380
nop
mov rax, qword [rsp + 0x1f0]
mov ecx, dword [rsp + 0x208]
mov dword [rax + 0x3cc], ecx
mov rax, qword [rsp + 0x1f0]
mov ecx, dword [rsp + 0x210]
mov dword [rax + 0x3d0], ecx
mov rax, qword [rsp + 0x1f0]
movsxd rax, dword [rax + 0x3d0]
mov rcx, qword [rsp + 0x1f0]
add rcx, 0x3d8
mov r8, rax
mov rdx, qword [rsp + 0x200]
call fcn.1401b5900
mov rax, qword [rsp + 0x1f0]
movsxd rax, dword [rax + 0x3d0]
mov rcx, qword [rsp + 0x1f0]
add rcx, 0x3f8
mov r8, rax
mov rdx, qword [rsp + 0x200]
call fcn.1401b5900
mov rax, qword [rsp + 0x1f0]
mov eax, dword [rax + 0x3cc]
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0x10
je 0x140185b1a
cmp dword [rsp + 0x60], 0x18
je 0x140185b74
jmp 0x140185bab
mov rax, qword [rsp + 0x1f0]
cmp dword [rax + 0x3d0], 0x10
jne 0x140185b35
mov dword [rsp + 0x64], 0xa
jmp 0x140185b60
mov rax, qword [rsp + 0x1f0]
cmp dword [rax + 0x3d0], 0x18
jne 0x140185b50
mov dword [rsp + 0x5c], 0xc
jmp 0x140185b58
mov dword [rsp + 0x5c], SafeArrayLock
mov eax, dword [rsp + 0x5c]
mov dword [rsp + 0x64], eax
mov rax, qword [rsp + 0x1f0]
mov ecx, dword [rsp + 0x64]
mov dword [rax + 0x3d4], ecx
jmp 0x140185bbd
mov rax, qword [rsp + 0x1f0]
cmp dword [rax + 0x3d0], 0x20
je 0x140185b8f
mov dword [rsp + 0x58], 0xc
jmp 0x140185b97
mov dword [rsp + 0x58], SafeArrayLock
mov rax, qword [rsp + 0x1f0]
mov ecx, dword [rsp + 0x58]
mov dword [rax + 0x3d4], ecx
jmp 0x140185bbd
mov rax, qword [rsp + 0x1f0]
mov dword [rax + 0x3d4], SafeArrayLock
mov rax, qword [rsp + 0x1f0]
mov eax, dword [rax + 0x3d0]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [rsp + 0x34], eax
mov dword [rsp + 0x24], 0
jmp 0x140185bec
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x1f0]
mov eax, dword [rax + 0x3d4]
cmp dword [rsp + 0x24], eax
jg 0x140185c44
mov dword [rsp + 0x20], 0
jmp 0x140185c14
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 0x20], eax
jge 0x140185c42
movsxd rax, dword [rsp + 0x24]
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x1f0]
lea rax, [rcx + rax + 0xc]
movsxd rcx, dword [rsp + 0x20]
mov dword [rax + rcx*4], 0
jmp 0x140185c0a
jmp 0x140185be2
mov dword [rsp + 0x24], 0
jmp 0x140185c58
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x1f0]
mov eax, dword [rax + 0x3d4]
cmp dword [rsp + 0x24], eax
jg 0x140185cb3
mov dword [rsp + 0x20], 0
jmp 0x140185c80
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 0x20], eax
jge 0x140185cb1
movsxd rax, dword [rsp + 0x24]
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x1f0]
lea rax, [rcx + rax + 0x1ec]
movsxd rcx, dword [rsp + 0x20]
mov dword [rax + rcx*4], 0
jmp 0x140185c76
jmp 0x140185c4e
mov rax, qword [rsp + 0x1f0]
mov eax, dword [rax + 0x3d4]
inc eax
imul eax, dword [rsp + 0x34]
mov dword [rsp + 0x54], eax
mov rax, qword [rsp + 0x1f0]
mov eax, dword [rax + 0x3cc]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x1f0]
add rax, 0x418
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x1f8]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x24], 0
jmp 0x140185d1b
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x24], eax
jge 0x140185dd6
mov rax, qword [rsp + 0x38]
movzx eax, byte [rax]
shl eax, 0x18
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx eax, byte [rax]
shl eax, 0x10
mov rcx, qword [rsp + 0x48]
mov ecx, dword [rcx]
or ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx eax, byte [rax]
shl eax, 8
mov rcx, qword [rsp + 0x48]
mov ecx, dword [rcx]
or ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx eax, byte [rax]
mov rcx, qword [rsp + 0x48]
mov ecx, dword [rcx]
or ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x48]
add rax, 4
mov qword [rsp + 0x48], rax
jmp 0x140185d11
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
jmp 0x140185dfc
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x28]
inc eax
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x20], eax
jge 0x140185ef2
mov eax, dword [rsp + 0x54]
cmp dword [rsp + 0x28], eax
jge 0x140185ef2
movsxd rax, dword [rsp + 0x20]
mov qword [rsp + 0xa8], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x1f0]
lea rax, [rcx + rax + 0xc]
mov qword [rsp + 0xd8], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0x1f0]
mov rdx, qword [rsp + 0xa8]
mov ecx, dword [rcx + rdx*4 + 0x418]
mov rdx, qword [rsp + 0xd8]
mov dword [rdx + rax*4], ecx
movsxd rax, dword [rsp + 0x20]
mov qword [rsp + 0xd0], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
mov rcx, qword [rsp + 0x1f0]
mov ecx, dword [rcx + 0x3d4]
sub ecx, eax
mov eax, ecx
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x1f0]
lea rax, [rcx + rax + 0x1ec]
mov qword [rsp + 0xc0], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0x1f0]
mov rdx, qword [rsp + 0xd0]
mov ecx, dword [rcx + rdx*4 + 0x418]
mov rdx, qword [rsp + 0xc0]
mov dword [rdx + rax*4], ecx
jmp 0x140185de8
mov dword [rsp + 0x50], 0
mov eax, dword [rsp + 0x54]
cmp dword [rsp + 0x28], eax
jge 0x140186377
mov eax, dword [rsp + 0x30]
dec eax
cdqe
mov rcx, qword [rsp + 0x1f0]
mov eax, dword [rcx + rax*4 + 0x418]
mov dword [rsp + 0x2c], eax
mov eax, 4
imul rax, rax, 0
mov ecx, dword [rsp + 0x2c]
sar ecx, 0x10
and ecx, 0xff
movsxd rcx, ecx
lea rdx, str.cw
movsx ecx, byte [rdx + rcx]
and ecx, 0xff
shl ecx, 0x18
mov edx, dword [rsp + 0x2c]
sar edx, 8
and edx, 0xff
movsxd rdx, edx
lea r8, str.cw
movsx edx, byte [r8 + rdx]
and edx, 0xff
shl edx, 0x10
xor ecx, edx
mov edx, dword [rsp + 0x2c]
and edx, 0xff
movsxd rdx, edx
lea r8, str.cw
movsx edx, byte [r8 + rdx]
and edx, 0xff
shl edx, 8
xor ecx, edx
mov edx, dword [rsp + 0x2c]
sar edx, 0x18
and edx, 0xff
movsxd rdx, edx
lea r8, str.cw
movsx edx, byte [r8 + rdx]
and edx, 0xff
xor ecx, edx
movsxd rdx, dword [rsp + 0x50]
lea r8, [0x1401d99c0]
movsx edx, byte [r8 + rdx]
and edx, 0xff
shl edx, 0x18
xor ecx, edx
mov rdx, qword [rsp + 0x1f0]
mov eax, dword [rdx + rax + 0x418]
xor eax, ecx
mov ecx, 4
imul rcx, rcx, 0
mov rdx, qword [rsp + 0x1f0]
mov dword [rdx + rcx + 0x418], eax
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x30], 8
je 0x140186089
mov dword [rsp + 0x24], 1
mov dword [rsp + 0x20], 0
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x24], eax
jge 0x140186084
movsxd rax, dword [rsp + 0x24]
movsxd rcx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x1f0]
mov r8, qword [rsp + 0x1f0]
mov ecx, dword [r8 + rcx*4 + 0x418]
mov eax, dword [rdx + rax*4 + 0x418]
xor eax, ecx
movsxd rcx, dword [rsp + 0x24]
mov rdx, qword [rsp + 0x1f0]
mov dword [rdx + rcx*4 + 0x418], eax
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
jmp 0x140186025
jmp 0x140186264
mov dword [rsp + 0x24], 1
mov dword [rsp + 0x20], 0
mov eax, dword [rsp + 0x30]
cdq
sub eax, edx
sar eax, 1
cmp dword [rsp + 0x24], eax
jge 0x1401860fd
movsxd rax, dword [rsp + 0x24]
movsxd rcx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x1f0]
mov r8, qword [rsp + 0x1f0]
mov ecx, dword [r8 + rcx*4 + 0x418]
mov eax, dword [rdx + rax*4 + 0x418]
xor eax, ecx
movsxd rcx, dword [rsp + 0x24]
mov rdx, qword [rsp + 0x1f0]
mov dword [rdx + rcx*4 + 0x418], eax
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
jmp 0x140186099
mov eax, dword [rsp + 0x30]
cdq
sub eax, edx
sar eax, 1
dec eax
cdqe
mov rcx, qword [rsp + 0x1f0]
mov eax, dword [rcx + rax*4 + 0x418]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x30]
cdq
sub eax, edx
sar eax, 1
cdqe
mov ecx, dword [rsp + 0x2c]
and ecx, 0xff
movsxd rcx, ecx
lea rdx, str.cw
movsx ecx, byte [rdx + rcx]
and ecx, 0xff
mov edx, dword [rsp + 0x2c]
sar edx, 8
and edx, 0xff
movsxd rdx, edx
lea r8, str.cw
movsx edx, byte [r8 + rdx]
and edx, 0xff
shl edx, 8
xor ecx, edx
mov edx, dword [rsp + 0x2c]
sar edx, 0x10
and edx, 0xff
movsxd rdx, edx
lea r8, str.cw
movsx edx, byte [r8 + rdx]
and edx, 0xff
shl edx, 0x10
xor ecx, edx
mov edx, dword [rsp + 0x2c]
sar edx, 0x18
and edx, 0xff
movsxd rdx, edx
lea r8, str.cw
movsx edx, byte [r8 + rdx]
and edx, 0xff
shl edx, 0x18
xor ecx, edx
mov rdx, qword [rsp + 0x1f0]
mov eax, dword [rdx + rax*4 + 0x418]
xor eax, ecx
mov dword [rsp + 0x68], eax
mov eax, dword [rsp + 0x30]
cdq
sub eax, edx
sar eax, 1
cdqe
mov rcx, qword [rsp + 0x1f0]
mov edx, dword [rsp + 0x68]
mov dword [rcx + rax*4 + 0x418], edx
mov eax, dword [rsp + 0x30]
cdq
sub eax, edx
sar eax, 1
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x24], eax
jge 0x140186264
movsxd rax, dword [rsp + 0x24]
movsxd rcx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x1f0]
mov r8, qword [rsp + 0x1f0]
mov ecx, dword [r8 + rcx*4 + 0x418]
mov eax, dword [rdx + rax*4 + 0x418]
xor eax, ecx
movsxd rcx, dword [rsp + 0x24]
mov rdx, qword [rsp + 0x1f0]
mov dword [rdx + rcx*4 + 0x418], eax
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
jmp 0x140186205
mov dword [rsp + 0x20], 0
jmp 0x140186282
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x28]
inc eax
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x20], eax
jge 0x140186372
mov eax, dword [rsp + 0x54]
cmp dword [rsp + 0x28], eax
jge 0x140186372
movsxd rax, dword [rsp + 0x20]
mov qword [rsp + 0x78], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x1f0]
lea rax, [rcx + rax + 0xc]
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0x1f0]
mov rdx, qword [rsp + 0x78]
mov ecx, dword [rcx + rdx*4 + 0x418]
mov rdx, qword [rsp + 0x80]
mov dword [rdx + rax*4], ecx
movsxd rax, dword [rsp + 0x20]
mov qword [rsp + 0x90], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
mov rcx, qword [rsp + 0x1f0]
mov ecx, dword [rcx + 0x3d4]
sub ecx, eax
mov eax, ecx
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x1f0]
lea rax, [rcx + rax + 0x1ec]
mov qword [rsp + 0xa0], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0x1f0]
mov rdx, qword [rsp + 0x90]
mov ecx, dword [rcx + rdx*4 + 0x418]
mov rdx, qword [rsp + 0xa0]
mov dword [rdx + rax*4], ecx
jmp 0x14018626e
jmp 0x140185efa
mov dword [rsp + 0x40], 1
jmp 0x14018638b
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x1f0]
mov eax, dword [rax + 0x3d4]
cmp dword [rsp + 0x40], eax
jge 0x14018647b
mov dword [rsp + 0x20], 0
jmp 0x1401863b7
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 0x20], eax
jge 0x140186476
movsxd rax, dword [rsp + 0x40]
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x1f0]
lea rax, [rcx + rax + 0x1ec]
movsxd rcx, dword [rsp + 0x20]
mov eax, dword [rax + rcx*4]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x2c]
sar eax, 0x18
and eax, 0xff
cdqe
lea rcx, [0x1401d89c0]
mov edx, dword [rsp + 0x2c]
sar edx, 0x10
and edx, 0xff
movsxd rdx, edx
lea r8, [0x1401d8dc0]
mov edx, dword [r8 + rdx*4]
mov eax, dword [rcx + rax*4]
xor eax, edx
mov ecx, dword [rsp + 0x2c]
sar ecx, 8
and ecx, 0xff
movsxd rcx, ecx
lea rdx, [0x1401d91c0]
xor eax, dword [rdx + rcx*4]
mov ecx, dword [rsp + 0x2c]
and ecx, 0xff
movsxd rcx, ecx
lea rdx, [0x1401d95c0]
xor eax, dword [rdx + rcx*4]
movsxd rcx, dword [rsp + 0x40]
imul rcx, rcx, 0x20
mov rdx, qword [rsp + 0x1f0]
lea rcx, [rdx + rcx + 0x1ec]
movsxd rdx, dword [rsp + 0x20]
mov dword [rcx + rdx*4], eax
jmp 0x1401863ad
jmp 0x140186381
mov rax, qword [rsp + 0x1f0]
mov byte [rax + 8], 1
add rsp, 0x1e8
ret