Function at 0x18005fed4
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 - 0xd8]
sub rsp, 0x1d8
mov rax, qword [0x18015e880]
xor rax, rsp
mov qword [rbp + 0xc0], rax
mov r10, qword [rcx + 8]
mov rdi, rcx
mov r15, qword [rcx + 0x38]
mov r13d, edx
mov r11d, dword [rcx + 0x34]
sub r13d, r10d
mov qword [rbp - 0x80], rdx
mov eax, r13d
mov ebx, dword [rdi + 0x1c]
mov rsi, qword [rdi + 0x60]
mov qword [rbp - 0x60], r9
mov r9, rdx
mov qword [rbp - 0x78], r8
mov edx, 1
mov r8, qword [rcx + 0x70]
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 + 0x70], r8
mov qword [rsp + 0x78], r15
cmova ebx, eax
mov dword [rsp + 0x58], r11d
mov eax, dword [rdi + 0x10c]
xor r14d, r14d
cmp dword [rdi + 0x28], r14d
mov qword [rsp + 0x48], r10
cmovne ebx, dword [rdi + 0x1c]
lea ecx, [r14 + 5]
mov dword [rsp + 0x3c], ebx
cmp eax, ecx
mov dword [rsp + 0x30], r13d
lea ebx, [r14 + 3]
mov qword [rbp - 0x58], rsi
cmovb ecx, eax
mov qword [rsp + 0x50], rbx
lea eax, [r14 + 1]
shl eax, cl
mov dword [rsp + 0x38], eax
cmp dword [rdi + 0x12c], r14d
jne 0x1800602f1
mov esi, dword [rdi + 0x2c]
lea r12d, [r14 + 0x18]
mov eax, r13d
mov qword [rsp + 0x20], r8
sub eax, esi
mov qword [rsp + 0x40], r15
lea r15d, [r14 + 4]
mov r8d, r11d
cmp eax, 0x180
jbe 0x1800601a3
lea eax, [rsi + 0x60]
mov dword [rsp + 0x34], eax
cmp esi, eax
jae 0x1800600bd
mov r14, qword [rsp + 0x70]
mov eax, r12d
mov r12d, dword [rsp + 0x34]
sub eax, r11d
mov qword [rsp + 0x28], rax
mov r11d, esi
mov qword [rsp + 0x20], rsi
mov r13, r10
mov rbx, qword [rdi + 0x60]
lea rdx, [r13 + 8]
add rdx, r11
lea rcx, [rsp + 0x34]
mov r8, r15
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rsp + 0x34], 0x9e3779b1
mov r9d, 0x1fffffe0
mov rcx, qword [rsp + 0x28]
mov eax, ebx
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 3
and eax, r9d
prefetcht0 byte [r14 + rax*4]
prefetcht0 byte [r14 + rax*4 + 0x40]
mov r8, qword [rsp + 0x78]
prefetcht0 byte [rax + r8]
mov r11, qword [rsp + 0x20]
mov rax, r11
and eax, 7
mov r10d, dword [rdi + rax*4 + 0x40]
mov dword [rdi + rax*4 + 0x40], edx
mov eax, r10d
shr eax, 3
and r9d, eax
add r8, r9
movzx edx, byte [r8]
dec edx
and edx, 0x1f
mov eax, edx
neg eax
sbb ecx, ecx
inc r11
not ecx
mov qword [rsp + 0x20], r11
and ecx, 0x1f
add edx, ecx
mov byte [r8], dl
mov eax, edx
add rax, r9
mov byte [r8 + rdx], r10b
mov dword [r14 + rax*4], esi
inc esi
cmp esi, r12d
jb 0x18005ffff
mov r13d, dword [rsp + 0x30]
xor r14d, r14d
mov r9, qword [rbp - 0x80]
mov r10, qword [rsp + 0x48]
lea r12d, [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 + 0x20], r9
mov r9, qword [rdi + 0x38]
sub edx, r10d
inc edx
mov qword [rsp + 0x40], 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 0x1800601a3
mov r13, qword [rsp + 0x20]
mov eax, r12d
sub eax, r8d
mov r12d, esi
mov qword [rsp + 0x28], rax
mov r14, r9
mov eax, edx
mov qword [rsp + 0x60], rax
mov rbx, qword [rdi + 0x60]
lea rdx, [r10 + r12]
mov r8, r15
lea rcx, [rsp + 0x68]
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rsp + 0x68], 0x9e3779b1
mov rcx, qword [rsp + 0x28]
mov eax, ebx
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 3
and eax, 0x1fffffe0
prefetcht0 byte [r13 + rax*4]
prefetcht0 byte [r13 + rax*4 + 0x40]
prefetcht0 byte [rax + r14]
mov r10, qword [rsp + 0x48]
mov rax, r12
and eax, 7
inc r12
sub qword [rsp + 0x60], 1
mov dword [rdi + rax*4 + 0x40], edx
jne 0x180060122
mov rax, qword [rdi + 0x70]
xor r14d, r14d
mov r8d, dword [rdi + 0x34]
mov r13d, dword [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov rax, qword [rdi + 0x38]
lea r12d, [r14 + 0x18]
mov qword [rsp + 0x40], rax
mov rcx, qword [rdi + 8]
mov qword [rbp - 0x68], rcx
cmp esi, r13d
jae 0x180060282
mov r14, qword [rsp + 0x20]
mov eax, r12d
mov r12, qword [rsp + 0x40]
sub eax, r8d
mov r11d, esi
mov qword [rbp - 0x70], rax
mov qword [rsp + 0x28], r11
mov rbx, qword [rdi + 0x60]
lea rdx, [r11 + 8]
add rdx, rcx
mov r8, r15
lea rcx, [rsp + 0x60]
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rsp + 0x60], 0x9e3779b1
mov r8d, 0x1fffffe0
mov rcx, qword [rbp - 0x70]
mov eax, ebx
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 3
and eax, r8d
prefetcht0 byte [r14 + rax*4]
prefetcht0 byte [r14 + rax*4 + 0x40]
prefetcht0 byte [r12 + rax]
mov r11, qword [rsp + 0x28]
mov rax, r11
and eax, 7
mov r10d, dword [rdi + rax*4 + 0x40]
mov dword [rdi + rax*4 + 0x40], edx
mov eax, r10d
shr eax, 3
and eax, r8d
mov r9d, eax
lea r8, [r12 + rax]
movzx edx, byte [r8]
dec edx
and edx, 0x1f
mov eax, edx
neg eax
sbb ecx, ecx
inc r11
not ecx
mov qword [rsp + 0x28], r11
and ecx, 0x1f
add edx, ecx
mov rcx, qword [rbp - 0x68]
mov byte [r8], dl
mov eax, edx
add rax, r9
mov byte [r8 + rdx], r10b
mov dword [r14 + rax*4], esi
inc esi
cmp esi, r13d
jb 0x1800601d0
xor r14d, r14d
lea r12d, [r14 + 0x18]
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x40]
add rdx, 8
mov ebx, r13d
add rdx, rbx
mov dword [rdi + 0x2c], r13d
mov r8, r15
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rsp + 0x40], 0x9e3779b1
mov ecx, r12d
mov eax, dword [rbp - 0x58]
sub ecx, dword [rsp + 0x58]
mov r8, qword [rsp + 0x70]
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 3
and eax, 0x1fffffe0
prefetcht0 byte [r8 + rax*4]
prefetcht0 byte [r8 + rax*4 + 0x40]
mov r10, qword [rsp + 0x78]
prefetcht0 byte [rax + r10]
and ebx, 7
mov r9d, dword [rdi + rbx*4 + 0x40]
mov dword [rdi + rbx*4 + 0x40], edx
mov rbx, qword [rsp + 0x50]
jmp 0x18006032e
mov r15d, 4
lea rcx, [rsp + 0x20]
mov r8d, r15d
mov rdx, r9
call sub.VCRUNTIME140.dll_memcpy
imul r9d, dword [rsp + 0x20], 0x9e3779b1
lea ecx, [r15 + 0x14]
sub ecx, dword [rsp + 0x58]
mov r8, qword [rsp + 0x70]
mov r10, qword [rsp + 0x78]
mov eax, esi
xor r9, rax
mov dword [rdi + 0x2c], r13d
shr r9, cl
add dword [rdi + 0x68], r9d
mov eax, r9d
shr eax, 3
xorps xmm0, xmm0
and eax, 0x1fffffe0
mov rsi, r14
movups xmmword [rbp - 0x58], xmm0
lea rcx, [r8 + rax*4]
lea r11, [rax + r10]
mov qword [rsp + 0x28], rcx
movzx r12d, byte [r11]
mov rcx, r14
movsx eax, r9b
mov rdx, r11
movd xmm1, eax
punpcklbw xmm1, xmm1
punpcklwd xmm1, xmm1
pshufd xmm1, xmm1, 0
movdqu xmm0, xmmword [rdx]
lea rdx, [rdx + 0x10]
pcmpeqb xmm0, xmm1
pmovmskb eax, xmm0
mov dword [rbp + rcx*4 - 0x58], eax
inc rcx
cmp rcx, 2
jl 0x180060373
mov r8d, dword [rbp - 0x54]
mov edx, r12d
and edx, 0x1f
shl r8d, 0x10
or r8d, dword [rbp - 0x58]
mov ecx, edx
neg ecx
mov eax, r8d
and ecx, 0x1f
mov r10d, r8d
mov r8, qword [rsp + 0x28]
shl r10d, cl
mov ecx, edx
shr rax, cl
or r10, rax
jbe 0x180060409
mov rdx, qword [rsp + 0x48]
mov r13d, dword [rsp + 0x38]
mov ebx, dword [rsp + 0x3c]
test r13d, r13d
je 0x1800603ff
bsf rcx, r10
add ecx, r12d
and ecx, 0x1f
mov ecx, dword [r8 + rcx*4]
je 0x1800603f6
cmp ecx, ebx
jb 0x1800603ff
prefetcht0 byte [rcx + rdx]
mov dword [rbp + rsi*4 - 0x40], ecx
inc rsi
dec r13d
lea rax, [r10 - 1]
and r10, rax
ja 0x1800603cf
mov r13d, dword [rsp + 0x30]
mov rbx, qword [rsp + 0x50]
lea edx, [r12 - 1]
and edx, 0x1f
mov eax, edx
neg eax
sbb ecx, ecx
not ecx
and ecx, 0x1f
add edx, ecx
mov byte [r11], dl
mov byte [rdx + r11], r9b
mov eax, dword [rdi + 0x2c]
mov dword [r8 + rdx*4], eax
inc dword [rdi + 0x2c]
test rsi, rsi
je 0x1800604cd
mov r12, qword [rbp - 0x80]
mov edi, dword [rbp + r14*4 - 0x40]
lea rdx, [rbx - 3]
add rdi, qword [rsp + 0x48]
lea rcx, [rsp + 0x3c]
add rdx, rdi
mov r8, r15
call sub.VCRUNTIME140.dll_memcpy
mov rdx, qword [rsp + 0x50]
lea rcx, [rsp + 0x38]
mov ebx, dword [rsp + 0x3c]
add rdx, 0xfffffffffffffffd
add rdx, r12
mov r8, r15
call sub.VCRUNTIME140.dll_memcpy
cmp ebx, dword [rsp + 0x38]
jne 0x1800604bc
mov r8, qword [rbp - 0x78]
mov rdx, rdi
mov rcx, r12
call fcn.18003ab40
mov rbx, qword [rsp + 0x50]
cmp rax, rbx
jbe 0x1800604c1
mov rdx, qword [rbp - 0x60]
mov ecx, r13d
sub ecx, dword [rbp + r14*4 - 0x40]
mov rbx, rax
add ecx, 3
mov qword [rsp + 0x50], rax
mov qword [rdx], rcx
lea rcx, [rax + r12]
cmp rcx, qword [rbp - 0x78]
je 0x1800604cd
jmp 0x1800604c1
mov rbx, qword [rsp + 0x50]
inc r14
cmp r14, rsi
jb 0x18006043c
mov rax, rbx
mov rcx, qword [rbp + 0xc0]
xor rcx, rsp
call fcn.1801241e0
add rsp, 0x1d8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret