Function at 0x180151c40
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x168
mov rax, qword [0x180248b00]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov r12, qword [rcx + 8]
mov rbp, rcx
mov r13, qword [rcx + 0x38]
mov rbx, r8
mov esi, dword [rcx + 0x34]
mov r8d, edx
sub r8d, r12d
mov qword [rsp + 0x40], rdx
mov r10, rdx
mov qword [rsp + 0x48], r9
mov r9, qword [rcx + 0x70]
mov r14d, 1
mov ecx, dword [rcx + 0x100]
mov edx, r14d
shl edx, cl
mov r11d, r8d
mov ecx, dword [rbp + 0x1c]
sub r11d, edx
mov eax, r8d
mov qword [rsp + 0x28], rbx
sub eax, ecx
mov qword [rsp + 0x30], r9
cmp eax, edx
mov qword [rsp + 0x18], r13
mov eax, dword [rbp + 0x10c]
mov edi, 3
mov rdx, qword [rbp + 0x60]
cmovbe r11d, ecx
cmp dword [rbp + 0x28], 0
mov dword [rsp + 8], esi
cmovne r11d, ecx
mov dword [rsp], r8d
mov ecx, 6
mov dword [rsp + 0x20], r11d
cmp eax, ecx
mov qword [rsp + 0x38], rdx
mov dword [rsp + 0xc], 0x3f
cmovb ecx, eax
xor r11d, r11d
shl r14d, cl
mov dword [rsp + 4], r14d
cmp dword [rbp + 0x12c], r11d
jne 0x180151fea
mov esi, dword [rbp + 0x2c]
mov eax, r8d
mov ecx, dword [rsp + 8]
sub eax, esi
mov r15, r9
mov rdx, r12
cmp eax, 0x180
jbe 0x180151ecc
lea eax, [rsi + 0x60]
cmp esi, eax
jae 0x180151e02
mov rdi, qword [rsp + 0x18]
lea r13, [r12 + 8]
mov r14d, 0x18
mov r15d, esi
sub r14d, ecx
mov ebx, eax
add r13, rsi
mov r10, r9
nop dword [rax + rax]
imul edx, dword [r13], 0x9e3779b1
mov rcx, r14
mov eax, dword [rbp + 0x60]
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 2
and eax, 0x3fffffc0
prefetcht0 byte [r10 + rax*4]
prefetcht0 byte [r10 + rax*4 + 0x40]
prefetcht0 byte [rax + rdi]
prefetcht0 byte [rax + rdi + 0x20]
mov rax, r15
lea r13, [r13 + 1]
and eax, 7
mov r9d, dword [rbp + rax*4 + 0x40]
mov dword [rbp + rax*4 + 0x40], edx
mov eax, r9d
shr eax, 2
and eax, 0x3fffffc0
movzx ecx, byte [rdi + rax]
lea rdx, [rdi + rax]
dec ecx
mov r8d, eax
and ecx, 0x3f
mov eax, r11d
cmove eax, dword [rsp + 0xc]
inc r15
add ecx, eax
mov byte [rdx], cl
mov eax, ecx
add rax, r8
mov byte [rcx + rdx], r9b
mov dword [r10 + rax*4], esi
inc esi
cmp esi, ebx
jb 0x180151d60
mov rdx, qword [rbp + 8]
mov edi, 3
mov r10, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x28]
mov r14d, dword [rsp + 4]
mov r8d, dword [rsp]
mov ecx, dword [rbp + 0x34]
lea esi, [r8 - 0x20]
mov r15, qword [rbp + 0x70]
lea rax, [r10 + 1]
mov r13, qword [rbp + 0x38]
lea r9, [rsi + r12]
mov dword [rsp + 0x10], ecx
mov ecx, eax
sub ecx, r12d
mov r8d, esi
sub ecx, esi
inc ecx
cmp r9, rax
mov eax, 8
cmova ecx, r11d
cmp ecx, eax
cmova ecx, eax
lea eax, [rsi + rcx]
cmp esi, eax
jae 0x180151ec0
mov eax, 0x18
mov ebx, ecx
sub eax, dword [rsp + 0x10]
mov qword [rsp + 0x10], rax
mov r14d, eax
nop dword [rax]
nop dword [rax + rax]
imul edx, dword [r9], 0x9e3779b1
mov rcx, r14
mov eax, dword [rbp + 0x60]
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 2
and eax, 0x3fffffc0
prefetcht0 byte [r15 + rax*4]
prefetcht0 byte [r15 + rax*4 + 0x40]
prefetcht0 byte [rax + r13]
prefetcht0 byte [rax + r13 + 0x20]
mov rax, r8
lea r9, [r9 + 1]
and eax, 7
inc r8
mov dword [rbp + rax*4 + 0x40], edx
sub rbx, 1
jne 0x180151e60
mov r15, qword [rbp + 0x70]
mov r13, qword [rbp + 0x38]
mov rdx, qword [rbp + 8]
mov rbx, qword [rsp + 0x28]
mov r14d, dword [rsp + 4]
mov ecx, dword [rbp + 0x34]
mov r8d, dword [rsp]
mov r9, qword [rsp + 0x30]
cmp esi, r8d
jae 0x180151f95
mov r14d, dword [rsp]
lea rdi, [rsi + 8]
mov r10d, 0x18
mov ebx, esi
sub r10d, ecx
add rdi, rdx
nop dword [rax + rax]
imul edx, dword [rdi], 0x9e3779b1
mov rcx, r10
mov eax, dword [rbp + 0x60]
xor rdx, rax
shr rdx, cl
mov eax, edx
shr eax, 2
and eax, 0x3fffffc0
prefetcht0 byte [r15 + rax*4]
prefetcht0 byte [r15 + rax*4 + 0x40]
prefetcht0 byte [rax + r13]
prefetcht0 byte [rax + r13 + 0x20]
mov rax, rbx
lea rdi, [rdi + 1]
and eax, 7
mov r9d, dword [rbp + rax*4 + 0x40]
mov dword [rbp + rax*4 + 0x40], edx
mov eax, r9d
shr eax, 2
and eax, 0x3fffffc0
movzx ecx, byte [rax + r13]
lea rdx, [rax + r13]
dec ecx
mov r8d, eax
and ecx, 0x3f
mov eax, r11d
cmove eax, dword [rsp + 0xc]
inc rbx
add ecx, eax
mov byte [rdx], cl
mov eax, ecx
add rax, r8
mov byte [rdx + rcx], r9b
mov dword [r15 + rax*4], esi
inc esi
cmp esi, r14d
jb 0x180151ef0
mov r10, qword [rsp + 0x40]
mov edi, 3
mov rbx, qword [rsp + 0x28]
mov r14d, dword [rsp + 4]
mov r8d, dword [rsp]
mov r9, qword [rsp + 0x30]
mov eax, dword [rsp + 0x38]
mov ecx, 0x18
sub ecx, dword [rsp + 8]
mov dword [rbp + 0x2c], r8d
imul edx, dword [r8 + r12 + 8], 0x9e3779b1
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 r13, qword [rsp + 0x18]
prefetcht0 byte [rax + r13]
prefetcht0 byte [rax + r13 + 0x20]
and r8d, 7
mov r15d, dword [rbp + r8*4 + 0x40]
mov dword [rbp + r8*4 + 0x40], edx
jmp 0x180152004
imul r15d, dword [r10], 0x9e3779b1
mov ecx, 0x18
mov eax, edx
sub ecx, esi
mov dword [rbp + 0x2c], r8d
xor r15, rax
shr r15, cl
add dword [rbp + 0x68], r15d
mov eax, r15d
shr eax, 2
mov rsi, r11
and eax, 0x3fffffc0
movdqu xmm0, xmmword [rax + r13]
lea rcx, [r9 + rax*4]
lea r9, [rax + r13]
mov qword [rsp + 0x18], rcx
movzx r13d, byte [r9]
mov qword [rsp + 0x38], r9
movzx ecx, r13b
movsx eax, r15b
and cl, 0x3f
movd xmm2, eax
punpcklbw xmm2, xmm2
punpcklwd xmm2, xmm2
pshufd xmm2, xmm2, 0
movdqa xmm1, xmm2
pcmpeqb xmm1, xmm0
movdqu xmm0, xmmword [r9 + 0x10]
pmovmskb r8d, xmm1
movdqu xmm1, xmmword [r9 + 0x20]
pcmpeqb xmm0, xmm2
pmovmskb edx, xmm0
pcmpeqb xmm1, xmm2
movdqu xmm0, xmmword [r9 + 0x30]
pmovmskb eax, xmm1
pcmpeqb xmm0, xmm2
pmovmskb r9d, xmm0
shl r9, 0x10
or r9, rax
movsxd rax, edx
mov rdx, qword [rsp + 0x18]
shl r9, 0x10
or r9, rax
movsxd rax, r8d
shl r9, 0x10
or r9, rax
ror r9, cl
test r9, r9
je 0x1801520e4
mov r8d, dword [rsp + 0x20]
test r14d, r14d
je 0x1801520e4
bsf rcx, r9
add ecx, r13d
and ecx, 0x3f
mov ecx, dword [rdx + rcx*4]
je 0x1801520db
cmp ecx, r8d
jb 0x1801520e4
prefetcht0 byte [rcx + r12]
mov dword [rsp + rsi*4 + 0x50], ecx
inc rsi
dec r14d
lea rax, [r9 - 1]
and r9, rax
ja 0x1801520b3
lea ecx, [r13 - 1]
mov eax, r11d
and ecx, 0x3f
mov r8d, 0x3f
cmove eax, r8d
add ecx, eax
mov rax, qword [rsp + 0x38]
mov byte [rax], cl
mov byte [rcx + rax], r15b
mov eax, dword [rbp + 0x2c]
mov dword [rdx + rcx*4], eax
inc dword [rbp + 0x2c]
test rsi, rsi
je 0x1801521e9
mov ebp, dword [rsp]
mov r14, qword [rsp + 0x48]
nop
mov r9d, dword [rsp + r11*4 + 0x50]
mov eax, dword [rdi + r10 - 3]
lea rdx, [r12 + r9]
cmp dword [rdx + rdi - 3], eax
jne 0x1801521dd
lea r8, [rbx - 7]
mov rax, r10
cmp r10, r8
jae 0x18015217c
mov rcx, qword [rdx]
xor rcx, qword [r10]
je 0x180152156
bsf rcx, rcx
shr rcx, 3
jmp 0x1801521c1
add rax, 8
add rdx, 8
cmp rax, r8
jae 0x18015217c
mov rcx, qword [rax]
xor rcx, qword [rdx]
jne 0x180152210
add rax, 8
add rdx, 8
cmp rax, r8
jb 0x180152163
lea rcx, [rbx - 3]
cmp rax, rcx
jae 0x180152193
mov ecx, dword [rax]
cmp dword [rdx], ecx
jne 0x180152193
add rax, 4
add rdx, 4
lea rcx, [rbx - 1]
cmp rax, rcx
jae 0x1801521ac
movzx ecx, word [rax]
cmp word [rdx], cx
jne 0x1801521ac
add rax, 2
add rdx, 2
cmp rax, rbx
jae 0x1801521bb
movzx ecx, byte [rax]
cmp byte [rdx], cl
jne 0x1801521bb
inc rax
mov rcx, rax
sub rcx, r10
cmp rcx, rdi
jbe 0x1801521dd
mov eax, ebp
mov rdi, rcx
sub eax, r9d
add eax, 3
mov qword [r14], rax
lea rax, [rcx + r10]
cmp rax, rbx
je 0x1801521e9
inc r11
cmp r11, rsi
jb 0x180152120
mov rax, rdi
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.18017a790
add rsp, 0x168
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
bsf rcx, rcx
shr rcx, 3
sub rcx, r10
add rcx, rax
jmp 0x1801521c1