Function at 0x404500
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov edi, dword [ebp + 8]
mov dword [ebp - 0x10], 0
mov eax, dword [edi + 0x74]
mov dword [ebp - 0x34], eax
lea esi, [esi]
cmp dword [ebp - 0x34], 0x105
jbe 0x404781
cmp dword [ebp - 0x34], 2
jbe 0x404820
mov eax, dword [edi + 0x48]
mov ecx, dword [edi + 0x58]
mov esi, dword [edi + 0x6c]
mov edx, dword [edi + 0x54]
shl eax, cl
mov ecx, dword [edi + 0x38]
mov dword [ebp - 0x30], esi
movzx ebx, byte [ecx + esi + 2]
mov ecx, dword [edi + 0x34]
and esi, ecx
mov ecx, dword [edi + 0x44]
xor eax, ebx
and eax, edx
mov dword [edi + 0x48], eax
mov ebx, dword [edi + 0x40]
movzx edx, word [ecx + eax*2]
mov word [ebx + esi*2], dx
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0x10], edx
mov word [ecx + eax*2], si
mov esi, dword [ebp - 0x10]
test esi, esi
je 0x4045b0
mov ecx, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x10]
mov edx, dword [edi + 0x2c]
sub ecx, ebx
sub edx, 0x106
cmp ecx, edx
ja 0x4045b0
mov edx, dword [edi + 0x88]
lea eax, [edx - 2]
cmp eax, 1
ja 0x404957
cmp edx, 3
je 0x40496f
nop
lea esi, [esi]
mov eax, dword [edi + 0x60]
cmp eax, 2
jbe 0x404830
mov edx, dword [edi + 0x70]
mov bl, al
mov ecx, dword [edi + 0x16a0]
sub dword [ebp - 0x30], edx
sub bl, 3
mov eax, dword [edi + 0x16a4]
mov esi, dword [edi + 0x1698]
movzx edx, word [ebp - 0x30]
mov word [eax + ecx*2], dx
dec edx
movzx eax, bl
mov byte [ecx + esi], bl
movzx ecx, dx
movzx edx, byte [eax + 0x40dfa0]
inc dword [edi + 0x16a0]
movzx esi, word [edi + edx*4 + 0x498]
inc esi
cmp cx, 0xff
mov word [edi + edx*4 + 0x498], si
ja 0x4048d0
movzx eax, byte [ecx + 0x40e0a0]
cmp cx, 0xff
lea edx, [eax*4 + 0x980]
ja 0x4048ee
movzx eax, byte [ecx + 0x40e0a0]
lea esi, [eax*4 + 0x980]
movzx ebx, word [esi + edi + 8]
inc ebx
mov word [edx + edi + 8], bx
mov eax, dword [edi + 0x169c]
dec eax
cmp dword [edi + 0x16a0], eax
mov eax, dword [edi + 0x60]
sete cl
movzx esi, cl
mov ecx, dword [edi + 0x74]
mov dword [ebp - 0x14], esi
sub ecx, eax
cmp eax, dword [edi + 0x80]
mov dword [ebp - 0x34], ecx
mov dword [edi + 0x74], ecx
ja 0x404898
cmp ecx, 2
jbe 0x404898
mov ecx, dword [edi + 0x48]
dec eax
mov edx, dword [edi + 0x58]
mov dword [edi + 0x60], eax
mov ebx, dword [edi + 0x38]
mov esi, dword [edi + 0x54]
mov dword [ebp - 0x38], ecx
mov eax, dword [edi + 0x34]
mov ecx, dword [edi + 0x40]
mov dword [ebp - 0x2c], edx
mov edx, dword [edi + 0x44]
mov dword [ebp - 0x1c], ebx
mov ebx, dword [edi + 0x6c]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], edx
movzx ecx, byte [ebp - 0x2c]
lea eax, [ebx + 1]
mov edx, dword [ebp - 0x1c]
mov dword [edi + 0x6c], eax
mov esi, ebx
mov ebx, eax
shl dword [ebp - 0x38], cl
mov ecx, dword [ebp - 0x38]
movzx eax, byte [edx + eax + 2]
mov edx, dword [ebp - 0x28]
xor eax, ecx
mov ecx, dword [ebp - 0x18]
and eax, edx
mov dword [ebp - 0x38], eax
mov dword [edi + 0x48], eax
and ecx, ebx
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x3c]
movzx eax, word [ecx + eax*2]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x10], eax
mov word [ecx + edx*2], ax
mov eax, dword [edi + 0x60]
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x24]
dec eax
test eax, eax
mov word [edx + ecx*2], bx
mov dword [edi + 0x60], eax
jne 0x4046b0
lea ebx, [esi + 2]
lea esi, [esi]
mov dword [edi + 0x6c], ebx
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x404520
xor edx, edx
mov dword [esp + 0xc], edx
mov eax, dword [edi + 0x5c]
xor edx, edx
sub ebx, eax
test eax, eax
mov dword [esp + 8], ebx
js 0x404738
mov edx, dword [edi + 0x38]
add edx, eax
mov dword [esp + 4], edx
mov dword [esp], edi
call sym.__tr_flush_block
mov ebx, dword [edi]
mov eax, dword [edi + 0x6c]
mov ecx, dword [ebx + 0x1c]
mov dword [edi + 0x5c], eax
mov eax, dword [ebx + 0x10]
mov esi, dword [ecx + 0x14]
cmp eax, esi
jae 0x40475b
mov esi, eax
test esi, esi
jne 0x404900
mov ecx, dword [ebx + 0x10]
test ecx, ecx
je 0x404946
mov edx, dword [edi + 0x74]
mov dword [ebp - 0x34], edx
cmp dword [ebp - 0x34], 0x105
ja 0x40452d
mov eax, edi
call sym._fill_window
mov ecx, dword [edi + 0x74]
cmp ecx, 0x105
setbe bl
mov dword [ebp - 0x34], ecx
xor eax, eax
cmp dword [ebp + 0xc], 0
sete al
test ebx, eax
jne 0x404946
test ecx, ecx
jne 0x40452d
xor edx, edx
cmp dword [ebp + 0xc], 4
sete dl
xor eax, eax
mov dword [esp + 0xc], edx
mov edx, dword [edi + 0x5c]
mov ebx, dword [edi + 0x6c]
sub ebx, edx
test edx, edx
mov dword [esp + 8], ebx
js 0x4047d4
mov eax, dword [edi + 0x38]
add eax, edx
mov dword [esp + 4], eax
mov dword [esp], edi
call sym.__tr_flush_block
mov ebx, dword [edi]
mov eax, dword [edi + 0x6c]
mov ecx, dword [ebx + 0x1c]
mov dword [edi + 0x5c], eax
mov eax, dword [ebx + 0x10]
mov esi, dword [ecx + 0x14]
cmp eax, esi
jae 0x4047f7
mov esi, eax
test esi, esi
jne 0x404a49
mov edi, dword [ebx + 0x10]
test edi, edi
jne 0x404a30
xor eax, eax
cmp dword [ebp + 0xc], 4
sete al
add esp, 0x4c
pop ebx
add eax, eax
pop esi
pop edi
pop ebp
ret
mov eax, dword [edi + 0x6c]
mov dword [ebp - 0x30], eax
jmp 0x404574
mov ebx, dword [edi + 0x38]
mov esi, dword [ebp - 0x30]
mov edx, dword [edi + 0x16a0]
mov eax, dword [edi + 0x16a4]
movzx ecx, byte [esi + ebx]
mov esi, dword [edi + 0x1698]
mov word [eax + edx*2], 0
movzx ebx, cl
mov byte [edx + esi], cl
inc dword [edi + 0x16a0]
movzx ecx, word [edi + ebx*4 + 0x94]
inc ecx
mov word [edi + ebx*4 + 0x94], cx
mov eax, dword [edi + 0x169c]
mov ebx, dword [edi + 0x74]
dec eax
cmp dword [edi + 0x16a0], eax
sete dl
dec ebx
mov dword [ebp - 0x34], ebx
movzx esi, dl
mov dword [edi + 0x74], ebx
mov ebx, dword [edi + 0x6c]
mov dword [ebp - 0x14], esi
inc ebx
jmp 0x404710
mov dword [edi + 0x60], 0
mov ebx, dword [edi + 0x6c]
mov ecx, dword [edi + 0x58]
mov edx, dword [edi + 0x54]
add ebx, eax
mov eax, dword [edi + 0x38]
mov dword [edi + 0x6c], ebx
movzx esi, byte [ebx + eax]
mov dword [edi + 0x48], esi
shl esi, cl
movzx ecx, byte [eax + ebx + 1]
xor esi, ecx
and esi, edx
mov dword [edi + 0x48], esi
jmp 0x404713
mov ebx, ecx
shr ebx, 7
cmp cx, 0xff
movzx eax, byte [ebx + 0x40e1a0]
lea edx, [eax*4 + 0x980]
jbe 0x40462d
shr ecx, 7
movzx eax, byte [ecx + 0x40e1a0]
jmp 0x404634
mov edx, dword [ebx + 0xc]
mov eax, dword [ecx + 0x10]
mov dword [esp + 8], esi
mov dword [esp], edx
mov dword [esp + 4], eax
call sym._memcpy
sub dword [ebx + 0x10], esi
mov edx, dword [ebx + 0x1c]
add dword [ebx + 0xc], esi
add dword [ebx + 0x14], esi
mov ebx, dword [edx + 0x14]
mov ecx, dword [edx + 0x10]
sub ebx, esi
add ecx, esi
test ebx, ebx
mov dword [edx + 0x14], ebx
jne 0x404950
mov esi, dword [edx + 8]
mov ebx, dword [edi]
mov dword [edx + 0x10], esi
mov ecx, dword [ebx + 0x10]
test ecx, ecx
jne 0x40476e
xor eax, eax
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [edx + 0x10], ecx
mov ebx, dword [edi]
jmp 0x40493b
mov edx, dword [ebp - 0x10]
mov eax, edi
call sym._longest_match
mov dword [edi + 0x60], eax
mov ecx, dword [edi + 0x6c]
mov dword [ebp - 0x30], ecx
jmp 0x4045b0
dec ecx
jne 0x4045b0
mov eax, dword [edi + 0x38]
mov ebx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x10]
lea edx, [eax + ebx]
lea ecx, [eax + esi]
movzx eax, byte [edx]
lea ebx, [edx + 0x102]
cmp byte [ecx], al
je 0x40499f
mov eax, 2
mov dword [edi + 0x60], eax
jmp 0x4045b0
movzx eax, byte [edx + 1]
cmp byte [ecx + 1], al
jne 0x404992
add edx, 2
add ecx, 2
movzx eax, byte [ecx + 1]
inc edx
cmp byte [edx], al
jne 0x4049fc
movzx eax, byte [ecx + 2]
inc edx
cmp byte [edx], al
jne 0x4049fc
movzx eax, byte [ecx + 3]
inc edx
cmp byte [edx], al
jne 0x4049fc
movzx eax, byte [ecx + 4]
inc edx
cmp byte [edx], al
jne 0x4049fc
movzx eax, byte [ecx + 5]
inc edx
cmp byte [edx], al
jne 0x4049fc
movzx eax, byte [ecx + 6]
inc edx
cmp byte [edx], al
jne 0x4049fc
movzx eax, byte [ecx + 7]
inc edx
cmp byte [edx], al
jne 0x4049fc
add ecx, 8
inc edx
movzx eax, byte [ecx]
cmp byte [edx], al
jne 0x4049fc
cmp edx, ebx
jb 0x4049ae
sub ebx, edx
mov edx, 0x102
sub edx, ebx
cmp edx, 2
mov eax, 2
jle 0x404997
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x10]
cmp eax, edx
mov dword [edi + 0x70], ecx
jbe 0x404997
mov eax, edx
mov dword [edi + 0x60], eax
jmp 0x4045b0
cmp dword [ebp + 0xc], 4
mov eax, 3
je 0x404948
mov eax, 1
jmp 0x404948
mov edx, dword [ebx + 0xc]
mov eax, dword [ecx + 0x10]
mov dword [esp + 8], esi
mov dword [esp], edx
mov dword [esp + 4], eax
call sym._memcpy
sub dword [ebx + 0x10], esi
mov edx, dword [ebx + 0x1c]
add dword [ebx + 0xc], esi
add dword [ebx + 0x14], esi
mov ebx, dword [edx + 0x14]
mov ecx, dword [edx + 0x10]
sub ebx, esi
add ecx, esi
test ebx, ebx
mov dword [edx + 0x14], ebx
jne 0x404a89
mov esi, dword [edx + 8]
mov ebx, dword [edi]
mov dword [edx + 0x10], esi
jmp 0x4047ff
mov dword [edx + 0x10], ecx
mov ebx, dword [edi]
jmp 0x4047ff