Function at 0x140018f08
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x28
movzx eax, byte [rcx]
mov r10d, 7
mov dword [rsp + 0x78], edx
lea r15d, [rax - 7]
mov rbx, rcx
mov r9d, r10d
cmp r15d, r10d
mov dword [rsp + 0x70], eax
lea r13d, [r10 - 6]
jle 0x140018f8e
movzx ecx, byte [rbx]
imul ecx, r9d
add ecx, 6
mov eax, ecx
and ecx, r10d
sar eax, 3
add eax, r13d
movsxd rdx, eax
mov eax, r13d
shl al, cl
not al
and byte [rdx + rbx], al
movzx eax, byte [rbx]
lea ecx, [rax + rax*2]
lea r8d, [r9 + rcx*2]
add r9d, 2
mov eax, r8d
and r8d, r10d
sar eax, 3
mov cl, r8b
add eax, r13d
movsxd rdx, eax
mov eax, r13d
shl al, cl
not al
and byte [rdx + rbx], al
cmp r9d, r15d
jl 0x140018f3d
mov ebp, dword [rsp + 0x70]
or edi, 0xffffffff
or esi, 0xffffffff
lea ecx, [rsi - 3]
call fcn.14001f7e0
lea ecx, [rdi - 3]
mov r12d, eax
call fcn.14001f7e0
cmp eax, r12d
jle 0x140018fbb
lea ecx, [rdi - 3]
call fcn.14001f7e0
mov r12d, eax
cmp r12d, 2
je 0x140018fcb
cmp r12d, 4
jne 0x14001906d
test esi, esi
movzx eax, byte [rbx]
js 0x140018fff
cmp esi, eax
jge 0x140018fff
test edi, edi
js 0x140018fff
cmp edi, eax
jge 0x140018fff
mov ecx, edi
imul ecx, eax
add ecx, esi
mov eax, ecx
and ecx, 7
sar eax, 3
add eax, 1
movsxd rdx, eax
mov eax, 1
shl al, cl
not al
and byte [rdx + rbx], al
movzx eax, byte [rbx]
lea edx, [rsi + rbp - 7]
test edx, edx
js 0x140019037
cmp edx, eax
jge 0x140019037
test edi, edi
js 0x140019037
cmp edi, eax
jge 0x140019037
mov ecx, edi
imul ecx, eax
add ecx, edx
mov eax, ecx
and ecx, 7
sar eax, 3
add eax, 1
movsxd rdx, eax
mov eax, 1
shl al, cl
not al
and byte [rdx + rbx], al
test esi, esi
movzx eax, byte [rbx]
js 0x14001906d
cmp esi, eax
jge 0x14001906d
lea ecx, [rdi + r15]
test ecx, ecx
js 0x14001906d
cmp ecx, eax
jge 0x14001906d
imul ecx, eax
add ecx, esi
mov eax, ecx
and ecx, 7
sar eax, 3
add eax, 1
movsxd rdx, eax
mov eax, 1
shl al, cl
not al
and byte [rdx + rbx], al
mov r13d, 1
add esi, r13d
lea eax, [rsi - 3]
cmp eax, 4
jle 0x140018f98
add edi, r13d
lea eax, [rdi - 3]
cmp eax, 4
jle 0x140018f95
mov ebp, dword [rsp + 0x78]
cmp ebp, r13d
jne 0x14001909f
xor r9d, r9d
jmp 0x1400190b1
lea rdx, [rsp + 0x88]
mov ecx, ebp
call fcn.1400194cc
mov r9d, eax
xor r14d, r14d
xor r10d, r10d
test r9d, r9d
jle 0x1400191b5
movsxd r12, r9d
xor r13d, r13d
xor r8d, r8d
test r12, r12
jle 0x14001919c
test r10, r10
jne 0x1400190ed
test r8, r8
je 0x14001918b
lea eax, [r9 - 1]
cmp r13d, eax
je 0x14001918b
lea eax, [r9 - 1]
cmp r14d, eax
jne 0x1400190ff
test r8, r8
je 0x14001918b
movzx ebp, byte [rsp + r10 + 0x88]
movzx r12d, byte [rsp + r8 + 0x88]
or edi, 0xffffffff
or rsi, 0xffffffffffffffff
lea eax, [r12 + rdi]
or r11d, 0xffffffff
mov r12d, eax
test r11d, r11d
jne 0x140019131
test rsi, rsi
jne 0x140019131
mov cl, 1
jmp 0x140019133
xor cl, cl
movzx eax, byte [rbx]
imul eax, r12d
add eax, ebp
add eax, r11d
mov r15d, eax
sar eax, 3
add eax, 1
and r15d, 7
test cl, cl
movsxd rdx, eax
mov eax, 1
mov ecx, r15d
je 0x140019162
shl al, cl
or byte [rdx + rbx], al
jmp 0x140019169
shl al, cl
not al
and byte [rdx + rbx], al
add r11d, 1
cmp r11d, 1
jle 0x140019123
movzx r12d, byte [rsp + r8 + 0x88]
add edi, 1
add rsi, 1
cmp edi, 1
jle 0x140019118
movsxd r12, r9d
add r8, 1
add r13d, 1
cmp r8, r12
jl 0x1400190d2
mov r13d, 1
add r10, r13
add r14d, r13d
cmp r10, r12
jl 0x1400190c3
mov ebp, dword [rsp + 0x78]
cmp ebp, 7
jl 0x14001925e
mov edx, ebp
mov r8d, InitCommonControls
mov ecx, edx
lea eax, [rdx + rdx]
sar ecx, 0xb
imul ecx, ecx, 0x1f25
mov edx, ecx
xor edx, eax
sub r8, r13
jne 0x1400191c6
mov edi, dword [rsp + 0x70]
shl ebp, 0xc
or ebp, edx
lea r9d, [rdi - 0xb]
mov r10d, 3
movzx eax, byte [rbx]
mov r11b, bpl
imul eax, r8d
add eax, r9d
mov ecx, eax
sar eax, 3
add eax, r13d
and ecx, 7
movsxd rdx, eax
mov eax, r13d
shl al, cl
and r11b, r13b
je 0x14001921a
or byte [rdx + rbx], al
jmp 0x14001921f
not al
and byte [rdx + rbx], al
movzx eax, byte [rbx]
imul eax, r9d
add eax, r8d
mov ecx, eax
sar eax, 3
add eax, r13d
and ecx, 7
movsxd rdx, eax
mov eax, r13d
shl al, cl
test r11b, r11b
je 0x140019246
or byte [rdx + rbx], al
jmp 0x14001924b
not al
and byte [rdx + rbx], al
sar ebp, 1
add r9d, r13d
sub r10, r13
jne 0x1400191f0
add r8d, r13d
cmp r8d, 6
jl 0x1400191e6
add rsp, 0x28
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret