Function at 0x1000b640
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
push eax
mov esi, dword [ebp + 8]
jmp 0x1000b65c
mov eax, dword [esi]
cmp dword [eax + 0x10], 0
je 0x1000ba7a
cmp dword [esi + 0x74], 0x105
ja 0x1000b68d
mov ecx, esi
call dbg.fill_window
mov eax, dword [esi + 0x74]
cmp dword [ebp + 0xc], 0
jne 0x1000b680
cmp eax, 0x106
jb 0x1000ba7a
test eax, eax
je 0x1000b94c
cmp eax, 3
jb 0x1000b6e3
mov edx, dword [esi + 0x48]
movzx ecx, byte [esi + 0x58]
shl edx, cl
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x38]
movzx ecx, byte [ecx + eax + 2]
xor ecx, edx
and ecx, dword [esi + 0x54]
mov edi, dword [esi + 0x40]
mov dword [esi + 0x48], ecx
mov edx, dword [esi + 0x44]
movzx edx, word [edx + ecx*2]
and eax, dword [esi + 0x34]
mov word [edi + eax*2], dx
movzx eax, word [esi + 0x6c]
mov ecx, dword [esi + 0x44]
mov edi, dword [esi + 0x48]
mov word [ecx + edi*2], ax
test edx, edx
je 0x1000b6e3
mov eax, dword [esi + 0x6c]
sub eax, edx
mov ecx, dword [esi + 0x2c]
mov edi, 0xfffffefa
add ecx, edi
cmp eax, ecx
jbe 0x1000b840
mov eax, dword [esi + 0x60]
cmp eax, 3
jb 0x1000b853
mov ecx, dword [esi + 0x6c]
sub ecx, dword [esi + 0x70]
mov edx, dword [esi + 0x1698]
mov edi, dword [esi + 0x16a0]
lea ebx, [edi + 1]
mov dword [esi + 0x16a0], ebx
mov byte [edx + edi], cl
mov edx, dword [esi + 0x1698]
mov edi, dword [esi + 0x16a0]
lea ebx, [edi + 1]
mov dword [esi + 0x16a0], ebx
mov byte [edx + edi], ch
mov edx, dword [esi + 0x1698]
mov edi, dword [esi + 0x16a0]
lea ebx, [edi + 1]
mov dword [esi + 0x16a0], ebx
add al, 0xfd
mov byte [edx + edi], al
movzx eax, al
mov edx, dword [0x10013e7c]
movzx eax, byte [edx + eax]
inc word [esi + eax*4 + 0x498]
dec ecx
movzx eax, cx
mov ecx, eax
shr ecx, 7
add ecx, 0x100
cmp eax, 0x100
cmovb ecx, eax
mov eax, dword [0x10013e78]
movzx eax, byte [eax + ecx]
inc word [esi + eax*4 + 0x988]
mov eax, dword [esi + 0x16a0]
mov dword [ebp - 0x10], eax
mov ebx, dword [esi + 0x16a4]
mov eax, dword [esi + 0x60]
mov ecx, dword [esi + 0x74]
sub ecx, eax
mov dword [esi + 0x74], ecx
cmp eax, dword [esi + 0x80]
ja 0x1000b800
cmp ecx, 3
jb 0x1000b800
dec eax
mov dword [esi + 0x60], eax
nop word [eax + eax]
mov edi, dword [esi + 0x6c]
lea eax, [edi + 1]
mov dword [esi + 0x6c], eax
mov edx, dword [esi + 0x48]
movzx ecx, byte [esi + 0x58]
shl edx, cl
mov ecx, dword [esi + 0x38]
movzx ecx, byte [ecx + edi + 3]
mov edi, dword [esi + 0x40]
xor ecx, edx
and ecx, dword [esi + 0x54]
mov dword [esi + 0x48], ecx
mov edx, dword [esi + 0x44]
movzx ecx, word [edx + ecx*2]
and eax, dword [esi + 0x34]
mov word [edi + eax*2], cx
movzx eax, word [esi + 0x6c]
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
mov word [ecx + edx*2], ax
dec dword [esi + 0x60]
jne 0x1000b7b0
mov eax, dword [esi + 0x6c]
inc eax
mov dword [esi + 0x6c], eax
jmp 0x1000b82a
add eax, dword [esi + 0x6c]
mov dword [esi + 0x6c], eax
mov dword [esi + 0x60], 0
mov edx, dword [esi + 0x38]
movzx edi, byte [edx + eax]
mov dword [esi + 0x48], edi
movzx ecx, byte [esi + 0x58]
shl edi, cl
movzx ecx, byte [edx + eax + 1]
xor ecx, edi
and ecx, dword [esi + 0x54]
mov dword [esi + 0x48], ecx
cmp dword [ebp - 0x10], ebx
jne 0x1000b65c
jmp 0x1000b8cb
mov ecx, esi
call dbg.longest_match
mov dword [esi + 0x60], eax
cmp eax, 3
jae 0x1000b6ef
mov eax, dword [esi + 0x38]
mov ecx, dword [esi + 0x6c]
movzx eax, byte [eax + ecx]
mov ecx, dword [esi + 0x1698]
mov edx, dword [esi + 0x16a0]
lea edi, [edx + 1]
mov dword [esi + 0x16a0], edi
mov byte [ecx + edx], 0
mov ecx, dword [esi + 0x1698]
mov edx, dword [esi + 0x16a0]
lea edi, [edx + 1]
mov dword [esi + 0x16a0], edi
mov byte [ecx + edx], 0
mov ecx, dword [esi + 0x1698]
mov edx, dword [esi + 0x16a0]
lea edi, [edx + 1]
mov dword [esi + 0x16a0], edi
mov byte [ecx + edx], al
inc word [esi + eax*4 + 0x94]
mov ecx, dword [esi + 0x16a0]
dec dword [esi + 0x74]
mov eax, dword [esi + 0x6c]
inc eax
cmp ecx, dword [esi + 0x16a4]
mov dword [esi + 0x6c], eax
jne 0x1000b65c
mov ecx, dword [esi + 0x5c]
test ecx, ecx
js 0x1000b8d9
mov edx, dword [esi + 0x38]
add edx, ecx
jmp 0x1000b8db
xor edx, edx
sub eax, ecx
push 0
push eax
push edx
push esi
call dbg._tr_flush_block
add esp, 0x10
mov edi, dword [esi]
mov eax, dword [esi + 0x6c]
mov dword [esi + 0x5c], eax
mov ebx, dword [edi + 0x1c]
push ebx
call dbg._tr_flush_bits
add esp, 4
mov dword [ebp - 0x10], ebx
mov eax, dword [ebx + 0x14]
mov ebx, dword [edi + 0x10]
cmp eax, ebx
cmovb ebx, eax
test ebx, ebx
je 0x1000b650
push ebx
mov eax, dword [ebp - 0x10]
push dword [eax + 0x10]
push dword [edi + 0xc]
call dbg.zmemcpy
add esp, 0xc
add dword [edi + 0xc], ebx
mov eax, dword [ebp - 0x10]
add dword [eax + 0x10], ebx
add dword [edi + 0x14], ebx
sub dword [edi + 0x10], ebx
sub dword [eax + 0x14], ebx
jne 0x1000b650
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + 8]
mov dword [ecx + 0x10], eax
jmp 0x1000b650
mov eax, dword [esi + 0x6c]
cmp eax, 2
mov ecx, 2
cmovb ecx, eax
mov dword [esi + 0x16b4], ecx
cmp dword [ebp + 0xc], 4
jne 0x1000b974
mov ecx, dword [esi + 0x5c]
test ecx, ecx
js 0x1000b98f
mov edx, dword [esi + 0x38]
add edx, ecx
jmp 0x1000b991
cmp dword [esi + 0x16a0], 0
je 0x1000ba73
mov ecx, dword [esi + 0x5c]
test ecx, ecx
js 0x1000ba05
mov edx, dword [esi + 0x38]
add edx, ecx
jmp 0x1000ba07
xor edx, edx
sub eax, ecx
push 1
push eax
push edx
push esi
call dbg._tr_flush_block
add esp, 0x10
mov ebx, dword [esi]
mov eax, dword [esi + 0x6c]
mov dword [esi + 0x5c], eax
mov edi, dword [ebx + 0x1c]
push edi
call dbg._tr_flush_bits
add esp, 4
mov dword [ebp - 0x10], edi
mov eax, dword [edi + 0x14]
mov edi, dword [ebx + 0x10]
cmp eax, edi
cmovb edi, eax
test edi, edi
je 0x1000b9f5
push edi
mov eax, dword [ebp - 0x10]
push dword [eax + 0x10]
push dword [ebx + 0xc]
call dbg.zmemcpy
add esp, 0xc
add dword [ebx + 0xc], edi
mov eax, dword [ebp - 0x10]
add dword [eax + 0x10], edi
add dword [ebx + 0x14], edi
sub dword [ebx + 0x10], edi
sub dword [eax + 0x14], edi
jne 0x1000b9f5
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + 8]
mov dword [ecx + 0x10], eax
mov eax, dword [esi]
cmp dword [eax + 0x10], 1
mov eax, 3
sbb eax, 0
jmp 0x1000ba7c
xor edx, edx
sub eax, ecx
push 0
push eax
push edx
push esi
call dbg._tr_flush_block
add esp, 0x10
mov ebx, dword [esi]
mov eax, dword [esi + 0x6c]
mov dword [esi + 0x5c], eax
mov edi, dword [ebx + 0x1c]
push edi
call dbg._tr_flush_bits
add esp, 4
mov dword [ebp - 0x10], edi
mov eax, dword [edi + 0x14]
mov edi, dword [ebx + 0x10]
cmp eax, edi
cmovb edi, eax
test edi, edi
je 0x1000ba6b
push edi
mov eax, dword [ebp - 0x10]
push dword [eax + 0x10]
push dword [ebx + 0xc]
call dbg.zmemcpy
add esp, 0xc
add dword [ebx + 0xc], edi
mov eax, dword [ebp - 0x10]
add dword [eax + 0x10], edi
add dword [ebx + 0x14], edi
sub dword [ebx + 0x10], edi
sub dword [eax + 0x14], edi
jne 0x1000ba6b
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + 8]
mov dword [ecx + 0x10], eax
mov eax, dword [esi]
cmp dword [eax + 0x10], 0
je 0x1000ba7a
mov eax, 1
jmp 0x1000ba7c
xor eax, eax
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret