Function at 0x180027a50
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rdi, rcx
mov rax, r8
add rcx, 0x3d0
mov rbx, rdx
movsxd r8, dword [rdi + 4]
test rax, rax
je 0x180027a87
mov rdx, rax
call fcn.180008d30
jmp 0x180027a8e
xor edx, edx
call fcn.180008e20
mov eax, dword [rdi + 4]
xor ebp, ebp
mov ecx, dword [rdi + 8]
cdq
and edx, 3
add eax, edx
sar eax, 2
movsxd r13, eax
mov r15, r13
test ecx, ecx
js 0x180027ad3
lea rsi, [rdi + 0x10]
nop dword [rax]
test r13d, r13d
jle 0x180027ac6
mov r8, r13
xor edx, edx
shl r8, 2
mov rcx, rsi
call fcn.180008e20
mov ecx, dword [rdi + 8]
inc ebp
add rsi, 0x20
cmp ebp, ecx
jle 0x180027ab0
xor esi, esi
test ecx, ecx
js 0x180027b03
lea rbp, [rdi + 0x1f0]
test r13d, r13d
jle 0x180027af6
mov r8, r13
xor edx, edx
shl r8, 2
mov rcx, rbp
call fcn.180008e20
mov ecx, dword [rdi + 8]
inc esi
add rbp, 0x20
cmp esi, ecx
jle 0x180027ae0
mov eax, dword [rdi]
lea r14d, [rcx + 1]
cdq
imul r14d, r13d
and edx, 3
lea r9, [rsp + 0x20]
add eax, edx
sar eax, 2
movsxd r11, eax
test eax, eax
jle 0x180027b67
mov r10d, r11d
nop word [rax + rax]
movzx r8d, byte [rbx]
lea r9, [r9 + 4]
movzx ecx, byte [rbx + 1]
movzx edx, byte [rbx + 2]
movzx eax, byte [rbx + 3]
lea rbx, [rbx + 4]
shl r8d, 8
or r8d, ecx
shl r8d, 8
or r8d, edx
shl r8d, 8
or r8d, eax
mov dword [r9 - 4], r8d
sub r10, 1
jne 0x180027b30
xor ebx, ebx
lea rbp, [0x180000000]
mov rsi, r11
lea r12d, [rbx + 1]
test r11d, r11d
jle 0x180027bc1
xor r10d, r10d
nop
cmp ebx, r14d
jge 0x180027ced
mov r9d, dword [rsp + r10*4 + 0x20]
mov eax, ebx
cdq
inc r10
idiv r13d
inc ebx
movsxd rcx, eax
movsxd r8, edx
lea rdx, [r8 + rcx*8]
mov dword [rdi + rdx*4 + 0x10], r9d
mov ecx, dword [rdi + 8]
sub ecx, eax
movsxd rax, ecx
lea rcx, [r8 + rax*8]
mov dword [rdi + rcx*4 + 0x1f0], r9d
cmp r10, rsi
jl 0x180027b80
cmp ebx, r14d
jge 0x180027ced
lea r11, [rsp + 0x20]
sub r11, 4
lea r9, [0x18003e8c8]
mov r10, r11
mov qword [rsp + 0x88], r9
nop word [rax + rax]
mov edx, dword [rsp + rsi*4 + 0x1c]
mov eax, edx
sar eax, 0x10
movzx ecx, al
movsx eax, byte [r9]
movzx r8d, byte [rcx + rbp + 0x3e8f0]
xor r8d, eax
mov eax, edx
sar eax, 8
shl r8d, 8
movzx ecx, al
movzx eax, byte [rcx + rbp + 0x3e8f0]
xor r8d, eax
movzx eax, dl
shl r8d, 8
sar edx, 0x18
movzx eax, byte [rax + rbp + 0x3e8f0]
xor r8d, eax
movzx eax, dl
shl r8d, 8
movzx eax, byte [rax + rbp + 0x3e8f0]
xor r8d, eax
xor dword [rsp + 0x20], r8d
cmp esi, 8
je 0x180027d85
mov rax, r12
cmp r12, rsi
jge 0x180027c73
mov ecx, dword [r10 + rax*4]
mov r10, r11
xor dword [rsp + rax*4 + 0x20], ecx
inc rax
cmp rax, rsi
jl 0x180027c60
lea r10, [rsp + 0x20]
sub r10, 4
xor ebp, ebp
test rsi, rsi
jle 0x180027cc8
cmp ebx, r14d
jge 0x180027cc0
mov r9d, dword [rsp + rbp*4 + 0x20]
mov eax, ebx
cdq
inc rbp
idiv r13d
inc ebx
movsxd rcx, eax
movsxd r8, edx
lea rdx, [r8 + rcx*8]
mov dword [rdi + rdx*4 + 0x10], r9d
mov ecx, dword [rdi + 8]
sub ecx, eax
movsxd rax, ecx
lea rcx, [r8 + rax*8]
mov dword [rdi + rcx*4 + 0x1f0], r9d
cmp rbp, rsi
jl 0x180027c83
mov r9, qword [rsp + 0x88]
inc r9
lea rbp, [0x180000000]
mov qword [rsp + 0x88], r9
cmp ebx, r14d
jl 0x180027bf0
mov r15, r13
lea rbp, [0x180000000]
cmp dword [rdi + 8], r12d
jle 0x180027d6d
lea rbx, [rdi + 0x210]
nop word [rax + rax]
test r15, r15
jle 0x180027d60
mov r10, rbx
mov r11, r15
nop dword [rax + rax]
mov r9d, dword [r10]
lea r10, [r10 + 4]
mov eax, r9d
sar eax, 0x18
movzx edx, al
mov eax, r9d
sar eax, 0x10
movzx ecx, al
mov eax, r9d
sar eax, 8
mov r8d, dword [rbp + rdx*4 + 0x3eaf0]
xor r8d, dword [rbp + rcx*4 + 0x3eef0]
movzx ecx, al
movzx eax, r9b
xor r8d, dword [rbp + rcx*4 + 0x3f2f0]
xor r8d, dword [rbp + rax*4 + 0x3f6f0]
mov dword [r10 - 4], r8d
sub r11, 1
jne 0x180027d10
inc r12d
add rbx, 0x20
cmp r12d, dword [rdi + 8]
jl 0x180027d00
mov rbx, qword [rsp + 0x98]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rcx, r12
nop dword [rax + rax]
mov eax, dword [r11 + rcx*4]
mov r10, r11
xor dword [rsp + rcx*4 + 0x20], eax
inc rcx
cmp rcx, 4
jl 0x180027d90
mov edx, dword [rsp + 0x2c]
mov eax, edx
sar eax, 0x18
movzx ecx, al
mov eax, edx
sar eax, 0x10
movzx r8d, byte [rcx + rbp + 0x3e8f0]
movzx ecx, al
shl r8d, 8
movzx eax, byte [rcx + rbp + 0x3e8f0]
xor r8d, eax
mov eax, edx
sar eax, 8
movzx ecx, al
shl r8d, 8
movzx eax, byte [rcx + rbp + 0x3e8f0]
mov ecx, 5
xor r8d, eax
movzx eax, dl
shl r8d, 8
movzx eax, byte [rax + rbp + 0x3e8f0]
xor r8d, eax
xor dword [rsp + 0x30], r8d
cmp rsi, rcx
jle 0x180027c7c
nop dword [rax]
mov eax, dword [r11 + rcx*4]
xor dword [rsp + rcx*4 + 0x20], eax
inc rcx
cmp rcx, rsi
jl 0x180027e10
xor ebp, ebp
jmp 0x180027c83