Function at 0x18005f920
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xb8]
sub rsp, 0x1b8
mov rax, qword [0x18015e880]
xor rax, rsp
mov qword [rbp + 0xa0], rax
mov r10, qword [rcx + 8]
mov rdi, rcx
mov r11, qword [rcx + 0x70]
mov r13d, edx
mov ebx, dword [rcx + 0x34]
sub r13d, r10d
mov qword [rbp - 0x80], rdx
mov eax, r13d
mov esi, dword [rdi + 0x1c]
mov qword [rbp - 0x68], r9
mov r9, rdx
mov edx, 1
mov qword [rbp - 0x70], r8
mov r8, qword [rcx + 0x38]
mov ecx, dword [rcx + 0x100]
shl edx, cl
mov ecx, r13d
sub ecx, dword [rdi + 0x1c]
sub eax, edx
cmp ecx, edx
mov qword [rsp + 0x68], r11
mov qword [rsp + 0x70], r8
cmova esi, eax
mov dword [rsp + 0x28], ebx
mov eax, dword [rdi + 0x10c]
xor r14d, r14d
cmp dword [rdi + 0x28], r14d
mov qword [rsp + 0x40], r10
cmovne esi, dword [rdi + 0x1c]
lea edx, [r14 + 4]
mov dword [rsp + 0x30], esi
mov rsi, qword [rdi + 0x60]
lea r12d, [r14 + 3]
cmp eax, edx
mov dword [rsp + 0x20], r13d
mov ecx, edx
mov qword [rbp - 0x78], rsi
cmovb ecx, eax
mov qword [rsp + 0x58], r12
lea eax, [rdx - 3]
shl eax, cl
mov dword [rsp + 0x2c], eax
cmp dword [rdi + 0x12c], r14d
jne 0x18005fd1b
mov esi, dword [rdi + 0x2c]
lea r15d, [r14 + 0x18]
mov eax, r13d
mov qword [rsp + 0x50], r8
sub eax, esi
mov qword [rsp + 0x38], r11
mov r8d, ebx
cmp eax, 0x180
jbe 0x18005fbe2
lea eax, [rsi + 0x60]
mov dword [rsp + 0x24], eax
cmp esi, eax
jae 0x18005fafb
mov r13d, dword [rsp + 0x24]
mov eax, r15d
sub eax, ebx
mov r14d, esi
mov qword [rsp + 0x48], rax
mov r15d, eax
mov r12, r10
mov rbx, qword [rdi + 0x60]
lea rdx, [r12 + 8]
add rdx, r14
lea rcx, [rsp + 0x24]
mov r8d, 4
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rsp + 0x24], 0x9e3779b1
mov rcx, r15
mov r11, qword [rsp + 0x68]
mov r8d, 0xffffff0
mov eax, ebx
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 4
and eax, r8d
prefetcht0 byte [r11 + rax*4]
mov rcx, qword [rsp + 0x70]
prefetcht0 byte [rax + rcx]
mov rax, r14
and eax, 7
mov r10d, dword [rdi + rax*4 + 0x40]
mov dword [rdi + rax*4 + 0x40], edx
mov eax, r10d
shr eax, 4
and eax, r8d
mov r9d, eax
lea r8, [rax + rcx]
movzx edx, byte [r8]
dec edx
and edx, 0xf
mov eax, edx
neg eax
sbb ecx, ecx
inc r14
not ecx
and ecx, 0xf
add edx, ecx
mov byte [r8], dl
mov eax, edx
add rax, r9
mov byte [rdx + r8], r10b
mov dword [r11 + rax*4], esi
inc esi
cmp esi, r13d
jb 0x18005fa3e
mov r13d, dword [rsp + 0x20]
xor r14d, r14d
mov r12, qword [rsp + 0x58]
mov r9, qword [rbp - 0x80]
mov r10, qword [rsp + 0x40]
lea r15d, [r14 + 0x18]
mov r8d, dword [rdi + 0x34]
lea rcx, [r9 + 1]
mov r9, qword [rdi + 0x70]
lea esi, [r13 - 0x20]
mov edx, ecx
mov eax, esi
sub edx, esi
mov qword [rsp + 0x38], r9
mov r9, qword [rdi + 0x38]
sub edx, r10d
inc edx
mov qword [rsp + 0x50], r9
add rax, r10
cmp rax, rcx
mov eax, 8
cmova edx, r14d
cmp edx, eax
cmova edx, eax
lea eax, [rdx + rsi]
cmp esi, eax
jae 0x18005fbe2
mov r12, qword [rsp + 0x38]
mov eax, r15d
mov r15, qword [rsp + 0x40]
sub eax, r8d
mov qword [rsp + 0x78], rax
mov r13, r9
mov eax, edx
mov qword [rsp + 0x48], rax
mov r14d, esi
mov rbx, qword [rdi + 0x60]
lea rdx, [r15 + r14]
mov r8d, 4
lea rcx, [rsp + 0x60]
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rsp + 0x60], 0x9e3779b1
mov rcx, qword [rsp + 0x78]
mov eax, ebx
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 4
and eax, 0xffffff0
prefetcht0 byte [r12 + rax*4]
prefetcht0 byte [rax + r13]
mov rax, r14
inc r14
and eax, 7
sub qword [rsp + 0x48], 1
mov dword [rdi + rax*4 + 0x40], edx
jne 0x18005fb65
mov rax, qword [rdi + 0x70]
xor r14d, r14d
mov r8d, dword [rdi + 0x34]
mov r13d, dword [rsp + 0x20]
mov r12, qword [rsp + 0x58]
mov qword [rsp + 0x38], rax
lea r15d, [r14 + 0x18]
mov rax, qword [rdi + 0x38]
mov qword [rsp + 0x50], rax
mov rcx, qword [rdi + 8]
mov qword [rsp + 0x48], rcx
cmp esi, r13d
jae 0x18005fcb5
mov r12, qword [rsp + 0x38]
mov eax, r15d
mov r14, qword [rsp + 0x50]
sub eax, r8d
mov qword [rsp + 0x78], rax
mov r15d, esi
mov rbx, qword [rdi + 0x60]
lea rdx, [rcx + 8]
add rdx, r15
lea rcx, [rsp + 0x20]
mov r8d, 4
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rsp + 0x20], 0x9e3779b1
mov rcx, qword [rsp + 0x78]
mov eax, ebx
xor rdx, rax
shr rdx, cl
mov ecx, 0xffffff0
mov eax, edx
shr eax, 4
and eax, ecx
prefetcht0 byte [r12 + rax*4]
prefetcht0 byte [r14 + rax]
mov rax, r15
and eax, 7
mov r10d, dword [rdi + rax*4 + 0x40]
mov dword [rdi + rax*4 + 0x40], edx
mov eax, r10d
shr eax, 4
and eax, ecx
mov r9d, eax
lea r8, [r14 + rax]
movzx edx, byte [r8]
dec edx
and edx, 0xf
mov eax, edx
neg eax
sbb ecx, ecx
inc r15
not ecx
and ecx, 0xf
add edx, ecx
mov rcx, qword [rsp + 0x48]
mov byte [r8], dl
mov eax, edx
add rax, r9
mov byte [r8 + rdx], r10b
mov dword [r12 + rax*4], esi
inc esi
cmp esi, r13d
jb 0x18005fc0c
mov r12, qword [rsp + 0x58]
xor r14d, r14d
lea r15d, [r14 + 0x18]
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x38]
add rdx, 8
mov ebx, r13d
add rdx, rbx
mov dword [rdi + 0x2c], r13d
mov r8d, 4
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rsp + 0x38], 0x9e3779b1
mov ecx, r15d
sub ecx, dword [rsp + 0x28]
mov eax, dword [rbp - 0x78]
xor rdx, rax
shr rdx, cl
mov rcx, qword [rsp + 0x68]
mov eax, edx
shr eax, 4
and eax, 0xffffff0
prefetcht0 byte [rcx + rax*4]
mov r8, qword [rsp + 0x70]
prefetcht0 byte [rax + r8]
and ebx, 7
mov r9d, dword [rdi + rbx*4 + 0x40]
mov dword [rdi + rbx*4 + 0x40], edx
jmp 0x18005fd51
mov r8, rdx
lea rcx, [rsp + 0x28]
mov rdx, r9
call sub.VCRUNTIME140.dll_memcpy
imul r9d, dword [rsp + 0x28], 0x9e3779b1
mov ecx, 0x18
mov r8, qword [rsp + 0x70]
sub ecx, ebx
mov eax, esi
mov dword [rdi + 0x2c], r13d
xor r9, rax
shr r9, cl
mov rcx, qword [rsp + 0x68]
add dword [rdi + 0x68], r9d
mov eax, r9d
shr eax, 4
mov rsi, r14
and eax, 0xffffff0
lea r15, [rcx + rax*4]
lea r11, [rax + r8]
movsx eax, r9b
movzx ebx, byte [r11]
movdqu xmm0, xmmword [r11]
movd xmm1, eax
mov eax, ebx
and eax, 0xf
punpcklbw xmm1, xmm1
mov ecx, eax
punpcklwd xmm1, xmm1
mov edx, eax
pshufd xmm1, xmm1, 0
neg ecx
pcmpeqb xmm0, xmm1
and ecx, 0xf
pmovmskb r8d, xmm0
movzx eax, r8w
shl ax, cl
mov cl, dl
movzx r10d, ax
movzx eax, r8w
shr rax, cl
or r10, rax
jbe 0x18005fdfd
mov rdx, qword [rsp + 0x40]
mov r8d, dword [rsp + 0x2c]
mov r12d, dword [rsp + 0x30]
test r8d, r8d
je 0x18005fdf8
bsf rcx, r10
add ecx, ebx
and ecx, 0xf
mov ecx, dword [r15 + rcx*4]
je 0x18005fdef
cmp ecx, r12d
jb 0x18005fdf8
prefetcht0 byte [rcx + rdx]
mov dword [rbp + rsi*4 - 0x60], ecx
inc rsi
dec r8d
lea rax, [r10 - 1]
and r10, rax
ja 0x18005fdc8
mov r12, qword [rsp + 0x58]
lea edx, [rbx - 1]
and edx, 0xf
mov eax, edx
neg eax
sbb ecx, ecx
not ecx
and ecx, 0xf
add edx, ecx
mov byte [r11], dl
mov byte [rdx + r11], r9b
mov eax, dword [rdi + 0x2c]
mov dword [r15 + rdx*4], eax
inc dword [rdi + 0x2c]
test rsi, rsi
je 0x18005feae
mov r15, qword [rbp - 0x80]
mov edi, dword [rbp + r14*4 - 0x60]
lea rdx, [r12 - 3]
add rdi, qword [rsp + 0x40]
lea rcx, [rsp + 0x30]
add rdx, rdi
mov r8d, 4
call sub.VCRUNTIME140.dll_memcpy
mov ebx, dword [rsp + 0x30]
lea rdx, [r15 - 3]
add rdx, r12
lea rcx, [rsp + 0x2c]
mov r8d, 4
call sub.VCRUNTIME140.dll_memcpy
cmp ebx, dword [rsp + 0x2c]
jne 0x18005fea6
mov rbx, qword [rbp - 0x70]
mov rdx, rdi
mov r8, rbx
mov rcx, r15
call fcn.18003ab40
cmp rax, r12
jbe 0x18005fea6
mov rdx, qword [rbp - 0x68]
mov ecx, r13d
sub ecx, dword [rbp + r14*4 - 0x60]
mov r12, rax
add ecx, 3
mov qword [rdx], rcx
lea rcx, [rax + r15]
cmp rcx, rbx
je 0x18005feae
inc r14
cmp r14, rsi
jb 0x18005fe2e
mov rax, r12
mov rcx, qword [rbp + 0xa0]
xor rcx, rsp
call fcn.1801241e0
add rsp, 0x1b8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret