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

Disassembly:
push rbx
push r13
push r14
push r15
sub rsp, 0x18
mov r10d, dword [rcx]
lea r13, [0x180058830]
mov r9d, dword [rcx + 8]
mov r15, rdx
mov r11d, dword [rcx + 0xc]
mov rdx, r13
xor r10d, dword [r8]
xor r9d, dword [r8 + 8]
xor r11d, dword [r8 + 0xc]
mov qword [rsp + 0x50], rsi
mov esi, dword [rcx + 4]
xor esi, dword [r8 + 4]
xor ebx, ebx
mov qword [rsp + 0x58], rdi
mov rdi, r8
mov ecx, ebx
mov r8d, ebx
nop word [rax + rax]
mov eax, dword [rdx]
lea rdx, [rdx + 0x20]
xor r8d, eax
add ecx, 8
cmp ecx, 0x40
jb 0x180002d90
mov rax, r9
mov dword [rsp + 0x40], r8d
shr rax, 0x10
movzx ecx, al
mov rax, r11
shr rax, 0x18
mov r8d, esi
shr r8, 0x10
movzx edx, byte [rcx + r13]
movzx eax, byte [rax + r13]
shl eax, 8
xor edx, eax
mov eax, esi
shr rax, 8
movzx ecx, al
shl edx, 8
movzx eax, byte [rcx + r13]
xor edx, eax
movzx eax, r10b
shl edx, 8
movzx ecx, byte [rax + r13]
mov rax, r10
xor edx, ecx
shr rax, 0x18
mov dword [rsp], edx
movzx edx, byte [rax + r13]
mov rax, r11
shr rax, 0x10
movzx ecx, al
shl edx, 8
movzx eax, byte [rcx + r13]
xor edx, eax
mov rax, r9
shr rax, 8
movzx ecx, al
shl edx, 8
movzx eax, byte [rcx + r13]
xor edx, eax
movzx eax, sil
shl edx, 8
movzx ecx, byte [rax + r13]
mov rax, r10
xor edx, ecx
shr rax, 0x10
movzx ecx, al
mov dword [rsp + 4], edx
mov eax, esi
shr rax, 0x18
movzx edx, byte [rcx + r13]
shr r10, 8
movzx eax, byte [rax + r13]
shl eax, 8
xor edx, eax
mov rax, r11
shr rax, 8
shl edx, 8
movzx ecx, al
movzx eax, byte [rcx + r13]
xor edx, eax
movzx eax, r9b
shl edx, 8
shr r9, 0x18
movzx ecx, byte [rax + r13]
xor edx, ecx
movzx eax, r8b
mov dword [rsp + 8], edx
movzx edx, byte [rax + r13]
movzx eax, byte [r9 + r13]
shl eax, 8
xor edx, eax
movzx eax, r10b
shl edx, 8
movzx ecx, byte [rax + r13]
xor edx, ecx
movzx eax, r11b
shl edx, 8
movzx ecx, byte [rax + r13]
lea rax, [rsp]
xor edx, ecx
mov dword [rsp + 0xc], edx
lea rdx, [rsp]
mov r11, rdi
mov r10d, 4
sub r11, rdx
nop dword [rax + rax]
mov r8d, dword [rax]
lea rax, [rax + 4]
mov r9d, r8d
and r9d, 0x80808080
mov ecx, r9d
shr ecx, 7
sub r9d, ecx
mov ecx, r8d
and ecx, 0xff7f7f7f
and r9d, 0x1b1b1b1b
add ecx, ecx
xor r9d, ecx
mov ecx, r8d
rol ecx, 0x18
mov edx, r9d
rol edx, 0x18
xor edx, ecx
mov ecx, r8d
rol ecx, 0x10
xor edx, ecx
rol r8d, 8
xor edx, r8d
xor edx, dword [r11 + rax + 0xc]
xor edx, r9d
mov dword [rax - 4], edx
sub r10, 1
jne 0x180002ed0
lea r14, [rdi + 0x20]
mov edi, dword [rdi + 0xf0]
sub edi, 2
test edi, edi
jle 0x180003064
mov ecx, dword [rsp + 0xc]
mov edx, dword [rsp + 8]
mov esi, dword [rsp + 4]
mov qword [rsp + 0x48], rbp
mov ebp, dword [rsp]
mov qword [rsp + 0x10], r12
lea r12, [0x180058030]
mov r10d, ecx
dec edi
mov r11d, edx
mov r8d, ebp
mov r9d, esi
mov eax, esi
shr rax, 8
movzx edx, al
mov eax, r11d
shr rax, 0x10
movzx ecx, al
mov eax, r10d
shr rax, 0x18
mov ebp, dword [r12 + rdx*8 + 3]
xor ebp, dword [r12 + rcx*8 + 2]
xor ebp, dword [r12 + rax*8 + 1]
movzx eax, r8b
xor ebp, dword [r12 + rax*8]
mov eax, r10d
xor ebp, dword [r14]
shr rax, 0x10
movzx edx, al
mov eax, r11d
shr rax, 8
movzx ecx, al
mov eax, r8d
shr rax, 0x18
mov esi, dword [r12 + rdx*8 + 2]
xor esi, dword [r12 + rcx*8 + 3]
xor esi, dword [r12 + rax*8 + 1]
movzx eax, r9b
xor esi, dword [r12 + rax*8]
mov eax, r10d
xor esi, dword [r14 + 4]
shr rax, 8
movzx edx, al
mov eax, r8d
shr rax, 0x10
movzx ecx, al
mov eax, r9d
shr rax, 0x18
mov edx, dword [r12 + rdx*8 + 3]
shr r8, 8
xor edx, dword [r12 + rcx*8 + 2]
xor edx, dword [r12 + rax*8 + 1]
movzx eax, r11b
shr r9, 0x10
shr r11, 0x18
movzx ecx, r8b
xor edx, dword [r12 + rax*8]
xor edx, dword [r14 + 8]
movzx eax, r9b
mov ecx, dword [r12 + rcx*8 + 3]
xor ecx, dword [r12 + rax*8 + 2]
xor ecx, dword [r12 + r11*8 + 1]
movzx eax, r10b
xor ecx, dword [r12 + rax*8]
xor ecx, dword [r14 + 0xc]
add r14, 0x10
test edi, edi
jg 0x180002f62
mov r12, qword [rsp + 0x10]
mov dword [rsp], ebp
mov rbp, qword [rsp + 0x48]
mov dword [rsp + 0xc], ecx
mov dword [rsp + 8], edx
mov dword [rsp + 4], esi
mov rdi, qword [rsp + 0x58]
mov ecx, ebx
mov rsi, qword [rsp + 0x50]
mov rdx, r13
nop dword [rax]
nop word [rax + rax]
mov eax, dword [rdx]
lea rdx, [rdx + 0x20]
xor ebx, eax
add ecx, 8
cmp ecx, 0x40
jb 0x180003080
mov r9d, dword [rsp + 8]
mov r8d, dword [rsp + 4]
mov r11d, dword [rsp + 0xc]
mov r10d, dword [rsp]
mov eax, r11d
shr rax, 0x18
mov dword [rsp + 0x40], ebx
movzx edx, byte [rax + r13]
mov eax, r9d
shr rax, 0x10
movzx ecx, al
shl edx, 8
movzx eax, byte [rcx + r13]
xor edx, eax
mov eax, r8d
shr rax, 8
movzx ecx, al
shl edx, 8
movzx eax, byte [rcx + r13]
xor edx, eax
movzx eax, r10b
shl edx, 8
movzx ecx, byte [rax + r13]
mov eax, r10d
xor edx, ecx
shr rax, 0x18
xor edx, dword [r14]
mov dword [r15], edx
movzx edx, byte [rax + r13]
mov eax, r11d
shr rax, 0x10
movzx ecx, al
shl edx, 8
movzx eax, byte [rcx + r13]
xor edx, eax
mov eax, r9d
shr rax, 8
movzx ecx, al
shl edx, 8
movzx eax, byte [rcx + r13]
xor edx, eax
movzx eax, r8b
shl edx, 8
movzx ecx, byte [rax + r13]
mov eax, r10d
xor edx, ecx
shr rax, 0x10
xor edx, dword [r14 + 4]
mov dword [r15 + 4], edx
movzx ecx, al
mov eax, r8d
shr rax, 0x18
shr r8, 0x10
shr r10, 8
movzx edx, byte [rcx + r13]
movzx eax, byte [rax + r13]
shl eax, 8
xor edx, eax
mov eax, r11d
shl edx, 8
shr rax, 8
movzx ecx, al
movzx eax, byte [rcx + r13]
xor edx, eax
movzx eax, r9b
shl edx, 8
shr r9, 0x18
movzx ecx, byte [rax + r13]
xor edx, ecx
movzx eax, r8b
xor edx, dword [r14 + 8]
mov dword [r15 + 8], edx
movzx edx, byte [rax + r13]
movzx eax, byte [r9 + r13]
shl eax, 8
xor edx, eax
movzx eax, r10b
shl edx, 8
movzx ecx, byte [rax + r13]
xor edx, ecx
shl edx, 8
movzx eax, r11b
movzx ecx, byte [rax + r13]
xor edx, ecx
xor edx, dword [r14 + 0xc]
mov dword [r15 + 0xc], edx
add rsp, 0x18
pop r15
pop r14
pop r13
pop rbx
ret