Function at 0x1400615e0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov dword [rsp + 0x88], edx
mov rbx, rcx
mov r15d, dword [rbx + 0x9c]
nop dword [rax]
cmp r15d, 0x105
jbe 0x1400618c1
mov esi, dword [rbx + 0x94]
mov rdx, qword [rbx + 0x50]
lea eax, [rsi + 2]
mov ecx, dword [rbx + 0x80]
mov r8d, esi
and r8d, dword [rbx + 0x4c]
movzx eax, byte [rdx + rax]
mov edx, dword [rbx + 0x70]
shl edx, cl
mov rcx, qword [rbx + 0x60]
xor eax, edx
mov rdx, qword [rbx + 0x68]
and eax, dword [rbx + 0x7c]
mov dword [rbx + 0x70], eax
lea rax, [rdx + rax*2]
movzx edx, word [rax]
mov word [rcx + r8*2], dx
mov word [rax], si
test edx, edx
je 0x14006166f
mov eax, dword [rbx + 0x44]
mov ecx, esi
sub ecx, edx
sub eax, 0x106
cmp eax, ecx
jae 0x140061930
mov eax, dword [rbx + 0x88]
mov edx, dword [rbx + 0x16f4]
lea r8d, [rdx + 1]
add rdx, qword [rbx + 0x16e8]
cmp eax, 2
jbe 0x140061838
sub si, word [rbx + 0x98]
mov dword [rbx + 0x16f4], r8d
sub eax, 3
mov byte [rdx], sil
mov edx, dword [rbx + 0x16f4]
mov ecx, esi
sub esi, 1
mov r8, qword [rbx + 0x16e8]
movzx ecx, ch
mov rdi, qword [0x1400a7c00]
lea r9d, [rdx + 1]
mov dword [rbx + 0x16f4], r9d
mov byte [r8 + rdx], cl
mov edx, dword [rbx + 0x16f4]
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 [rdi + rax]
add word [rbx + rax*4 + 0x4c0], 1
cmp si, 0xff
ja 0x140061910
mov rax, qword [0x1400a7c10]
movzx esi, si
movzx eax, byte [rax + rsi]
add word [rbx + rax*4 + 0x9b0], 1
mov r15d, dword [rbx + 0x9c]
mov eax, dword [rbx + 0x88]
mov ebp, dword [rbx + 0x16f4]
mov edi, dword [rbx + 0x16f8]
mov r13d, dword [rbx + 0x94]
sub r15d, eax
mov r11, qword [rbx + 0x50]
mov ecx, dword [rbx + 0x80]
mov dword [rbx + 0x9c], r15d
mov esi, dword [rbx + 0x7c]
cmp dword [rbx + 0xa8], eax
jb 0x140061765
cmp r15d, 2
ja 0x140061948
mov dword [rbx + 0x88], 0
lea edx, [rax + r13]
mov dword [rbx + 0x94], edx
mov rax, rdx
movzx edx, byte [r11 + rdx]
add eax, 1
mov dword [rbx + 0x70], edx
movzx eax, byte [r11 + rax]
shl edx, cl
xor eax, edx
and eax, esi
mov dword [rbx + 0x70], eax
cmp ebp, edi
jne 0x140061608
mov eax, dword [rbx + 0x84]
mov r8d, dword [rbx + 0x94]
xor edx, edx
sub r8d, eax
test eax, eax
js 0x1400617ba
movsxd rdx, eax
add rdx, qword [rbx + 0x50]
xor r9d, r9d
mov rcx, rbx
call sym._tr_flush_block
mov eax, dword [rbx + 0x94]
mov rdi, qword [rbx]
mov dword [rbx + 0x84], eax
mov rbp, qword [rdi + 0x28]
mov rcx, rbp
call sym._tr_flush_bits
mov esi, dword [rbp + 0x28]
mov eax, dword [rdi + 0x18]
cmp esi, eax
cmova esi, eax
test esi, esi
je 0x14006181d
mov r12d, esi
mov rcx, qword [rdi + 0x10]
mov rdx, qword [rbp + 0x20]
mov r8, r12
call sym.memcpy
add qword [rdi + 0x10], r12
add qword [rbp + 0x20], r12
add dword [rdi + 0x1c], esi
sub dword [rdi + 0x18], esi
sub dword [rbp + 0x28], esi
jne 0x14006181d
mov rax, qword [rbp + 0x10]
mov qword [rbp + 0x20], rax
mov rax, qword [rbx]
mov ecx, dword [rax + 0x18]
test ecx, ecx
jne 0x1400615fa
xor eax, eax
jmp 0x140061adb
mov rax, qword [rbx + 0x50]
movzx eax, byte [rax + rsi]
mov dword [rbx + 0x16f4], r8d
mov byte [rdx], 0
mov edx, dword [rbx + 0x16f4]
mov rcx, qword [rbx + 0x16e8]
lea r8d, [rdx + 1]
mov dword [rbx + 0x16f4], r8d
mov byte [rcx + rdx], 0
mov edx, dword [rbx + 0x16f4]
mov rcx, qword [rbx + 0x16e8]
lea r8d, [rdx + 1]
mov dword [rbx + 0x16f4], r8d
mov byte [rcx + rdx], al
add word [rbx + rax*4 + 0xbc], 1
mov eax, dword [rbx + 0x9c]
add dword [rbx + 0x94], 1
lea r15d, [rax - 1]
mov eax, dword [rbx + 0x16f8]
mov dword [rbx + 0x9c], r15d
cmp dword [rbx + 0x16f4], eax
je 0x14006179d
cmp r15d, 0x105
ja 0x140061615
mov rcx, rbx
call sym.fill_window
mov eax, dword [rbx + 0x9c]
cmp eax, 0x105
ja 0x140061615
mov r8d, dword [rsp + 0x88]
test r8d, r8d
je 0x14006182b
test eax, eax
je 0x1400619e8
mov esi, dword [rbx + 0x94]
cmp eax, 2
jbe 0x14006166f
jmp 0x14006161b
shr si, 7
mov rax, qword [0x1400a7c10]
lea ecx, [rsi + 0x100]
and ecx, 0x3ff
movzx eax, byte [rax + rcx]
jmp 0x140061713
mov rcx, rbx
call fcn.140060750
mov dword [rbx + 0x88], eax
jmp 0x140061675
lea r9d, [rax - 1]
mov r14, qword [rbx + 0x68]
mov r10, qword [rbx + 0x60]
mov dword [rsp + 0x2c], eax
mov r12d, dword [rbx + 0x4c]
mov r8d, dword [rbx + 0x70]
mov dword [rsp + 0x24], ebp
lea edx, [r13 + 1]
mov dword [rbx + 0x88], r9d
mov rbp, r10
mov dword [rsp + 0x28], edi
mov rdi, r14
nop dword [rax]
lea r10d, [rdx + 2]
mov dword [rbx + 0x94], edx
shl r8d, cl
mov r14d, r12d
movzx r10d, byte [r11 + r10]
and r14d, edx
sub r9d, 1
xor r10d, r8d
and r10d, esi
mov dword [rbx + 0x70], r10d
mov r8d, r10d
lea r10, [rdi + r10*2]
movzx eax, word [r10]
mov word [rbp + r14*2], ax
mov word [r10], dx
add edx, 1
mov dword [rbx + 0x88], r9d
test r9d, r9d
jne 0x140061980
mov eax, dword [rsp + 0x2c]
mov ebp, dword [rsp + 0x24]
mov edi, dword [rsp + 0x28]
add r13d, eax
mov dword [rbx + 0x94], r13d
jmp 0x140061795
mov r8d, dword [rbx + 0x94]
mov eax, 2
mov r15d, dword [rsp + 0x88]
cmp r8d, eax
cmovbe eax, r8d
mov dword [rbx + 0x1708], eax
cmp r15d, 4
je 0x140061a81
mov edx, dword [rbx + 0x16f4]
mov eax, 1
test edx, edx
je 0x140061adb
mov eax, dword [rbx + 0x84]
xor edx, edx
sub r8d, eax
test eax, eax
js 0x140061a38
movsxd rdx, eax
add rdx, qword [rbx + 0x50]
xor r9d, r9d
mov rcx, rbx
call sym._tr_flush_block
mov eax, dword [rbx + 0x94]
mov rbp, qword [rbx]
mov dword [rbx + 0x84], eax
mov rdi, qword [rbp + 0x28]
mov rcx, rdi
call sym._tr_flush_bits
mov esi, dword [rdi + 0x28]
mov eax, dword [rbp + 0x18]
cmp esi, eax
cmova esi, eax
test esi, esi
jne 0x140061b1c
mov rax, qword [rbx]
mov eax, dword [rax + 0x18]
test eax, eax
setne al
movzx eax, al
jmp 0x140061adb
mov eax, dword [rbx + 0x84]
xor edx, edx
sub r8d, eax
test eax, eax
js 0x140061a97
movsxd rdx, eax
add rdx, qword [rbx + 0x50]
mov r9d, 1
mov rcx, rbx
call sym._tr_flush_block
mov eax, dword [rbx + 0x94]
mov rdi, qword [rbx]
mov dword [rbx + 0x84], eax
mov rbp, qword [rdi + 0x28]
mov rcx, rbp
call sym._tr_flush_bits
mov esi, dword [rbp + 0x28]
mov eax, dword [rdi + 0x18]
cmp esi, eax
cmova esi, eax
test esi, esi
jne 0x140061aec
mov rax, qword [rbx]
cmp dword [rax + 0x18], 1
sbb eax, eax
add eax, 3
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r12d, esi
mov rcx, qword [rdi + 0x10]
mov rdx, qword [rbp + 0x20]
mov r8, r12
call sym.memcpy
add qword [rdi + 0x10], r12
add qword [rbp + 0x20], r12
add dword [rdi + 0x1c], esi
sub dword [rdi + 0x18], esi
sub dword [rbp + 0x28], esi
jne 0x140061acf
mov rax, qword [rbp + 0x10]
mov qword [rbp + 0x20], rax
jmp 0x140061acf
mov r12d, esi
mov rcx, qword [rbp + 0x10]
mov rdx, qword [rdi + 0x20]
mov r8, r12
call sym.memcpy
add qword [rbp + 0x10], r12
add qword [rdi + 0x20], r12
add dword [rbp + 0x1c], esi
sub dword [rbp + 0x18], esi
sub dword [rdi + 0x28], esi
jne 0x140061a71
mov rax, qword [rdi + 0x10]
mov qword [rdi + 0x20], rax
jmp 0x140061a71