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

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x50
lea rcx, [0x18060836a]
call fcn.180278fb0
nop
cmp qword [rsp + 0x68], 0
jne 0x18039d0e3
mov r8d, 0x1d7
lea rdx, [0x180594a10]
lea rcx, [0x180594a58]
call fcn.1803a4020
nop
xor eax, eax
test eax, eax
jne 0x18039d0c1
cmp qword [rsp + 0x60], 0
jne 0x18039d10b
mov r8d, 0x1d8
lea rdx, [0x180594a70]
lea rcx, [0x180594ab8]
call fcn.1803a4020
nop
xor eax, eax
test eax, eax
jne 0x18039d0e9
cmp qword [rsp + 0x70], 0
jne 0x18039d133
mov r8d, 0x1d9
lea rdx, [0x180594ad0]
lea rcx, [0x180594b18]
call fcn.1803a4020
nop
xor eax, eax
test eax, eax
jne 0x18039d111
mov rax, qword [rsp + 0x70]
mov eax, dword [rax + 0x1e0]
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x48], 2
jl 0x18039d156
cmp dword [rsp + 0x48], 0x10
jle 0x18039d160
mov eax, 4
jmp 0x18039db35
mov rax, qword [rsp + 0x70]
add rax, 0xf0
mov qword [rsp + 0x40], rax
mov eax, 1
imul rax, rax, 0
mov rcx, qword [rsp + 0x60]
movzx eax, byte [rcx + rax]
and eax, 0xff
shl eax, 0x18
mov ecx, 1
imul rcx, rcx, 1
mov rdx, qword [rsp + 0x60]
movzx ecx, byte [rdx + rcx]
and ecx, 0xff
shl ecx, 0x10
or eax, ecx
mov ecx, 1
imul rcx, rcx, 2
mov rdx, qword [rsp + 0x60]
movzx ecx, byte [rdx + rcx]
and ecx, 0xff
shl ecx, 8
or eax, ecx
mov ecx, 1
imul rcx, rcx, 3
mov rdx, qword [rsp + 0x60]
movzx ecx, byte [rdx + rcx]
and ecx, 0xff
or eax, ecx
mov dword [rsp + 0x20], eax
xor eax, eax
test eax, eax
jne 0x18039d170
mov eax, 4
imul rax, rax, 0
mov rcx, qword [rsp + 0x40]
mov eax, dword [rcx + rax]
mov ecx, dword [rsp + 0x20]
xor ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
mov eax, 1
imul rax, rax, 0
mov rcx, qword [rsp + 0x60]
movzx eax, byte [rcx + rax + 4]
and eax, 0xff
shl eax, 0x18
mov ecx, 1
imul rcx, rcx, 1
mov rdx, qword [rsp + 0x60]
movzx ecx, byte [rdx + rcx + 4]
and ecx, 0xff
shl ecx, 0x10
or eax, ecx
mov ecx, 1
imul rcx, rcx, 2
mov rdx, qword [rsp + 0x60]
movzx ecx, byte [rdx + rcx + 4]
and ecx, 0xff
shl ecx, 8
or eax, ecx
mov ecx, 1
imul rcx, rcx, 3
mov rdx, qword [rsp + 0x60]
movzx ecx, byte [rdx + rcx + 4]
and ecx, 0xff
or eax, ecx
mov dword [rsp + 0x24], eax
xor eax, eax
test eax, eax
jne 0x18039d205
mov eax, 4
imul rax, rax, 1
mov rcx, qword [rsp + 0x40]
mov eax, dword [rcx + rax]
mov ecx, dword [rsp + 0x24]
xor ecx, eax
mov eax, ecx
mov dword [rsp + 0x24], eax
mov eax, 1
imul rax, rax, 0
mov rcx, qword [rsp + 0x60]
movzx eax, byte [rcx + rax + 8]
and eax, 0xff
shl eax, 0x18
mov ecx, 1
imul rcx, rcx, 1
mov rdx, qword [rsp + 0x60]
movzx ecx, byte [rdx + rcx + 8]
and ecx, 0xff
shl ecx, 0x10
or eax, ecx
mov ecx, 1
imul rcx, rcx, 2
mov rdx, qword [rsp + 0x60]
movzx ecx, byte [rdx + rcx + 8]
and ecx, 0xff
shl ecx, 8
or eax, ecx
mov ecx, 1
imul rcx, rcx, 3
mov rdx, qword [rsp + 0x60]
movzx ecx, byte [rdx + rcx + 8]
and ecx, 0xff
or eax, ecx
mov dword [rsp + 0x28], eax
xor eax, eax
test eax, eax
jne 0x18039d29e
mov eax, 4
imul rax, rax, 2
mov rcx, qword [rsp + 0x40]
mov eax, dword [rcx + rax]
mov ecx, dword [rsp + 0x28]
xor ecx, eax
mov eax, ecx
mov dword [rsp + 0x28], eax
mov eax, 1
imul rax, rax, 0
mov rcx, qword [rsp + 0x60]
movzx eax, byte [rcx + rax + 0xc]
and eax, 0xff
shl eax, 0x18
mov ecx, 1
imul rcx, rcx, 1
mov rdx, qword [rsp + 0x60]
movzx ecx, byte [rdx + rcx + 0xc]
and ecx, 0xff
shl ecx, 0x10
or eax, ecx
mov ecx, 1
imul rcx, rcx, 2
mov rdx, qword [rsp + 0x60]
movzx ecx, byte [rdx + rcx + 0xc]
and ecx, 0xff
shl ecx, 8
or eax, ecx
mov ecx, 1
imul rcx, rcx, 3
mov rdx, qword [rsp + 0x60]
movzx ecx, byte [rdx + rcx + 0xc]
and ecx, 0xff
or eax, ecx
mov dword [rsp + 0x2c], eax
xor eax, eax
test eax, eax
jne 0x18039d337
mov eax, 4
imul rax, rax, 3
mov rcx, qword [rsp + 0x40]
mov eax, dword [rcx + rax]
mov ecx, dword [rsp + 0x2c]
xor ecx, eax
mov eax, ecx
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x48]
sar eax, 1
mov dword [rsp + 0x4c], eax
mov eax, dword [rsp + 0x20]
shr eax, 0x18
movzx eax, al
lea rcx, [0x18050c7a0]
mov edx, dword [rsp + 0x2c]
shr edx, 0x10
movzx edx, dl
lea r8, [0x18050eba0]
mov edx, dword [r8 + rdx*4]
mov eax, dword [rcx + rax*4]
xor eax, edx
mov ecx, dword [rsp + 0x28]
shr ecx, 8
movzx ecx, cl
lea rdx, [0x18050efa0]
xor eax, dword [rdx + rcx*4]
mov ecx, dword [rsp + 0x24]
shr ecx, 0
movzx ecx, cl
lea rdx, [0x18050f3a0]
xor eax, dword [rdx + rcx*4]
mov ecx, 4
imul rcx, rcx, 4
mov rdx, qword [rsp + 0x40]
xor eax, dword [rdx + rcx]
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x24]
shr eax, 0x18
movzx eax, al
lea rcx, [0x18050c7a0]
mov edx, dword [rsp + 0x20]
shr edx, 0x10
movzx edx, dl
lea r8, [0x18050eba0]
mov edx, dword [r8 + rdx*4]
mov eax, dword [rcx + rax*4]
xor eax, edx
mov ecx, dword [rsp + 0x2c]
shr ecx, 8
movzx ecx, cl
lea rdx, [0x18050efa0]
xor eax, dword [rdx + rcx*4]
mov ecx, dword [rsp + 0x28]
shr ecx, 0
movzx ecx, cl
lea rdx, [0x18050f3a0]
xor eax, dword [rdx + rcx*4]
mov ecx, 4
imul rcx, rcx, 5
mov rdx, qword [rsp + 0x40]
xor eax, dword [rdx + rcx]
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x28]
shr eax, 0x18
movzx eax, al
lea rcx, [0x18050c7a0]
mov edx, dword [rsp + 0x24]
shr edx, 0x10
movzx edx, dl
lea r8, [0x18050eba0]
mov edx, dword [r8 + rdx*4]
mov eax, dword [rcx + rax*4]
xor eax, edx
mov ecx, dword [rsp + 0x20]
shr ecx, 8
movzx ecx, cl
lea rdx, [0x18050efa0]
xor eax, dword [rdx + rcx*4]
mov ecx, dword [rsp + 0x2c]
shr ecx, 0
movzx ecx, cl
lea rdx, [0x18050f3a0]
xor eax, dword [rdx + rcx*4]
mov ecx, 4
imul rcx, rcx, 6
mov rdx, qword [rsp + 0x40]
xor eax, dword [rdx + rcx]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x2c]
shr eax, 0x18
movzx eax, al
lea rcx, [0x18050c7a0]
mov edx, dword [rsp + 0x28]
shr edx, 0x10
movzx edx, dl
lea r8, [0x18050eba0]
mov edx, dword [r8 + rdx*4]
mov eax, dword [rcx + rax*4]
xor eax, edx
mov ecx, dword [rsp + 0x24]
shr ecx, 8
movzx ecx, cl
lea rdx, [0x18050efa0]
xor eax, dword [rdx + rcx*4]
mov ecx, dword [rsp + 0x20]
shr ecx, 0
movzx ecx, cl
lea rdx, [0x18050f3a0]
xor eax, dword [rdx + rcx*4]
mov ecx, 4
imul rcx, rcx, 7
mov rdx, qword [rsp + 0x40]
xor eax, dword [rdx + rcx]
mov dword [rsp + 0x3c], eax
mov rax, qword [rsp + 0x40]
add rax, 0x20
mov qword [rsp + 0x40], rax
mov eax, dword [rsp + 0x4c]
dec eax
mov dword [rsp + 0x4c], eax
cmp dword [rsp + 0x4c], 0
jne 0x18039d59e
jmp 0x18039d743
mov eax, dword [rsp + 0x30]
shr eax, 0x18
movzx eax, al
lea rcx, [0x18050c7a0]
mov edx, dword [rsp + 0x3c]
shr edx, 0x10
movzx edx, dl
lea r8, [0x18050eba0]
mov edx, dword [r8 + rdx*4]
mov eax, dword [rcx + rax*4]
xor eax, edx
mov ecx, dword [rsp + 0x38]
shr ecx, 8
movzx ecx, cl
lea rdx, [0x18050efa0]
xor eax, dword [rdx + rcx*4]
mov ecx, dword [rsp + 0x34]
shr ecx, 0
movzx ecx, cl
lea rdx, [0x18050f3a0]
xor eax, dword [rdx + rcx*4]
mov ecx, 4
imul rcx, rcx, 0
mov rdx, qword [rsp + 0x40]
xor eax, dword [rdx + rcx]
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x34]
shr eax, 0x18
movzx eax, al
lea rcx, [0x18050c7a0]
mov edx, dword [rsp + 0x30]
shr edx, 0x10
movzx edx, dl
lea r8, [0x18050eba0]
mov edx, dword [r8 + rdx*4]
mov eax, dword [rcx + rax*4]
xor eax, edx
mov ecx, dword [rsp + 0x3c]
shr ecx, 8
movzx ecx, cl
lea rdx, [0x18050efa0]
xor eax, dword [rdx + rcx*4]
mov ecx, dword [rsp + 0x38]
shr ecx, 0
movzx ecx, cl
lea rdx, [0x18050f3a0]
xor eax, dword [rdx + rcx*4]
mov ecx, 4
imul rcx, rcx, 1
mov rdx, qword [rsp + 0x40]
xor eax, dword [rdx + rcx]
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x38]
shr eax, 0x18
movzx eax, al
lea rcx, [0x18050c7a0]
mov edx, dword [rsp + 0x34]
shr edx, 0x10
movzx edx, dl
lea r8, [0x18050eba0]
mov edx, dword [r8 + rdx*4]
mov eax, dword [rcx + rax*4]
xor eax, edx
mov ecx, dword [rsp + 0x30]
shr ecx, 8
movzx ecx, cl
lea rdx, [0x18050efa0]
xor eax, dword [rdx + rcx*4]
mov ecx, dword [rsp + 0x3c]
shr ecx, 0
movzx ecx, cl
lea rdx, [0x18050f3a0]
xor eax, dword [rdx + rcx*4]
mov ecx, 4
imul rcx, rcx, 2
mov rdx, qword [rsp + 0x40]
xor eax, dword [rdx + rcx]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x3c]
shr eax, 0x18
movzx eax, al
lea rcx, [0x18050c7a0]
mov edx, dword [rsp + 0x38]
shr edx, 0x10
movzx edx, dl
lea r8, [0x18050eba0]
mov edx, dword [r8 + rdx*4]
mov eax, dword [rcx + rax*4]
xor eax, edx
mov ecx, dword [rsp + 0x34]
shr ecx, 8
movzx ecx, cl
lea rdx, [0x18050efa0]
xor eax, dword [rdx + rcx*4]
mov ecx, dword [rsp + 0x30]
shr ecx, 0
movzx ecx, cl
lea rdx, [0x18050f3a0]
xor eax, dword [rdx + rcx*4]
mov ecx, 4
imul rcx, rcx, 3
mov rdx, qword [rsp + 0x40]
xor eax, dword [rdx + rcx]
mov dword [rsp + 0x2c], eax
jmp 0x18039d3da
mov eax, dword [rsp + 0x30]
shr eax, 0x18
movzx eax, al
lea rcx, str.RRRR_t_t_t_tjjjj
mov eax, dword [rcx + rax*4]
and eax, 0xff000000
mov ecx, dword [rsp + 0x3c]
shr ecx, 0x10
movzx ecx, cl
lea rdx, str.RRRR_t_t_t_tjjjj
mov ecx, dword [rdx + rcx*4]
and ecx, 0xff0000
xor eax, ecx
mov ecx, dword [rsp + 0x38]
shr ecx, 8
movzx ecx, cl
lea rdx, str.RRRR_t_t_t_tjjjj
mov ecx, dword [rdx + rcx*4]
and ecx, 0xff00
xor eax, ecx
mov ecx, dword [rsp + 0x34]
shr ecx, 0
movzx ecx, cl
lea rdx, str.RRRR_t_t_t_tjjjj
mov ecx, dword [rdx + rcx*4]
and ecx, 0xff
xor eax, ecx
mov ecx, 4
imul rcx, rcx, 0
mov rdx, qword [rsp + 0x40]
xor eax, dword [rdx + rcx]
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
shr eax, 0x18
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 0
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx], al
mov eax, dword [rsp + 0x20]
shr eax, 0x10
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 1
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx], al
mov eax, dword [rsp + 0x20]
shr eax, 8
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 2
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx], al
mov eax, dword [rsp + 0x20]
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 3
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx], al
xor eax, eax
test eax, eax
jne 0x18039d7c5
mov eax, dword [rsp + 0x34]
shr eax, 0x18
movzx eax, al
lea rcx, str.RRRR_t_t_t_tjjjj
mov eax, dword [rcx + rax*4]
and eax, 0xff000000
mov ecx, dword [rsp + 0x30]
shr ecx, 0x10
movzx ecx, cl
lea rdx, str.RRRR_t_t_t_tjjjj
mov ecx, dword [rdx + rcx*4]
and ecx, 0xff0000
xor eax, ecx
mov ecx, dword [rsp + 0x3c]
shr ecx, 8
movzx ecx, cl
lea rdx, str.RRRR_t_t_t_tjjjj
mov ecx, dword [rdx + rcx*4]
and ecx, 0xff00
xor eax, ecx
mov ecx, dword [rsp + 0x38]
shr ecx, 0
movzx ecx, cl
lea rdx, str.RRRR_t_t_t_tjjjj
mov ecx, dword [rdx + rcx*4]
and ecx, 0xff
xor eax, ecx
mov ecx, 4
imul rcx, rcx, 1
mov rdx, qword [rsp + 0x40]
xor eax, dword [rdx + rcx]
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x24]
shr eax, 0x18
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 0
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx + 4], al
mov eax, dword [rsp + 0x24]
shr eax, 0x10
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 1
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx + 4], al
mov eax, dword [rsp + 0x24]
shr eax, 8
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 2
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx + 4], al
mov eax, dword [rsp + 0x24]
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 3
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx + 4], al
xor eax, eax
test eax, eax
jne 0x18039d8be
mov eax, dword [rsp + 0x38]
shr eax, 0x18
movzx eax, al
lea rcx, str.RRRR_t_t_t_tjjjj
mov eax, dword [rcx + rax*4]
and eax, 0xff000000
mov ecx, dword [rsp + 0x34]
shr ecx, 0x10
movzx ecx, cl
lea rdx, str.RRRR_t_t_t_tjjjj
mov ecx, dword [rdx + rcx*4]
and ecx, 0xff0000
xor eax, ecx
mov ecx, dword [rsp + 0x30]
shr ecx, 8
movzx ecx, cl
lea rdx, str.RRRR_t_t_t_tjjjj
mov ecx, dword [rdx + rcx*4]
and ecx, 0xff00
xor eax, ecx
mov ecx, dword [rsp + 0x3c]
shr ecx, 0
movzx ecx, cl
lea rdx, str.RRRR_t_t_t_tjjjj
mov ecx, dword [rdx + rcx*4]
and ecx, 0xff
xor eax, ecx
mov ecx, 4
imul rcx, rcx, 2
mov rdx, qword [rsp + 0x40]
xor eax, dword [rdx + rcx]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x28]
shr eax, 0x18
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 0
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx + 8], al
mov eax, dword [rsp + 0x28]
shr eax, 0x10
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 1
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx + 8], al
mov eax, dword [rsp + 0x28]
shr eax, 8
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 2
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx + 8], al
mov eax, dword [rsp + 0x28]
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 3
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx + 8], al
xor eax, eax
test eax, eax
jne 0x18039d9bb
mov eax, dword [rsp + 0x3c]
shr eax, 0x18
movzx eax, al
lea rcx, str.RRRR_t_t_t_tjjjj
mov eax, dword [rcx + rax*4]
and eax, 0xff000000
mov ecx, dword [rsp + 0x38]
shr ecx, 0x10
movzx ecx, cl
lea rdx, str.RRRR_t_t_t_tjjjj
mov ecx, dword [rdx + rcx*4]
and ecx, 0xff0000
xor eax, ecx
mov ecx, dword [rsp + 0x34]
shr ecx, 8
movzx ecx, cl
lea rdx, str.RRRR_t_t_t_tjjjj
mov ecx, dword [rdx + rcx*4]
and ecx, 0xff00
xor eax, ecx
mov ecx, dword [rsp + 0x30]
shr ecx, 0
movzx ecx, cl
lea rdx, str.RRRR_t_t_t_tjjjj
mov ecx, dword [rdx + rcx*4]
and ecx, 0xff
xor eax, ecx
mov ecx, 4
imul rcx, rcx, 3
mov rdx, qword [rsp + 0x40]
xor eax, dword [rdx + rcx]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x2c]
shr eax, 0x18
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 0
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx + 0xc], al
mov eax, dword [rsp + 0x2c]
shr eax, 0x10
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 1
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx + 0xc], al
mov eax, dword [rsp + 0x2c]
shr eax, 8
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 2
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx + 0xc], al
mov eax, dword [rsp + 0x2c]
and eax, 0xff
mov ecx, 1
imul rcx, rcx, 3
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rcx + 0xc], al
xor eax, eax
test eax, eax
jne 0x18039dab8
xor eax, eax
add rsp, 0x50
pop rdi
ret