Function at 0x18005c938
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 - 0x118]
sub rsp, 0x218
mov rax, qword [0x18015e880]
xor rax, rsp
mov qword [rbp + 0x100], rax
mov r11, qword [rcx + 0x38]
mov rdi, rcx
mov r10d, dword [rcx + 0x34]
mov r13, rdx
mov qword [rbp - 0x38], rcx
mov ebx, r13d
mov qword [rbp - 0x20], r9
mov r9, qword [rcx + 8]
mov eax, dword [rdi + 0x18]
sub ebx, r9d
mov r15, qword [rdi + 0x60]
mov dword [rsp + 0x70], eax
mov qword [rbp - 0x80], rdx
lea rdx, [rax + r9]
mov qword [rsp + 0x68], r9
mov r9d, dword [rdi + 0x1c]
mov qword [rbp - 0x30], rdx
mov edx, 1
mov qword [rbp - 0x50], r8
mov r8, qword [rcx + 0x70]
mov rcx, qword [rcx + 0x10]
add rax, rcx
mov qword [rbp - 0x58], rcx
mov ecx, dword [rdi + 0x100]
shl edx, cl
mov ecx, ebx
sub ecx, dword [rdi + 0x1c]
mov qword [rbp - 0x28], rax
mov eax, ebx
sub eax, edx
mov qword [rbp - 0x68], r8
cmp ecx, edx
mov qword [rbp - 0x60], r11
mov dword [rsp + 0x40], r10d
cmova r9d, eax
mov dword [rsp + 0x30], ebx
mov eax, dword [rdi + 0x10c]
xor r14d, r14d
cmp dword [rdi + 0x28], r14d
mov qword [rbp - 0x18], r15
cmovne r9d, dword [rdi + 0x1c]
lea ecx, [r14 + 6]
mov dword [rsp + 0x64], r9d
cmp eax, ecx
mov qword [rsp + 0x78], 3
lea esi, [r14 + 4]
cmovb ecx, eax
lea eax, [r14 + 1]
shl eax, cl
mov dword [rsp + 0x60], eax
cmp dword [rdi + 0x12c], r14d
jne 0x18005cd9f
mov r15d, dword [rdi + 0x2c]
lea r12d, [r14 + 0x18]
mov eax, ebx
mov qword [rsp + 0x38], r8
sub eax, r15d
mov qword [rsp + 0x48], r11
mov r8d, r10d
cmp eax, 0x180
jbe 0x18005cc42
lea eax, [r15 + 0x60]
mov dword [rsp + 0x50], eax
cmp r15d, eax
jae 0x18005cb4c
mov r13, qword [rsp + 0x68]
mov eax, r12d
mov r14d, dword [rsp + 0x50]
sub eax, r10d
mov r12, qword [rbp - 0x68]
mov qword [rsp + 0x48], rax
mov eax, r15d
mov qword [rsp + 0x38], rax
mov rbx, qword [rdi + 0x60]
lea rdx, [r13 + 8]
add rdx, rax
lea rcx, [rsp + 0x50]
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rsp + 0x50], 0x9e3779b1
mov r8d, 0x3fffffc0
mov rcx, qword [rsp + 0x48]
mov eax, ebx
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 2
and eax, r8d
prefetcht0 byte [r12 + rax*4]
prefetcht0 byte [r12 + rax*4 + 0x40]
mov r11, qword [rbp - 0x60]
prefetcht0 byte [rax + r11]
prefetcht0 byte [rax + r11 + 0x20]
mov rax, qword [rsp + 0x38]
and eax, 7
mov r10d, dword [rdi + rax*4 + 0x40]
mov dword [rdi + rax*4 + 0x40], edx
mov eax, r10d
shr eax, 2
and eax, r8d
mov r9d, eax
lea r8, [rax + r11]
movzx edx, byte [r8]
dec edx
and edx, 0x3f
mov eax, edx
neg eax
sbb ecx, ecx
not ecx
and ecx, 0x3f
add edx, ecx
mov byte [r8], dl
mov eax, edx
add rax, r9
mov byte [r8 + rdx], r10b
mov dword [r12 + rax*4], r15d
inc r15d
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
cmp r15d, r14d
jb 0x18005ca88
mov r13, qword [rbp - 0x80]
xor r14d, r14d
mov ebx, dword [rsp + 0x30]
lea r12d, [r14 + 0x18]
mov r9, qword [rdi + 0x70]
lea r15d, [rbx - 0x20]
mov rax, qword [rdi + 0x38]
lea rcx, [r13 + 1]
mov r8d, dword [rdi + 0x34]
mov edx, ecx
sub edx, r15d
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x38], r9
mov r9, qword [rsp + 0x68]
sub edx, r9d
mov eax, r15d
inc edx
add rax, r9
cmp rax, rcx
mov eax, 8
cmova edx, r14d
cmp edx, eax
cmova edx, eax
lea eax, [rdx + r15]
cmp r15d, eax
jae 0x18005cc42
mov r13, qword [rsp + 0x38]
mov eax, r12d
mov r14, qword [rsp + 0x48]
sub eax, r8d
mov qword [rbp - 0x70], rax
mov eax, edx
mov qword [rsp + 0x58], rax
mov r12d, r15d
mov rbx, qword [rdi + 0x60]
lea rdx, [r9 + r12]
mov r8, rsi
lea rcx, [rbp - 0x78]
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rbp - 0x78], 0x9e3779b1
mov rcx, qword [rbp - 0x70]
mov eax, ebx
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 2
and eax, 0x3fffffc0
prefetcht0 byte [r13 + rax*4]
prefetcht0 byte [r13 + rax*4 + 0x40]
prefetcht0 byte [rax + r14]
prefetcht0 byte [rax + r14 + 0x20]
mov r9, qword [rsp + 0x68]
mov rax, r12
and eax, 7
inc r12
sub qword [rsp + 0x58], 1
mov dword [rdi + rax*4 + 0x40], edx
jne 0x18005cbbb
mov rax, qword [rdi + 0x70]
xor r14d, r14d
mov r8d, dword [rdi + 0x34]
mov r13, qword [rbp - 0x80]
mov ebx, dword [rsp + 0x30]
mov qword [rsp + 0x38], rax
lea r12d, [r14 + 0x18]
mov rax, qword [rdi + 0x38]
mov qword [rsp + 0x48], rax
mov rcx, qword [rdi + 8]
mov qword [rbp - 0x40], rcx
cmp r15d, ebx
jae 0x18005cd35
mov r14d, dword [rsp + 0x30]
mov eax, r12d
mov r13, qword [rsp + 0x38]
sub eax, r8d
mov r12, qword [rsp + 0x48]
mov r11d, r15d
mov qword [rbp - 0x48], rax
mov qword [rsp + 0x58], r11
mov rbx, qword [rdi + 0x60]
lea rdx, [r11 + 8]
add rdx, rcx
mov r8, rsi
lea rcx, [rbp - 0x70]
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rbp - 0x70], 0x9e3779b1
mov r8d, 0x3fffffc0
mov rcx, qword [rbp - 0x48]
mov eax, ebx
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 2
and eax, r8d
prefetcht0 byte [r13 + rax*4]
prefetcht0 byte [r13 + rax*4 + 0x40]
prefetcht0 byte [rax + r12]
prefetcht0 byte [rax + r12 + 0x20]
mov r11, qword [rsp + 0x58]
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, 2
and eax, r8d
mov r9d, eax
lea r8, [r12 + rax]
movzx edx, byte [r8]
dec edx
and edx, 0x3f
mov eax, edx
neg eax
sbb ecx, ecx
inc r11
not ecx
mov qword [rsp + 0x58], r11
and ecx, 0x3f
add edx, ecx
mov rcx, qword [rbp - 0x40]
mov byte [r8], dl
mov eax, edx
add rax, r9
mov byte [r8 + rdx], r10b
mov dword [r13 + rax*4], r15d
inc r15d
cmp r15d, r14d
jb 0x18005cc74
mov r13, qword [rbp - 0x80]
xor r14d, r14d
mov ebx, dword [rsp + 0x30]
lea r12d, [r14 + 0x18]
mov rdx, qword [rsp + 0x68]
lea rcx, [rsp + 0x58]
add rdx, 8
mov dword [rdi + 0x2c], ebx
add rdx, rbx
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
imul edx, dword [rsp + 0x58], 0x9e3779b1
mov ecx, r12d
mov eax, dword [rbp - 0x18]
sub ecx, dword [rsp + 0x40]
mov r9, qword [rbp - 0x68]
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 2
and eax, 0x3fffffc0
prefetcht0 byte [r9 + rax*4]
prefetcht0 byte [r9 + rax*4 + 0x40]
mov r10, qword [rbp - 0x60]
prefetcht0 byte [rax + r10]
prefetcht0 byte [rax + r10 + 0x20]
and ebx, 7
mov r8d, dword [rdi + rbx*4 + 0x40]
mov dword [rdi + rbx*4 + 0x40], edx
jmp 0x18005cdd5
mov r8, rsi
lea rcx, [rsp + 0x48]
mov rdx, r13
call sub.VCRUNTIME140.dll_memcpy
imul r8d, dword [rsp + 0x48], 0x9e3779b1
mov ecx, 0x18
sub ecx, dword [rsp + 0x40]
mov r9, qword [rbp - 0x68]
mov r10, qword [rbp - 0x60]
mov eax, r15d
xor r8, rax
mov dword [rdi + 0x2c], ebx
shr r8, cl
add dword [rdi + 0x68], r8d
mov eax, r8d
shr eax, 2
xorps xmm0, xmm0
and eax, 0x3fffffc0
mov r15, r14
movups xmmword [rbp - 0x18], xmm0
mov rcx, r14
lea r11, [r9 + rax*4]
lea r9, [rax + r10]
movsx eax, r8b
movzx r10d, byte [r9]
mov rdx, r9
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 - 0x18], eax
inc rcx
cmp rcx, rsi
jl 0x18005ce15
movsxd rax, dword [rbp - 0x10]
mov cl, r10b
movsxd rdx, dword [rbp - 0xc]
and cl, 0x3f
shl rdx, 0x10
or rdx, rax
movsxd rax, dword [rbp - 0x14]
shl rdx, 0x10
or rdx, rax
movsxd rax, dword [rbp - 0x18]
shl rdx, 0x10
or rdx, rax
ror rdx, cl
test rdx, rdx
je 0x18005cebc
mov rbx, qword [rsp + 0x68]
mov r12d, dword [rsp + 0x60]
mov r13, qword [rbp - 0x58]
mov edi, dword [rsp + 0x64]
test r12d, r12d
je 0x18005ceb4
bsf rcx, rdx
add ecx, r10d
and ecx, 0x3f
mov ecx, dword [r11 + rcx*4]
je 0x18005ceab
cmp ecx, edi
jb 0x18005ceb4
cmp ecx, dword [rsp + 0x70]
jb 0x18005ce9b
prefetcht0 byte [rcx + rbx]
jmp 0x18005cea0
prefetcht0 byte [rcx + r13]
mov dword [rbp + r15*4], ecx
inc r15
dec r12d
lea rax, [rdx - 1]
and rdx, rax
ja 0x18005ce76
mov rdi, qword [rbp - 0x38]
mov r13, qword [rbp - 0x80]
lea edx, [r10 - 1]
and edx, 0x3f
mov eax, edx
neg eax
sbb ecx, ecx
not ecx
and ecx, 0x3f
add edx, ecx
mov byte [r9], dl
mov byte [rdx + r9], r8b
mov eax, dword [rdi + 0x2c]
mov dword [r11 + rdx*4], eax
inc dword [rdi + 0x2c]
test r15, r15
je 0x18005cfd7
mov edi, dword [rbp + r14*4]
mov r8, rsi
mov eax, edi
cmp edi, dword [rsp + 0x70]
jb 0x18005cf53
mov r12, qword [rsp + 0x68]
lea rcx, [rsp + 0x64]
mov rdx, qword [rsp + 0x78]
add r12, rax
add rdx, 0xfffffffffffffffd
add rdx, r12
call sub.VCRUNTIME140.dll_memcpy
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0x60]
mov ebx, dword [rsp + 0x64]
add rdx, 0xfffffffffffffffd
add rdx, r13
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
cmp ebx, dword [rsp + 0x60]
jne 0x18005cfcb
mov rbx, qword [rbp - 0x50]
mov rdx, r12
mov r8, rbx
mov rcx, r13
call fcn.18003ab40
jmp 0x18005cfa6
mov r12, qword [rbp - 0x58]
lea rcx, [rsp + 0x40]
add r12, rax
mov rdx, r12
call sub.VCRUNTIME140.dll_memcpy
mov ebx, dword [rsp + 0x40]
lea rcx, [rsp + 0x38]
mov r8, rsi
mov rdx, r13
call sub.VCRUNTIME140.dll_memcpy
cmp ebx, dword [rsp + 0x38]
jne 0x18005cfcb
mov rax, qword [rbp - 0x30]
lea rdx, [r12 + 4]
mov rbx, qword [rbp - 0x50]
lea rcx, [r13 + 4]
mov r9, qword [rbp - 0x28]
mov r8, rbx
mov qword [rsp + 0x20], rax
call fcn.18004eb60
add rax, rsi
cmp rax, qword [rsp + 0x78]
jbe 0x18005cfcb
mov ecx, dword [rsp + 0x30]
mov rdx, qword [rbp - 0x20]
sub ecx, edi
add ecx, 3
mov qword [rsp + 0x78], rax
mov qword [rdx], rcx
lea rcx, [rax + r13]
cmp rcx, rbx
je 0x18005cfd7
inc r14
cmp r14, r15
jb 0x18005ceea
mov rax, qword [rsp + 0x78]
mov rcx, qword [rbp + 0x100]
xor rcx, rsp
call fcn.1801241e0
add rsp, 0x218
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret