Function at 0x1800018d0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], r8
push rdi
push r13
sub rsp, 0x18
cmp byte [rcx + 8], 0
mov r13, r8
mov rdi, rcx
je 0x180001466
movzx eax, byte [rdx + 1]
mov qword [rsp + 0x30], rbx
movzx ebx, byte [rdx]
shl eax, 0x10
mov qword [rsp + 0x38], rbp
movzx ebp, byte [rdx + 8]
mov qword [rsp + 0x48], rsi
movzx esi, byte [rdx + 4]
shl ebx, 0x18
or ebx, eax
movzx eax, byte [rdx + 2]
shl esi, 0x18
shl eax, 8
mov qword [rsp + 8], r14
movzx r14d, byte [rdx + 0xe]
or ebx, eax
movzx eax, byte [rdx + 3]
shl ebp, 0x18
or ebx, eax
movzx eax, byte [rdx + 5]
shl r14d, 8
xor ebx, dword [rcx + 0xc]
shl eax, 0x10
mov qword [rsp], r15
or esi, eax
movzx eax, byte [rdx + 6]
lea r15, [0x180000000]
shl eax, 8
or esi, eax
movzx eax, byte [rdx + 7]
or esi, eax
movzx eax, byte [rdx + 9]
xor esi, dword [rcx + 0x10]
shl eax, 0x10
or ebp, eax
movzx eax, byte [rdx + 0xa]
shl eax, 8
or ebp, eax
movzx eax, byte [rdx + 0xb]
or ebp, eax
movzx eax, byte [rdx + 0xd]
xor ebp, dword [rcx + 0x14]
movzx ecx, byte [rdx + 0xc]
shl eax, 0x10
shl ecx, 0x18
or ecx, eax
movzx eax, byte [rdx + 0xf]
or r14d, eax
movsxd rax, dword [rdi + 0x3d4]
or r14d, ecx
xor r14d, dword [rdi + 0x18]
cmp rax, 1
jle 0x18000126c
mov qword [rsp + 0x10], r12
lea r15, [rdi + 0x34]
lea r13, [0x180000000]
lea r12, [rax - 1]
nop dword [rax]
movsxd r9, esi
movsxd r10, ebp
movsxd r11, r14d
movsxd r8, ebx
mov rax, r9
lea r15, [r15 + 0x20]
sar rax, 0x18
movzx edx, al
mov rax, r10
mov esi, dword [r13 + rdx*4 + 0x38860]
sar rax, 0x10
movzx ecx, al
mov rax, r11
xor esi, dword [r13 + rcx*4 + 0x38460]
sar rax, 8
movzx ecx, al
movzx eax, r8b
xor esi, dword [r13 + rcx*4 + 0x38060]
xor esi, dword [r13 + rax*4 + 0x37c60]
mov rax, r8
xor esi, dword [r15 - 0x24]
sar rax, 8
movzx edx, al
mov rax, r10
mov ebp, dword [r13 + rdx*4 + 0x38060]
sar rax, 0x18
movzx ecx, al
mov rax, r11
xor ebp, dword [r13 + rcx*4 + 0x38860]
sar rax, 0x10
movzx ecx, al
movzx eax, r9b
xor ebp, dword [r13 + rcx*4 + 0x38460]
xor ebp, dword [r13 + rax*4 + 0x37c60]
mov rax, r8
sar r8, 0x18
xor ebp, dword [r15 - 0x20]
sar rax, 0x10
movzx edx, al
mov rax, r9
sar r9, 0x10
mov r14d, dword [r13 + rdx*4 + 0x38460]
sar rax, 8
movzx ecx, al
mov rax, r11
xor r14d, dword [r13 + rcx*4 + 0x38060]
sar rax, 0x18
movzx ecx, al
movzx eax, r10b
sar r10, 8
xor r14d, dword [r13 + rcx*4 + 0x38860]
movzx ecx, r8b
xor r14d, dword [r13 + rax*4 + 0x37c60]
mov ebx, dword [r13 + rcx*4 + 0x38860]
movzx eax, r9b
xor ebx, dword [r13 + rax*4 + 0x38460]
xor r14d, dword [r15 - 0x1c]
movzx eax, r10b
xor ebx, dword [r13 + rax*4 + 0x38060]
movzx eax, r11b
xor ebx, dword [r13 + rax*4 + 0x37c60]
xor ebx, dword [r15 - 0x28]
dec r12
jne 0x180001130
mov r13, qword [rsp + 0x40]
mov r12, qword [rsp + 0x10]
lea r15, [0x180000000]
movsxd r10, dword [rdi + 0x3d4]
movsxd r11, ebp
movsxd r9, r14d
shl r10, 5
add r10, rdi
movsxd rdi, ebx
movsxd rbx, esi
mov r8d, dword [r10 + 0xc]
mov rax, rdi
sar rax, 0x18
mov ecx, r8d
movzx edx, al
sar ecx, 0x18
movzx eax, byte [rdx + r15 + 0x38d60]
xor al, cl
mov ecx, r8d
mov byte [r13], al
sar ecx, 0x10
mov rax, rbx
sar rax, 0x10
movzx edx, al
movzx eax, byte [rdx + r15 + 0x38d60]
xor al, cl
mov ecx, r8d
mov byte [r13 + 1], al
sar ecx, 8
mov rax, r11
sar rax, 8
movzx edx, al
movzx eax, byte [rdx + r15 + 0x38d60]
xor al, cl
mov byte [r13 + 2], al
movzx eax, r9b
movzx eax, byte [rax + r15 + 0x38d60]
xor al, r8b
mov byte [r13 + 3], al
mov r8d, dword [r10 + 0x10]
mov rax, rbx
sar rax, 0x18
mov ecx, r8d
movzx edx, al
sar ecx, 0x18
movzx eax, byte [rdx + r15 + 0x38d60]
xor al, cl
mov ecx, r8d
mov byte [r13 + 4], al
sar ecx, 0x10
mov rax, r11
sar rax, 0x10
movzx edx, al
movzx eax, byte [rdx + r15 + 0x38d60]
xor al, cl
mov ecx, r8d
mov byte [r13 + 5], al
sar ecx, 8
mov rax, r9
sar rax, 8
movzx edx, al
movzx eax, byte [rdx + r15 + 0x38d60]
xor al, cl
mov byte [r13 + 6], al
movzx eax, dil
movzx eax, byte [rax + r15 + 0x38d60]
xor al, r8b
mov byte [r13 + 7], al
mov r8d, dword [r10 + 0x14]
mov rax, r11
sar rax, 0x18
mov ecx, r8d
movzx edx, al
sar ecx, 0x18
movzx eax, byte [rdx + r15 + 0x38d60]
xor al, cl
mov ecx, r8d
mov byte [r13 + 8], al
mov rax, r9
sar ecx, 0x10
sar rax, 0x10
movzx edx, al
movzx eax, byte [rdx + r15 + 0x38d60]
xor al, cl
mov r14, qword [rsp + 8]
mov rsi, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x38]
mov byte [r13 + 9], al
mov rax, rdi
sar r9, 0x18
sar rax, 8
mov ecx, r8d
sar rdi, 0x10
movzx edx, al
sar ecx, 8
movzx eax, byte [rdx + r15 + 0x38d60]
xor al, cl
mov byte [r13 + 0xa], al
movzx eax, bl
sar rbx, 8
movzx eax, byte [rax + r15 + 0x38d60]
xor al, r8b
mov byte [r13 + 0xb], al
mov edx, dword [r10 + 0x18]
movzx eax, r9b
movzx eax, byte [rax + r15 + 0x38d60]
mov ecx, edx
sar ecx, 0x18
xor al, cl
mov ecx, edx
mov byte [r13 + 0xc], al
sar ecx, 0x10
movzx eax, dil
movzx eax, byte [rax + r15 + 0x38d60]
xor al, cl
mov ecx, edx
mov byte [r13 + 0xd], al
movzx eax, bl
mov rbx, qword [rsp + 0x30]
movzx eax, byte [rax + r15 + 0x38d60]
sar ecx, 8
xor al, cl
mov byte [r13 + 0xe], al
movzx eax, r11b
movzx eax, byte [rax + r15 + 0x38d60]
mov r15, qword [rsp]
xor al, dl
mov byte [r13 + 0xf], al
add rsp, 0x18
pop r13
pop rdi
ret
mov qword [rsp + 0x18], r8
push rbx
sub rsp, 0x60
cmp byte [rcx + 8], 0
mov r11, r8
mov r9, rdx
mov rbx, rcx
je 0x180001c28
mov eax, dword [rcx + 0x3d0]
cmp eax, 0x10
jne 0x180001902
add rsp, 0x60
pop rbx
jmp 0x180001040
mov qword [rsp + 0x78], rbp
mov qword [rsp + 0x58], rsi
cdq
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], r12
and edx, 3
add eax, edx
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r14
sar eax, 2
mov qword [rsp + 0x30], r15
movsxd rsi, eax
xor eax, eax
cmp esi, 4
je 0x180001940
cmp esi, 6
setne al
inc eax
lea rcx, [0x180000000]
cdqe
lea r15, [rbx + 0x458]
shl rax, 5
mov rdx, r15
mov rbp, rsi
mov r14d, dword [rax + rcx + 0x35be8]
mov edi, dword [rax + rcx + 0x35bf0]
mov r13d, dword [rax + rcx + 0x35bf8]
mov dword [rsp + 0x24], r14d
mov dword [rsp + 0x88], edi
mov dword [rsp + 0x20], r13d
test esi, esi
jle 0x1800019d2
lea r8, [rbx + 0xc]
mov r10, rsi
nop dword [rax]
movzx eax, byte [r9]
mov rcx, rdx
add rdx, 4
shl eax, 0x18
lea r9, [r9 + 4]
lea r8, [r8 + 4]
mov dword [rdx - 4], eax
movzx eax, byte [r9 - 3]
shl eax, 0x10
or dword [rdx - 4], eax
movzx eax, byte [r9 - 2]
shl eax, 8
or dword [rdx - 4], eax
movzx eax, byte [r9 - 1]
or dword [rdx - 4], eax
mov eax, dword [r8 - 4]
xor dword [rcx], eax
dec r10
jne 0x180001990
mov r12d, 1
mov dword [rsp + 0x70], r12d
cmp dword [rbx + 0x3d4], r12d
jle 0x180001b26
lea eax, [rsi*4]
lea rcx, [rbx + 0x438]
mov edi, 0x40c
cdqe
lea r13, [rbx + 0x2c]
mov qword [rsp + 0x28], rax
nop dword [rax + rax]
test rbp, rbp
jle 0x180001adb
mov r10d, dword [rsp + 0x88]
mov r11d, dword [rsp + 0x20]
mov ebp, r14d
sub r10d, r14d
sub r11d, r14d
mov r15, r13
mov r14, rsi
lea r12, [0x180000000]
nop dword [rax]
lea eax, [r10 + rbp]
lea r15, [r15 + 4]
cdq
idiv esi
movsxd rax, edx
mov ecx, dword [rbx + rax*4 + 0x458]
lea eax, [r11 + rbp]
cdq
sar rcx, 8
movzx r8d, cl
idiv esi
mov r9d, dword [r12 + r8*4 + 0x38060]
movsxd rax, edx
movzx ecx, byte [rbx + rax*4 + 0x458]
mov eax, ebp
inc ebp
xor r9d, dword [r12 + rcx*4 + 0x37c60]
cdq
idiv esi
movsxd rax, edx
mov ecx, dword [rbx + rax*4 + 0x458]
sar rcx, 0x10
movzx eax, cl
xor r9d, dword [r12 + rax*4 + 0x38460]
movzx eax, byte [r15 + rdi + 0x1f]
xor r9d, dword [r12 + rax*4 + 0x38860]
xor r9d, dword [r15 - 4]
mov dword [r15 + rdi - 4], r9d
dec r14
jne 0x180001a40
mov r14d, dword [rsp + 0x24]
mov r12d, dword [rsp + 0x70]
mov rax, qword [rsp + 0x28]
mov rbp, rsi
lea r15, [rbx + 0x458]
lea rcx, [rbx + 0x438]
mov rdx, rcx
mov r8, rax
mov rcx, r15
call fcn.1800162a0
mov rax, qword [rsp + 0x28]
inc r12d
add r13, 0x20
sub rdi, 0x20
mov dword [rsp + 0x70], r12d
lea rcx, [rbx + 0x438]
cmp r12d, dword [rbx + 0x3d4]
jl 0x180001a10
mov r11, qword [rsp + 0x80]
mov edi, dword [rsp + 0x88]
mov r13d, dword [rsp + 0x20]
mov r12, qword [rsp + 0x48]
test rbp, rbp
jle 0x180001c0a
sub r14d, edi
sub r13d, edi
lea r10, [0x180000000]
xor r9d, r9d
nop word [rax + rax]
movsxd rax, dword [rbx + 0x3d4]
lea r11, [r11 + 4]
lea r15, [r15 + 4]
lea rcx, [r9 + rax*8]
movzx eax, byte [r15 - 1]
inc r9
movzx eax, byte [rax + r10 + 0x38d60]
mov r8d, dword [rbx + rcx*4 + 0xc]
mov ecx, r8d
sar ecx, 0x18
xor al, cl
mov byte [r11 - 4], al
lea eax, [r14 + rdi]
cdq
idiv esi
movsxd rax, edx
mov ecx, dword [rbx + rax*4 + 0x458]
sar rcx, 0x10
movzx eax, cl
mov ecx, r8d
movzx eax, byte [rax + r10 + 0x38d60]
sar ecx, 0x10
xor al, cl
mov byte [r11 - 3], al
mov eax, edi
cdq
idiv esi
movsxd rax, edx
mov ecx, dword [rbx + rax*4 + 0x458]
sar rcx, 8
movzx eax, cl
mov ecx, r8d
movzx eax, byte [rax + r10 + 0x38d60]
sar ecx, 8
xor al, cl
mov byte [r11 - 2], al
lea eax, [rdi + r13]
inc edi
cdq
idiv esi
movsxd rax, edx
movzx ecx, byte [rbx + rax*4 + 0x458]
movzx eax, byte [rcx + r10 + 0x38d60]
xor al, r8b
mov byte [r11 - 1], al
cmp r9, rbp
jl 0x180001b50
mov r14, qword [rsp + 0x38]
mov r13, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x78]
mov r15, qword [rsp + 0x30]
add rsp, 0x60
pop rbx
ret