Function at 0x180059410
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 rax, qword [rcx + 0x70]
mov r14, rcx
mov qword [rbp - 0x20], rax
mov r13, rdx
mov rax, qword [rcx + 0x38]
mov qword [rbp - 0x60], rax
mov eax, dword [rcx + 0x34]
mov rcx, qword [rcx + 8]
mov dword [rsp + 0x38], eax
mov eax, dword [r14 + 0x18]
mov dword [rsp + 0x40], eax
add rax, rcx
mov qword [rbp - 0x28], rax
mov eax, edx
sub eax, ecx
mov qword [rbp - 0x80], rcx
mov ecx, dword [r14 + 0x100]
mov dword [rsp + 0x34], eax
mov qword [rbp - 0x58], r8
mov r8d, dword [r14 + 0x1c]
mov qword [rsp + 0x78], rdx
mov edx, 1
shl edx, cl
mov ecx, eax
sub ecx, dword [r14 + 0x1c]
sub eax, edx
cmp ecx, edx
mov qword [rbp - 0x50], r9
mov rdx, r13
mov qword [rsp + 0x68], 3
cmova r8d, eax
mov eax, dword [r14 + 0x10c]
xor r15d, r15d
cmp dword [r14 + 0x28], r15d
cmovne r8d, dword [r14 + 0x1c]
lea ecx, [r15 + 5]
mov dword [rsp + 0x50], r8d
cmp eax, ecx
lea r8d, [r15 + 8]
cmovb ecx, eax
mov rax, qword [r14 + 0x60]
mov qword [rbp - 0x68], rax
lea eax, [r15 + 1]
shl eax, cl
lea rcx, [rbp - 0x48]
mov dword [rsp + 0x3c], eax
mov rax, qword [r14 + 0xf8]
mov qword [rbp - 0x70], rax
mov rsi, qword [rax + 0x70]
mov rdi, qword [rax + 0x38]
mov ebx, dword [rax + 0x34]
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rbp - 0x48]
lea r12d, [r15 + 0x38]
movabs rcx, 0xcf1bbcdcbb000000
imul rax, rcx
mov ecx, r12d
sub ecx, ebx
shr rax, cl
mov qword [rbp - 0x10], rax
shr eax, 3
and eax, 0x1fffffe0
mov ecx, eax
add rax, rdi
mov qword [rbp - 0x38], rax
lea rdx, [rsi + rcx*4]
mov qword [rbp - 0x30], rdx
prefetcht0 byte [rdx]
prefetcht0 byte [rsi + rcx*4 + 0x40]
prefetcht0 byte [rax]
cmp dword [r14 + 0x12c], r15d
jne 0x1800598ae
mov r8, qword [r14 + 8]
mov esi, r13d
mov edi, dword [r14 + 0x2c]
sub esi, r8d
mov eax, esi
mov qword [rsp + 0x58], r8
sub eax, edi
mov dword [rsp + 0x70], esi
cmp eax, 0x180
jbe 0x180059746
mov rcx, qword [r14 + 0x70]
lea eax, [rdi + 0x60]
mov qword [rsp + 0x60], rcx
mov rcx, qword [r14 + 0x38]
mov qword [rbp - 0x78], rcx
mov dword [rsp + 0x30], eax
cmp edi, eax
jae 0x180059676
mov eax, r12d
mov esi, edi
sub eax, dword [r14 + 0x34]
mov r15, r8
mov r12d, dword [rsp + 0x30]
mov r13d, eax
mov rbx, qword [r14 + 0x60]
lea rdx, [r15 + 8]
add rdx, rsi
lea rcx, [rbp - 0x40]
mov r8d, 8
call sub.VCRUNTIME140.dll_memcpy
mov rdx, qword [rbp - 0x40]
movabs rax, 0xcf1bbcdcbb000000
mov r11, qword [rsp + 0x60]
mov ecx, r13d
imul rdx, rax
mov r9d, 0x1fffffe0
xor rdx, rbx
shr rdx, cl
mov eax, edx
shr eax, 3
and eax, r9d
prefetcht0 byte [r11 + rax*4]
prefetcht0 byte [r11 + rax*4 + 0x40]
mov r8, qword [rbp - 0x78]
prefetcht0 byte [rax + r8]
mov rax, rsi
and eax, 7
mov r10d, dword [r14 + rax*4 + 0x40]
mov dword [r14 + 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 rsi
not ecx
and ecx, 0x1f
add edx, ecx
mov byte [r8], dl
mov eax, edx
add rax, r9
mov byte [r8 + rdx], r10b
mov dword [r11 + rax*4], edi
inc edi
cmp edi, r12d
jb 0x1800595b5
mov r13, qword [rsp + 0x78]
xor r15d, r15d
mov esi, dword [rsp + 0x70]
mov r8, qword [rsp + 0x58]
lea r12d, [r15 + 0x38]
mov rax, qword [r14 + 0x70]
lea edi, [rsi - 0x20]
mov qword [rsp + 0x60], rax
lea rcx, [r13 + 1]
mov rax, qword [r14 + 0x38]
mov edx, ecx
sub edx, r8d
mov qword [rsp + 0x48], rax
sub edx, edi
mov eax, edi
inc edx
add rax, r8
cmp rax, rcx
mov ecx, 8
cmova edx, r15d
cmp edx, ecx
cmova edx, ecx
lea eax, [rdx + rdi]
cmp edi, eax
jae 0x180059746
mov r13, qword [rsp + 0x58]
mov eax, r12d
sub eax, dword [r14 + 0x34]
mov esi, eax
mov r12d, edx
mov r15d, edi
mov rbx, qword [r14 + 0x60]
lea rdx, [r15 + r13]
mov r8, rcx
lea rcx, [rbp - 0x78]
call sub.VCRUNTIME140.dll_memcpy
mov rdx, qword [rbp - 0x78]
movabs rax, 0xcf1bbcdcbb000000
imul rdx, rax
mov rax, qword [rsp + 0x60]
mov ecx, esi
xor rdx, rbx
shr rdx, cl
mov ecx, edx
shr ecx, 3
and ecx, 0x1fffffe0
prefetcht0 byte [rax + rcx*4]
prefetcht0 byte [rax + rcx*4 + 0x40]
mov rax, qword [rsp + 0x48]
prefetcht0 byte [rcx + rax]
mov rax, r15
mov ecx, 8
and eax, 7
inc r15
mov dword [r14 + rax*4 + 0x40], edx
sub r12, 1
jne 0x1800596cd
mov r13, qword [rsp + 0x78]
lea r12d, [rcx + 0x30]
mov esi, dword [rsp + 0x70]
xor r15d, r15d
mov rax, qword [r14 + 0x70]
mov rcx, qword [r14 + 8]
mov qword [rsp + 0x60], rax
mov rax, qword [r14 + 0x38]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x48], rcx
cmp edi, esi
jae 0x180059839
mov eax, r12d
mov r15d, edi
sub eax, dword [r14 + 0x34]
mov r12, qword [rsp + 0x60]
mov r13d, eax
mov rbx, qword [r14 + 0x60]
lea rdx, [rcx + 8]
add rdx, r15
lea rcx, [rsp + 0x60]
mov r8d, 8
call sub.VCRUNTIME140.dll_memcpy
mov rdx, qword [rsp + 0x60]
movabs rax, 0xcf1bbcdcbb000000
imul rdx, rax
mov ecx, r13d
mov r9d, 0x1fffffe0
xor rdx, rbx
shr rdx, cl
mov eax, edx
shr eax, 3
and eax, r9d
prefetcht0 byte [r12 + rax*4]
prefetcht0 byte [r12 + rax*4 + 0x40]
mov r8, qword [rsp + 0x58]
prefetcht0 byte [r8 + rax]
mov rax, r15
and eax, 7
mov r11d, dword [r14 + rax*4 + 0x40]
mov dword [r14 + rax*4 + 0x40], edx
mov eax, r11d
shr eax, 3
and eax, r9d
mov r10d, eax
lea r9, [r8 + rax]
movzx edx, byte [r9]
dec edx
and edx, 0x1f
mov eax, edx
neg eax
sbb ecx, ecx
inc r15
not ecx
and ecx, 0x1f
add edx, ecx
mov rcx, qword [rsp + 0x48]
mov byte [r9], dl
mov eax, edx
add rax, r10
mov byte [r9 + rdx], r11b
mov dword [r12 + rax*4], edi
inc edi
cmp edi, esi
jb 0x18005977b
mov r13, qword [rsp + 0x78]
xor r15d, r15d
lea r12d, [r15 + 0x38]
mov rdx, qword [rbp - 0x80]
lea rcx, [rsp + 0x58]
mov ebx, dword [rsp + 0x34]
add rdx, 8
add rdx, rbx
mov dword [r14 + 0x2c], esi
mov r8d, 8
call sub.VCRUNTIME140.dll_memcpy
sub r12d, dword [rsp + 0x38]
movabs rax, 0xcf1bbcdcbb000000
mov rdx, qword [rsp + 0x58]
mov cl, r12b
imul rdx, rax
mov rax, qword [rbp - 0x20]
xor rdx, qword [rbp - 0x68]
shr rdx, cl
mov ecx, edx
shr ecx, 3
and ecx, 0x1fffffe0
prefetcht0 byte [rax + rcx*4]
prefetcht0 byte [rax + rcx*4 + 0x40]
mov r8, qword [rbp - 0x60]
prefetcht0 byte [rcx + r8]
and ebx, 7
mov r9d, dword [r14 + rbx*4 + 0x40]
mov dword [r14 + rbx*4 + 0x40], edx
jmp 0x1800598ef
mov r8d, 8
lea rcx, [rsp + 0x70]
mov rdx, r13
call sub.VCRUNTIME140.dll_memcpy
sub r12d, dword [rsp + 0x38]
movabs rax, 0xcf1bbcdcbb000000
mov r9, qword [rsp + 0x70]
mov cl, r12b
mov r8, qword [rbp - 0x60]
imul r9, rax
mov eax, dword [rsp + 0x34]
xor r9, qword [rbp - 0x68]
shr r9, cl
mov dword [r14 + 0x2c], eax
mov rcx, qword [rbp - 0x20]
mov eax, r9d
add dword [r14 + 0x68], r9d
xorps xmm0, xmm0
shr eax, 3
mov rdi, r15
and eax, 0x1fffffe0
mov r12, r15
movups xmmword [rbp - 0x20], xmm0
lea r11, [rax + r8]
movzx ebx, byte [r11]
lea rsi, [rcx + rax*4]
movsx eax, r9b
mov rcx, r15
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 - 0x20], eax
inc rcx
cmp rcx, 2
jl 0x180059936
mov r8d, dword [rbp - 0x1c]
mov edx, ebx
and edx, 0x1f
shl r8d, 0x10
or r8d, dword [rbp - 0x20]
mov ecx, edx
neg ecx
mov eax, r8d
and ecx, 0x1f
mov r10d, r8d
shl r10d, cl
mov ecx, edx
shr rax, cl
or r10, rax
jbe 0x1800599c2
mov edx, dword [rsp + 0x3c]
mov r8, qword [rbp - 0x80]
mov r13d, dword [rsp + 0x50]
test edx, edx
je 0x1800599b9
bsf rcx, r10
add ecx, ebx
and ecx, 0x1f
mov ecx, dword [rsi + rcx*4]
je 0x1800599b0
cmp ecx, r13d
jb 0x1800599b9
prefetcht0 byte [rcx + r8]
mov dword [rbp + rdi*4], ecx
inc rdi
dec edx
lea rax, [r10 - 1]
and r10, rax
ja 0x18005998b
mov r13, qword [rsp + 0x78]
mov dword [rsp + 0x3c], edx
lea edx, [rbx - 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 [r14 + 0x2c]
mov dword [rsi + rdx*4], eax
inc dword [r14 + 0x2c]
test rdi, rdi
je 0x180059a7f
mov r14, qword [rsp + 0x68]
mov r15, qword [rbp - 0x58]
mov esi, dword [rbp + r12*4]
lea rdx, [r14 - 3]
add rsi, qword [rbp - 0x80]
lea rcx, [rsp + 0x50]
add rdx, rsi
mov r8d, 4
call sub.VCRUNTIME140.dll_memcpy
mov ebx, dword [rsp + 0x50]
lea rdx, [r14 - 3]
add rdx, r13
lea rcx, [rsp + 0x30]
mov r8d, 4
call sub.VCRUNTIME140.dll_memcpy
cmp ebx, dword [rsp + 0x30]
jne 0x180059a6f
mov r8, r15
mov rdx, rsi
mov rcx, r13
call fcn.18003ab40
mov rcx, rax
cmp rax, r14
jbe 0x180059a6f
mov rdx, qword [rbp - 0x50]
mov r14, rax
mov eax, dword [rsp + 0x34]
sub eax, dword [rbp + r12*4]
add eax, 3
mov qword [rdx], rax
lea rax, [rcx + r13]
cmp rax, r15
je 0x180059a77
inc r12
cmp r12, rdi
jb 0x1800599f9
mov qword [rsp + 0x68], r14
xor r15d, r15d
mov r11, qword [rbp - 0x70]
xorps xmm0, xmm0
mov rdx, qword [rbp - 0x38]
mov rdi, r15
mov rcx, r15
mov rax, qword [r11]
mov r12, qword [r11 + 8]
movzx r10d, byte [rdx]
mov qword [rbp - 0x70], rax
sub eax, r12d
sub dword [rsp + 0x40], eax
movsx eax, byte [rbp - 0x10]
movups xmmword [rbp - 0x10], xmm0
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 - 0x10], eax
inc rcx
cmp rcx, 2
jl 0x180059abf
mov r8d, dword [rbp - 0xc]
mov edx, r10d
and edx, 0x1f
shl r8d, 0x10
or r8d, dword [rbp - 0x10]
mov ecx, edx
neg ecx
mov eax, r8d
and ecx, 0x1f
mov r9d, r8d
shl r9d, cl
mov ecx, edx
shr rax, cl
or r9, rax
jbe 0x180059be6
mov edx, dword [rsp + 0x3c]
mov r8, qword [rbp - 0x30]
test edx, edx
je 0x180059b45
bsf rcx, r9
add ecx, r10d
and ecx, 0x1f
mov ecx, dword [r8 + rcx*4]
je 0x180059b3c
cmp ecx, dword [r11 + 0x18]
jb 0x180059b45
prefetcht0 byte [rcx + r12]
mov dword [rbp + rdi*4], ecx
inc rdi
dec edx
lea rax, [r9 - 1]
and r9, rax
ja 0x180059b14
mov r14, qword [rsp + 0x68]
test rdi, rdi
je 0x180059beb
mov esi, dword [rbp + r15*4]
lea rcx, [rsp + 0x48]
add rsi, r12
mov r8d, 4
mov rdx, rsi
call sub.VCRUNTIME140.dll_memcpy
mov ebx, dword [rsp + 0x48]
lea rcx, [rsp + 0x38]
mov r8d, 4
mov rdx, r13
call sub.VCRUNTIME140.dll_memcpy
cmp ebx, dword [rsp + 0x38]
jne 0x180059bd8
mov rax, qword [rbp - 0x28]
lea rdx, [rsi + 4]
mov rbx, qword [rbp - 0x58]
lea rcx, [r13 + 4]
mov r9, qword [rbp - 0x70]
mov r8, rbx
mov qword [rsp + 0x20], rax
call fcn.18004eb60
add rax, 4
cmp rax, r14
jbe 0x180059bd8
mov ecx, dword [rsp + 0x34]
mov r14, rax
sub ecx, dword [rbp + r15*4]
sub ecx, dword [rsp + 0x40]
mov rdx, qword [rbp - 0x50]
add ecx, 3
mov qword [rdx], rcx
lea rcx, [rax + r13]
cmp rcx, rbx
je 0x180059beb
inc r15
cmp r15, rdi
jb 0x180059b53
jmp 0x180059beb
mov r14, qword [rsp + 0x68]
mov rax, r14
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