Function at 0x18009cd70
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r9
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
mov eax, 0x30
call fcn.1800470d0
sub rsp, rax
cmp dword [rbp + 0x58], 0
mov rsi, rdx
mov r12, rcx
je 0x18009d031
mov r15, qword [rbp + 0x50]
mov r14, qword [rbp + 0x48]
lea edi, [r8 - 8]
movzx eax, byte [r15 + 1]
movzx r11d, byte [r15]
movzx r9d, byte [r15 + 4]
movzx ecx, byte [r15 + 7]
shl eax, 8
or r11d, eax
movzx eax, byte [r15 + 2]
shl ecx, 8
shl eax, 0x10
or r11d, eax
movzx eax, byte [r15 + 3]
shl eax, 0x18
or r11d, eax
movzx eax, byte [r15 + 5]
shl eax, 8
or r9d, eax
movzx eax, byte [r15 + 6]
or ecx, eax
shl ecx, 0x10
or r9d, ecx
test edi, edi
js 0x18009cee8
lea r13d, [rdi + 8]
shr r13, 3
mov eax, r13d
neg eax
lea edi, [rdi + rax*8]
nop dword [rax + rax]
movzx edx, byte [r12]
movzx eax, byte [r12 + 1]
movzx ecx, byte [r12 + 4]
shl eax, 8
mov r8d, 1
add r12, 8
or edx, eax
movzx eax, byte [r12 - 6]
shl eax, 0x10
or edx, eax
movzx eax, byte [r12 - 5]
shl eax, 0x18
or edx, eax
movzx eax, byte [r12 - 3]
shl eax, 8
xor edx, r11d
or ecx, eax
movzx eax, byte [r12 - 2]
mov dword [rbp - 0x10], edx
shl eax, 0x10
mov rdx, r14
or ecx, eax
movzx eax, byte [r12 - 1]
shl eax, 0x18
or ecx, eax
xor ecx, r9d
mov dword [rbp - 0xc], ecx
lea rcx, [rbp - 0x10]
call fcn.18009bfc0
mov r11d, dword [rbp - 0x10]
mov r9d, dword [rbp - 0xc]
movzx eax, r11b
add rsi, 8
mov byte [rsi - 8], al
mov eax, r11d
shr eax, 8
mov byte [rsi - 7], al
mov eax, r11d
shr eax, 0x10
mov byte [rsi - 6], al
mov eax, r11d
shr eax, 0x18
mov byte [rsi - 5], al
movzx eax, r9b
mov byte [rsi - 4], al
mov eax, r9d
shr eax, 8
mov byte [rsi - 3], al
mov eax, r9d
shr eax, 0x10
mov byte [rsi - 2], al
mov eax, r9d
shr eax, 0x18
dec r13
mov byte [rsi - 1], al
jne 0x18009ce20
cmp edi, 0xfffffff8
je 0x18009cfed
xor edx, edx
lea ecx, [rdi + 8]
movsxd rax, ecx
mov r8d, edx
add r12, rax
dec ecx
cmp ecx, 7
ja case.default.0x18009cf1a
movsxd rax, ecx
lea rcx, [0x180000000]
mov eax, dword [rcx + rax*4 + 0x9d2bc]
add rax, rcx
jmp rax
movzx edx, byte [r12 - 1]
dec r12
shl edx, 0x18
movzx eax, byte [r12 - 1]
dec r12
shl eax, 0x10
or edx, eax
movzx eax, byte [r12 - 1]
dec r12
shl eax, 8
or edx, eax
movzx eax, byte [r12 - 1]
dec r12
or edx, eax
movzx r8d, byte [r12 - 1]
dec r12
shl r8d, 0x18
movzx eax, byte [r12 - 1]
dec r12
shl eax, 0x10
or r8d, eax
movzx eax, byte [r12 - 1]
dec r12
shl eax, 8
or r8d, eax
movzx eax, byte [r12 - 1]
or r8d, eax
xor r8d, r11d
xor edx, r9d
lea rcx, [rbp - 0x10]
mov dword [rbp - 0x10], r8d
mov dword [rbp - 0xc], edx
mov r8d, 1
mov rdx, r14
call fcn.18009bfc0
mov r11d, dword [rbp - 0x10]
mov r9d, dword [rbp - 0xc]
movzx eax, r11b
mov byte [rsi], al
mov eax, r11d
shr eax, 8
mov byte [rsi + 1], al
mov eax, r11d
shr eax, 0x10
mov byte [rsi + 2], al
mov eax, r11d
shr eax, 0x18
mov byte [rsi + 3], al
movzx eax, r9b
mov byte [rsi + 4], al
mov eax, r9d
shr eax, 8
mov byte [rsi + 5], al
mov eax, r9d
shr eax, 0x10
mov byte [rsi + 6], al
mov eax, r9d
shr eax, 0x18
mov byte [rsi + 7], al
mov byte [r15], r11b
mov eax, r11d
shr eax, 8
mov byte [r15 + 1], al
mov eax, r11d
shr r11d, 0x18
shr eax, 0x10
mov byte [r15 + 2], al
mov byte [r15 + 3], r11b
mov byte [r15 + 4], r9b
mov eax, r9d
shr eax, 8
mov byte [r15 + 5], al
mov eax, r9d
shr eax, 0x10
shr r9d, 0x18
mov byte [r15 + 6], al
mov byte [r15 + 7], r9b
jmp 0x18009d29c
mov rax, qword [rbp + 0x50]
lea ebx, [r8 - 8]
movzx r13d, byte [rax]
movzx r14d, byte [rax + 4]
movzx ecx, byte [rax + 7]
lea r15, [rax + 1]
shl ecx, 8
movzx eax, byte [r15]
mov qword [rbp - 8], r15
shl eax, 8
or r13d, eax
movzx eax, byte [r15 + 1]
shl eax, 0x10
or r13d, eax
movzx eax, byte [r15 + 2]
shl eax, 0x18
or r13d, eax
movzx eax, byte [r15 + 4]
shl eax, 8
or r14d, eax
movzx eax, byte [r15 + 5]
or ecx, eax
shl ecx, 0x10
or r14d, ecx
test ebx, ebx
js 0x18009d16b
lea r15d, [rbx + 8]
shr r15, 3
mov eax, r15d
neg eax
lea ebx, [rbx + rax*8]
mov dword [rbp + 0x58], ebx
movzx eax, byte [r12 + 1]
movzx edi, byte [r12]
movzx ebx, byte [r12 + 4]
shl eax, 8
lea rcx, [rbp - 0x10]
xor r8d, r8d
or edi, eax
movzx eax, byte [r12 + 2]
mov rdx, r9
shl eax, 0x10
add r12, 8
or edi, eax
movzx eax, byte [r12 - 5]
shl eax, 0x18
or edi, eax
movzx eax, byte [r12 - 3]
shl eax, 8
mov dword [rbp - 0x10], edi
or ebx, eax
movzx eax, byte [r12 - 2]
shl eax, 0x10
or ebx, eax
movzx eax, byte [r12 - 1]
shl eax, 0x18
or ebx, eax
mov dword [rbp - 0xc], ebx
call fcn.18009bfc0
xor r13d, dword [rbp - 0x10]
xor r14d, dword [rbp - 0xc]
mov r9, qword [rbp + 0x48]
mov byte [rsi], r13b
mov eax, r13d
add rsi, 8
shr eax, 8
mov byte [rsi - 7], al
mov eax, r13d
shr r13d, 0x18
shr eax, 0x10
mov byte [rsi - 6], al
mov byte [rsi - 5], r13b
mov byte [rsi - 4], r14b
mov eax, r14d
mov r13d, edi
shr eax, 8
mov byte [rsi - 3], al
mov eax, r14d
shr r14d, 0x18
shr eax, 0x10
dec r15
mov byte [rsi - 2], al
mov byte [rsi - 1], r14b
mov r14d, ebx
jne 0x18009d0a4
mov r15, qword [rbp - 8]
mov ebx, dword [rbp + 0x58]
cmp ebx, 0xfffffff8
je 0x18009d25a
movzx eax, byte [r12 + 1]
movzx edx, byte [r12 + 4]
movzx edi, byte [r12]
movzx ecx, byte [r12 + 7]
shl eax, 8
xor r8d, r8d
or edi, eax
movzx eax, byte [r12 + 2]
shl ecx, 8
shl eax, 0x10
or edi, eax
movzx eax, byte [r12 + 3]
shl eax, 0x18
or edi, eax
movzx eax, byte [r12 + 5]
shl eax, 8
mov dword [rbp - 0x10], edi
or edx, eax
movzx eax, byte [r12 + 6]
or ecx, eax
shl ecx, 0x10
or edx, ecx
lea rcx, [rbp - 0x10]
mov dword [rbp + 0x58], edx
mov dword [rbp - 0xc], edx
mov rdx, r9
call fcn.18009bfc0
xor r13d, dword [rbp - 0x10]
xor r14d, dword [rbp - 0xc]
lea ecx, [rbx + 8]
movsxd rax, ecx
add rsi, rax
dec ecx
cmp ecx, 7
ja case.default.0x18009d205
movsxd rax, ecx
lea rcx, [0x180000000]
mov eax, dword [rcx + rax*4 + 0x9d2dc]
add rax, rcx
jmp rax
dec rsi
mov eax, r14d
shr eax, 0x18
mov byte [rsi], al
dec rsi
mov eax, r14d
shr eax, 0x10
mov byte [rsi], al
dec rsi
mov eax, r14d
shr eax, 8
mov byte [rsi], al
dec rsi
mov byte [rsi], r14b
dec rsi
mov eax, r13d
shr eax, 0x18
mov byte [rsi], al
dec rsi
mov eax, r13d
shr eax, 0x10
mov byte [rsi], al
dec rsi
mov eax, r13d
shr eax, 8
mov byte [rsi], al
mov byte [rsi - 1], r13b
mov r14d, dword [rbp + 0x58]
mov r13d, edi
mov rax, qword [rbp + 0x50]
mov byte [rax], r13b
mov eax, r13d
shr eax, 8
mov byte [r15], al
mov eax, r13d
shr r13d, 0x18
shr eax, 0x10
mov byte [r15 + 1], al
mov byte [r15 + 2], r13b
mov byte [r15 + 3], r14b
mov eax, r14d
shr eax, 8
mov byte [r15 + 4], al
mov eax, r14d
shr eax, 0x10
shr r14d, 0x18
mov byte [r15 + 5], al
mov byte [r15 + 6], r14b
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rbp
ret