Function at 0x180001c30
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
test rdx, rdx
je 0x180002224
mov ebp, r9d
cmp r9d, 0x20
ja 0x180002224
mov r13, rcx
mov ecx, ebp
movabs rax, 0x101010000
bt rax, rcx
jae 0x180002224
mov esi, dword [rsp + 0xd0]
cmp esi, 0x20
ja 0x180002224
mov r15d, esi
bt rax, r15
jae 0x180002224
mov r14, r8
mov r12, rdx
mov dword [r13 + 0x3cc], ebp
mov dword [r13 + 0x3d0], esi
lea rcx, [r13 + 0x3d8]
mov rdx, r8
mov r8, r15
call fcn.18000a420
lea rcx, [r13 + 0x3f8]
mov rdx, r14
mov r8, r15
call fcn.18000a420
cmp ebp, 0x18
je 0x180001cec
mov eax, 0xe
cmp ebp, 0x10
jne 0x180001cf9
xor eax, eax
cmp esi, 0x18
setne al
cmp esi, 0x10
lea ecx, [rax + rax + 0xc]
mov eax, 0xa
cmovne eax, ecx
jmp 0x180001cf9
xor eax, eax
cmp esi, 0x20
sete al
add eax, eax
add eax, 0xc
mov dword [r13 + 0x3d4], eax
mov r14d, esi
shr r14d, 2
and esi, 0xfc
lea rbp, [r13 + 0xc]
mov edi, 0xffffffff
nop word cs:[rax + rax]
mov rcx, rbp
xor edx, edx
mov r8, rsi
call fcn.18000aad0
mov ebx, dword [r13 + 0x3d4]
add rbp, 0x20
add edi, 1
cmp edi, ebx
jl 0x180001d20
test ebx, ebx
js 0x180001d86
lea rbp, [r13 + 0x1ec]
mov edi, 0xffffffff
jmp 0x180001d6b
add rbp, 0x20
add edi, 1
cmp edi, ebx
jge 0x180001d86
test r14d, r14d
je 0x180001d60
mov rcx, rbp
xor edx, edx
mov r8, rsi
call fcn.18000aad0
mov ebx, dword [r13 + 0x3d4]
jmp 0x180001d60
add ebx, 1
imul ebx, r14d
mov esi, dword [r13 + 0x3cc]
lea r8d, [rsi + 3]
test esi, esi
cmovns r8d, esi
sar r8d, 2
xor r15d, r15d
cmp esi, 4
jl 0x180001e6c
mov eax, r8d
xor ecx, ecx
nop word cs:[rax + rax]
nop dword [rax]
movzx edx, byte [r12 + rcx*4]
shl edx, 0x18
mov dword [r13 + rcx*4 + 0x418], edx
movzx edi, byte [r12 + rcx*4 + 1]
shl edi, 0x10
or edi, edx
mov dword [r13 + rcx*4 + 0x418], edi
movzx edx, byte [r12 + rcx*4 + 2]
shl edx, 8
or edx, edi
mov dword [r13 + rcx*4 + 0x418], edx
movzx edi, byte [r12 + rcx*4 + 3]
or edi, edx
mov dword [r13 + rcx*4 + 0x418], edi
add rcx, 1
cmp eax, ecx
jne 0x180001dc0
xor r15d, r15d
cmp esi, 4
jl 0x180001e6c
test ebx, ebx
jle 0x180001e6c
movsxd r9, r8d
xor r15d, r15d
mov ebp, dword [r13 + r15*4 + 0x418]
mov eax, r15d
xor edx, edx
div r14d
movsxd rdi, eax
shl rax, 5
add rax, r13
mov dword [rax + rdx*4 + 0xc], ebp
mov eax, dword [r13 + r15*4 + 0x418]
movsxd rbp, dword [r13 + 0x3d4]
sub rbp, rdi
shl rbp, 5
add rbp, r13
mov dword [rbp + rdx*4 + 0x1ec], eax
add r15, 1
cmp r15, r9
jge 0x180001e6c
cmp r15d, ebx
jl 0x180001e20
mov qword [rsp + 0x28], rsi
cmp r15d, ebx
jge 0x180002172
lea eax, [r8 - 1]
movsxd rcx, eax
mov rax, qword [rsp + 0x28]
and eax, 0xfffffffc
mov dword [rsp + 0x34], eax
cmp r8d, 2
mov eax, 2
cmovg eax, r8d
add eax, 0xffffffff
movsxd rbp, r8d
lea r9, [rax - 1]
mov qword [rsp + 0x48], rax
add rax, 0xfffffffffffffffe
mov qword [rsp + 0x40], rax
mov r8d, r9d
and r8d, 3
and r9, 0xfffffffffffffffc
lea rax, [r13 + 0x41c]
mov qword [rsp + 0x38], rax
xor esi, esi
lea r11, str.cw
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x58], r9
mov qword [rsp + 0x50], r8
jmp 0x180001f07
lea r11, str.cw
mov rcx, r12
add rsi, 1
cmp r15d, ebx
jge 0x180002172
mov r12, rcx
mov eax, dword [r13 + rcx*4 + 0x418]
mov edx, eax
shr edx, 0x10
movzx edx, dl
movzx edx, byte [rdx + r11]
shl edx, 0x18
movzx edi, ah
movzx edi, byte [rdi + r11]
shl edi, 0x10
or edi, edx
movzx edx, al
movzx edx, byte [rdx + r11]
shl edx, 8
or edx, edi
shr rax, 0x18
movzx eax, byte [rax + r11]
lea rcx, [0x18002a260]
movzx r10d, byte [rsi + rcx]
shl r10d, 0x18
xor r10d, dword [r13 + 0x418]
or eax, edx
xor r10d, eax
mov dword [r13 + 0x418], r10d
cmp dword [rsp + 0x34], 0x20
jne 0x180002020
mov edi, dword [r13 + 0x41c]
xor edi, r10d
mov dword [r13 + 0x41c], edi
xor edi, dword [r13 + 0x420]
mov dword [r13 + 0x420], edi
xor edi, dword [r13 + 0x424]
mov dword [r13 + 0x424], edi
movzx edx, dil
movzx edx, byte [rdx + r11]
mov eax, edi
shr eax, 8
movzx eax, al
movzx eax, byte [rax + r11]
shl eax, 8
or eax, edx
mov edx, edi
shr edx, 0x10
movzx edx, dl
movzx edx, byte [rdx + r11]
shl edx, 0x10
or edx, eax
shr rdi, 0x18
movzx eax, byte [rdi + r11]
shl eax, 0x18
or eax, edx
xor eax, dword [r13 + 0x428]
mov dword [r13 + 0x428], eax
xor eax, dword [r13 + 0x42c]
mov dword [r13 + 0x42c], eax
xor eax, dword [r13 + 0x430]
mov dword [r13 + 0x430], eax
xor dword [r13 + 0x434], eax
mov rcx, qword [rsp + 0x28]
jmp 0x1800020d0
mov rcx, qword [rsp + 0x28]
cmp ecx, 8
jl 0x1800020d0
xor dword [r13 + 0x41c], r10d
cmp dword [rsp + 0x48], 1
je 0x1800020d0
mov eax, dword [r13 + 0x41c]
mov edx, 1
cmp qword [rsp + 0x40], 3
jb 0x1800020ad
xor edx, edx
nop word cs:[rax + rax]
xor eax, dword [r13 + rdx*4 + 0x420]
mov dword [r13 + rdx*4 + 0x420], eax
xor eax, dword [r13 + rdx*4 + 0x424]
mov dword [r13 + rdx*4 + 0x424], eax
xor eax, dword [r13 + rdx*4 + 0x428]
mov dword [r13 + rdx*4 + 0x428], eax
xor eax, dword [r13 + rdx*4 + 0x42c]
mov dword [r13 + rdx*4 + 0x42c], eax
add rdx, 4
cmp r9, rdx
jne 0x180002060
add rdx, 1
test r8, r8
je 0x1800020d0
mov rdi, qword [rsp + 0x38]
lea rdx, [rdi + rdx*4]
xor edi, edi
nop dword [rax]
xor eax, dword [rdx + rdi*4]
mov dword [rdx + rdi*4], eax
add rdi, 1
cmp r8, rdi
jne 0x1800020c0
nop
cmp ecx, 4
jl 0x180001ef0
cmp r15d, ebx
jge 0x180001ef0
lea r8d, [r15 + 1]
mov r9d, r15d
xor r11d, r11d
nop dword [rax]
lea eax, [r9 + r11]
cdq
idiv r14d
cdqe
movsxd rdx, edx
mov rdi, rax
shl rdi, 5
add rdi, r13
mov dword [rdi + rdx*4 + 0xc], r10d
mov edi, dword [r13 + r11*4 + 0x418]
movsxd rcx, dword [r13 + 0x3d4]
sub rcx, rax
shl rcx, 5
add rcx, r13
mov dword [rcx + rdx*4 + 0x1ec], edi
lea rax, [r11 + 1]
cmp rax, rbp
jge 0x180002150
lea ecx, [r8 + r11]
cmp ecx, ebx
jge 0x180002150
mov r10d, dword [r13 + r11*4 + 0x41c]
mov r11, rax
jmp 0x1800020f0
add r15d, r11d
add r15d, 1
mov rcx, qword [rsp + 0x60]
mov r9, qword [rsp + 0x58]
mov r8, qword [rsp + 0x50]
lea r11, str.cw
jmp 0x180001efa
mov r9d, dword [r13 + 0x3d4]
cmp r9d, 2
jl 0x18000221f
mov eax, r14d
lea rcx, [r13 + 0x20c]
mov r8d, 1
lea r10, [0x18002a280]
lea r11, [0x18002a680]
lea r15, [0x18002aa80]
lea r12, [0x18002ae80]
jmp 0x1800021d0
add r8, 1
movsxd rdx, r9d
add rcx, 0x20
cmp r8, rdx
jge 0x18000221f
test r14d, r14d
je 0x1800021c0
xor ebp, ebp
nop word [rax + rax]
mov ebx, dword [rcx + rbp*4]
mov rdi, rbx
movzx edx, bh
movzx esi, bl
shr rbx, 0x18
shr rdi, 0xe
and edi, 0x3fc
mov edi, dword [rdi + r11]
xor edi, dword [r10 + rbx*4]
xor edi, dword [r15 + rdx*4]
xor edi, dword [r12 + rsi*4]
mov dword [rcx + rbp*4], edi
add rbp, 1
cmp rax, rbp
jne 0x1800021e0
mov r9d, dword [r13 + 0x3d4]
jmp 0x1800021c0
mov byte [r13 + 8], 1
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret