Function at 0x6c287740
Capabilities:
Encode data using xor

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rdi, qword [sym.libMonoPosixHelper.dll__dist_code]
mov rsi, qword [sym.libMonoPosixHelper.dll__length_code]
mov rbx, rcx
mov r12d, edx
mov rbp, rdi
cmp dword [rbx + 0x9c], 0x105
jbe 0x6c287970
mov r8d, dword [rbx + 0x94]
mov rdx, qword [rbx + 0x50]
mov ecx, dword [rbx + 0x80]
lea eax, [r8 + 2]
and r8d, dword [rbx + 0x4c]
movzx eax, byte [rdx + rax]
mov edx, dword [rbx + 0x70]
shl edx, cl
xor eax, edx
and eax, dword [rbx + 0x7c]
mov rdx, qword [rbx + 0x68]
mov dword [rbx + 0x70], eax
movzx edx, word [rdx + rax*2]
mov rax, qword [rbx + 0x60]
mov word [rax + r8*2], dx
mov ecx, dword [rbx + 0x70]
test edx, edx
mov rax, qword [rbx + 0x68]
mov r8d, dword [rbx + 0x94]
mov word [rax + rcx*2], r8w
je 0x6c28799f
mov ecx, dword [rbx + 0x94]
mov eax, dword [rbx + 0x44]
sub eax, 0x106
mov r8d, ecx
sub r8d, edx
cmp r8d, eax
jbe 0x6c287a80
mov eax, dword [rbx + 0x88]
cmp eax, 2
jbe 0x6c2879b4
sub cx, word [rbx + 0x98]
mov r8d, dword [rbx + 0x16f4]
sub eax, 3
mov rdx, qword [rbx + 0x16f8]
mov word [rdx + r8*2], cx
mov edx, dword [rbx + 0x16f4]
sub ecx, 1
mov r8, qword [rbx + 0x16e8]
lea r9d, [rdx + 1]
mov dword [rbx + 0x16f4], r9d
mov byte [r8 + rdx], al
movzx eax, al
movzx eax, byte [rsi + rax]
add word [rbx + rax*4 + 0x4c0], 1
cmp cx, 0xff
ja 0x6c287a60
movzx ecx, cx
movzx eax, byte [rbp + rcx]
add word [rbx + rax*4 + 0x9b0], 1
xor r8d, r8d
mov eax, dword [rbx + 0x16f0]
mov edx, dword [rbx + 0x9c]
sub eax, 1
cmp eax, dword [rbx + 0x16f4]
mov eax, dword [rbx + 0x88]
sete r8b
sub edx, eax
cmp eax, dword [rbx + 0xa8]
mov dword [rbx + 0x9c], edx
ja 0x6c287a20
cmp edx, 2
jbe 0x6c287a20
sub eax, 1
mov dword [rbx + 0x88], eax
mov eax, dword [rbx + 0x94]
mov rcx, qword [rbx + 0x50]
mov r10d, dword [rbx + 0x70]
lea edx, [rax + 1]
add eax, 3
mov dword [rbx + 0x94], edx
movzx eax, byte [rcx + rax]
mov ecx, dword [rbx + 0x80]
and edx, dword [rbx + 0x4c]
shl r10d, cl
mov rcx, qword [rbx + 0x68]
xor eax, r10d
and eax, dword [rbx + 0x7c]
mov dword [rbx + 0x70], eax
movzx ecx, word [rcx + rax*2]
mov rax, qword [rbx + 0x60]
mov word [rax + rdx*2], cx
mov edx, dword [rbx + 0x70]
mov rax, qword [rbx + 0x68]
mov ecx, dword [rbx + 0x94]
mov word [rax + rdx*2], cx
sub dword [rbx + 0x88], 1
jne 0x6c2878a3
add dword [rbx + 0x94], 1
test r8d, r8d
je 0x6c287761
movsxd rax, dword [rbx + 0x84]
mov r8d, dword [rbx + 0x94]
xor edx, edx
sub r8d, eax
test eax, eax
js 0x6c28792e
add rax, qword [rbx + 0x50]
mov rdx, rax
xor r9d, r9d
mov rcx, rbx
call dbg._tr_flush_block
mov eax, dword [rbx + 0x94]
mov rcx, qword [rbx]
mov dword [rbx + 0x84], eax
call dbg.flush_pending
mov rax, qword [rbx]
mov edx, dword [rax + 0x18]
test edx, edx
jne 0x6c287761
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, rbx
call dbg.fill_window
mov eax, dword [rbx + 0x9c]
cmp eax, 0x105
ja 0x6c287771
test r12d, r12d
je 0x6c28795b
test eax, eax
je 0x6c287a99
cmp eax, 2
ja 0x6c287771
mov eax, dword [rbx + 0x88]
mov ecx, dword [rbx + 0x94]
cmp eax, 2
ja 0x6c2877f3
mov rax, qword [rbx + 0x50]
mov rdx, qword [rbx + 0x16f8]
xor r8d, r8d
movzx eax, byte [rax + rcx]
mov ecx, dword [rbx + 0x16f4]
mov word [rdx + rcx*2], r8w
mov edx, dword [rbx + 0x16f4]
mov rcx, qword [rbx + 0x16e8]
lea r8d, [rdx + 1]
mov dword [rbx + 0x16f4], r8d
mov byte [rcx + rdx], al
xor r8d, r8d
add word [rbx + rax*4 + 0xbc], 1
mov eax, dword [rbx + 0x16f0]
sub eax, 1
cmp eax, dword [rbx + 0x16f4]
sete r8b
sub dword [rbx + 0x9c], 1
jmp 0x6c287900
add eax, dword [rbx + 0x94]
mov rcx, qword [rbx + 0x50]
mov dword [rbx + 0x88], 0
mov edx, eax
mov dword [rbx + 0x94], eax
add eax, 1
movzx edx, byte [rcx + rdx]
mov dword [rbx + 0x70], edx
movzx eax, byte [rcx + rax]
mov ecx, dword [rbx + 0x80]
shl edx, cl
xor eax, edx
and eax, dword [rbx + 0x7c]
mov dword [rbx + 0x70], eax
jmp 0x6c287907
shr cx, 7
lea rax, [rcx + 0x100]
and eax, 0x3ff
movzx eax, byte [rdi + rax]
jmp 0x6c287852
mov rcx, rbx
call dbg.longest_match
mov ecx, dword [rbx + 0x94]
mov dword [rbx + 0x88], eax
jmp 0x6c2877ea
movsxd rax, dword [rbx + 0x84]
mov r8d, dword [rbx + 0x94]
xor r9d, r9d
cmp r12d, 4
sete r9b
xor edx, edx
sub r8d, eax
test eax, eax
js 0x6c287ac2
add rax, qword [rbx + 0x50]
mov rdx, rax
mov rcx, rbx
call dbg._tr_flush_block
mov eax, dword [rbx + 0x94]
mov rcx, qword [rbx]
mov dword [rbx + 0x84], eax
call dbg.flush_pending
mov rax, qword [rbx]
mov eax, dword [rax + 0x18]
test eax, eax
jne 0x6c287b02
cmp r12d, 4
mov eax, 2
jne 0x6c28795b
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
xor eax, eax
cmp r12d, 4
sete al
lea eax, [rax + rax + 1]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret