Function at 0x200180000
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x498
mov ebp, 0xffffbf80
cmp dword [rcx + 0x148], 1
jne 0x2001431b8
mov rdi, rcx
mov r14, qword [rcx + 8]
lea rax, [r14 - 0x401]
cmp rax, 0xfffffffffffffc0f
jb 0x2001431b8
mov rsi, r9
mov rbx, r8
mov r13, rdx
mov ecx, dword [rdi + 0x14c]
call fcn.2001bde90
test rax, rax
je 0x2001431b8
mov r12, rax
mov rcx, rax
call fcn.2001d1f20
mov r15d, eax
movzx ecx, al
lea eax, [rcx + rcx]
add eax, 2
cmp r14, rax
jb 0x2001431b8
mov qword [rsp + 0x28], rcx
mov r9, qword [rsp + 0x500]
lea rax, [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov rcx, rdi
mov rdx, r13
mov r8, rbx
call fcn.2001db2d0
mov ebp, eax
test eax, eax
jne 0x200143197
lea rdi, [rsp + 0x78]
mov rcx, rdi
call fcn.2001ef4e0
mov rcx, rdi
mov rdx, r12
call fcn.200186180
test eax, eax
je 0x20014312e
mov ebp, eax
jmp 0x20014318d
mov rbx, qword [rsp + 0x28]
mov r13, rbx
not r13
add r13, r14
lea r8, [rsp + rbx]
add r8, 0x91
lea rcx, [rsp + 0x91]
mov qword [rsp + 0x20], rdi
mov rdx, rbx
mov qword [rsp + 0x70], r8
mov r9, r13
call fcn.2001869a0
mov ebp, eax
test eax, eax
jne 0x20014318d
mov qword [rsp + 0x20], rdi
mov rcx, qword [rsp + 0x70]
mov rdx, r13
lea r8, [rsp + 0x91]
mov r9, rbx
call fcn.2001869a0
mov ebp, eax
test eax, eax
je 0x2001431ce
lea rcx, [rsp + 0x78]
call fcn.2001ef850
lea rcx, [rsp + 0x90]
mov edx, 0x400
call fcn.200146a30
lea rcx, [rsp + 0x30]
mov edx, 0x40
call fcn.200146a30
mov eax, ebp
add rsp, 0x498
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rdi, [rsp + 0x91]
lea rcx, [rsp + 0x78]
call fcn.2001ef850
lea r9, [rsp + 0x30]
mov rcx, r12
xor edx, edx
xor r8d, r8d
call fcn.200150d70
mov ebp, eax
test eax, eax
jne 0x200143197
mov r11, qword [rsp + 0x28]
lea eax, [r11 + r11]
movzx edx, byte [rsp + 0x90]
mov r12, rdi
add r12, r11
test r11b, r11b
je 0x200143490
lea rcx, [r11 + r11]
inc rcx
cmp r15b, 7
ja 0x20014322d
xor r8d, r8d
jmp 0x200143464
cmp r15b, 0x20
jae 0x20014323b
xor r8d, r8d
jmp 0x2001433ff
mov r8d, r11d
and r8d, 0xffffffe0
movzx edx, dl
movd xmm2, edx
movdqu xmm0, xmmword [rsp + r11 + 0x91]
movdqu xmm1, xmmword [rsp + r11 + 0xa1]
pxor xmm0, xmmword [rsp + 0x30]
por xmm0, xmm2
pxor xmm1, xmmword [rsp + 0x40]
cmp r8, 0x20
jne 0x20014327b
mov r9, r12
jmp 0x2001433af
movdqu xmm2, xmmword [r12 + 0x20]
mov r9, r12
movdqu xmm3, xmmword [r12 + 0x30]
pxor xmm2, xmmword [rsp + 0x50]
pxor xmm3, xmmword [rsp + 0x60]
por xmm0, xmm2
por xmm1, xmm3
cmp r8d, 0x40
je 0x2001433af
mov rdx, r9
movdqu xmm2, xmmword [r9 + 0x40]
movdqu xmm3, xmmword [r9 + 0x50]
pxor xmm2, xmmword [rsp + 0x70]
pxor xmm3, xmmword [rsp + 0x80]
por xmm0, xmm2
por xmm1, xmm3
cmp r8d, 0x60
je 0x2001433af
mov rdx, r9
movdqu xmm2, xmmword [r9 + 0x60]
movdqu xmm3, xmmword [r9 + 0x70]
pxor xmm2, xmmword [rsp + 0x90]
pxor xmm3, xmmword [rsp + 0xa0]
por xmm0, xmm2
por xmm1, xmm3
cmp r8d, 0x80
je 0x2001433af
mov rdx, r9
movdqu xmm2, xmmword [r9 + 0x80]
movdqu xmm3, xmmword [r9 + 0x90]
pxor xmm2, xmmword [rsp + 0xb0]
pxor xmm3, xmmword [rsp + 0xc0]
por xmm0, xmm2
por xmm1, xmm3
cmp r8d, 0xa0
je 0x2001433af
mov rdx, r9
movdqu xmm2, xmmword [r9 + 0xa0]
movdqu xmm3, xmmword [r9 + 0xb0]
pxor xmm2, xmmword [rsp + 0xd0]
pxor xmm3, xmmword [rsp + 0xe0]
por xmm0, xmm2
por xmm1, xmm3
cmp r8d, 0xc0
je 0x2001433af
mov rdx, r9
movdqu xmm2, xmmword [r9 + 0xc0]
movdqu xmm3, xmmword [r9 + 0xd0]
pxor xmm2, xmmword [rsp + 0xf0]
pxor xmm3, xmmword [rsp + 0x100]
por xmm0, xmm2
por xmm1, xmm3
por xmm0, xmm1
pshufd xmm1, xmm0, 0xee
por xmm1, xmm0
pshufd xmm0, xmm1, 0x55
por xmm0, xmm1
movdqa xmm1, xmm0
psrld xmm1, 0x10
por xmm1, xmm0
movdqa xmm0, xmm1
psrlw xmm0, 8
por xmm0, xmm1
movd edx, xmm0
mov r10, qword [rsp + 0x28]
cmp r8, r10
je 0x200143485
mov r12, r9
test r10b, 0x18
je 0x20014345c
mov r11, qword [rsp + 0x28]
mov r9, r8
mov r8d, r11d
and r8d, 0xfffffff8
movzx edx, dl
movd xmm0, edx
mov rdx, qword [r12 + r9]
xor rdx, qword [rsp + r9 + 0x30]
movq xmm1, rdx
por xmm0, xmm1
add r9, 8
cmp r8, r9
jne 0x200143410
pshufd xmm1, xmm0, 0x55
por xmm1, xmm0
movdqa xmm0, xmm1
psrld xmm0, 0x10
por xmm0, xmm1
movdqa xmm1, xmm0
psrlw xmm1, 8
por xmm1, xmm0
movd edx, xmm1
cmp r8, r11
je 0x200143485
add r12, r8
jmp 0x200143464
add r12, r8
mov r11, qword [rsp + 0x28]
sub r11, r8
add r8, rsp
add r8, 0x30
xor r9d, r9d
movzx r10d, byte [r12 + r9]
xor r10b, byte [r8 + r9]
or dl, r10b
inc r9
cmp r11, r9
jne 0x200143471
lea r12, [rsp + rcx]
add r12, 0x90
mov eax, eax
lea r9, [r14 - 2]
xor r8d, r8d
sub r9, rax
jne 0x2001434a5
xor eax, eax
jmp 0x20014354c
mov ecx, 1
cmp r9, 2
cmovae rcx, r9
jae 0x2001434bb
xor eax, eax
xor r9d, r9d
jmp 0x200143526
mov r10, rcx
and r10, 0xfffffffffffffffe
lea r8, [rsp + 0x90]
lea r11, [rax + r8]
add r11, 2
xor r8d, r8d
xor eax, eax
xor r9d, r9d
movzx edi, byte [r11 + r9 - 1]
movzx ebx, r8b
or rbx, rdi
mov r8d, ebx
neg r8d
movzx edi, r8b
or rdi, rbx
shr rdi, 7
xor rdi, 1
add rdi, rax
movzx r8d, byte [r11 + r9]
or r8, rbx
mov eax, r8d
neg eax
movzx eax, al
or rax, r8
shr rax, 7
xor rax, 1
add rax, rdi
add r9, 2
cmp r10, r9
jne 0x2001434da
test cl, 1
je 0x20014354c
movzx ecx, byte [r12 + r9]
mov r8d, r8d
or r8, rcx
mov ecx, r8d
neg ecx
movzx ecx, cl
or rcx, r8
shr rcx, 7
xor rcx, 1
add rax, rcx
movzx ecx, byte [r12 + rax]
xor cl, 1
mov ebp, 0xffffbf00
or cl, dl
lea r8, [rsp + 0x90]
jne 0x200143197
mov r9, r12
lea rdx, [r12 + rax]
inc rdx
sub r8, rdx
add r8, r14
mov ebp, 0xffffbc00
cmp r8, qword [rsp + 0x510]
ja 0x200143197
mov qword [rsi], r8
xor ebp, ebp
test r8, r8
je 0x200143197
mov rcx, qword [rsp + 0x508]
call fcn.200199550
jmp 0x200143197
sub rsp, 0x38
mov eax, dword [rcx + 0x148]
cmp eax, 1
je 0x200180038
test eax, eax
jne 0x200180041
mov rax, qword [rsp + 0x70]
mov r10, qword [rsp + 0x68]
mov r11, qword [rsp + 0x60]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r10
mov qword [rsp + 0x20], r11
call fcn.200152e80
jmp 0x200180046
add rsp, 0x38
jmp 0x200143060
mov eax, 0xffffbf00
add rsp, 0x38
ret