Function at 0x409788
Capabilities:
Compress data using lzo

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x24
mov dword [ebp - 0x1c], eax
add eax, edx
mov esi, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x30], ecx
lea eax, [eax + edx - 0xd]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x1c]
add eax, 4
mov bl, byte [eax + 3]
movzx edx, byte [eax + 2]
mov edi, dword [ebp + 0xc]
mov byte [ebp - 0x18], bl
movzx ecx, byte [ebp - 0x18]
mov byte [ebp - 0x1d], dl
shl ecx, 6
xor ecx, edx
movzx edx, byte [eax + 1]
shl ecx, 5
xor ecx, edx
movzx edx, byte [eax]
shl ecx, 5
xor ecx, edx
imul ecx, ecx, 0x21
shr ecx, 5
mov dword [ebp - 0x24], ecx
and ecx, 0x3fff
mov edx, dword [edi + ecx*4]
mov ebx, ecx
cmp edx, dword [ebp - 0x1c]
jb 0x409874
mov edi, eax
sub edi, edx
mov dword [ebp - 0x14], edi
dec edi
cmp edi, 0xbffe
ja 0x409874
cmp dword [ebp - 0x14], 0x800
jbe 0x409854
mov cl, byte [ebp - 0x18]
cmp cl, byte [edx + 3]
je 0x409854
mov ecx, dword [ebp - 0x24]
mov edi, dword [ebp + 0xc]
and ecx, 0x7ff
mov ebx, ecx
xor ebx, 0x201f
mov edx, dword [edi + ebx*4]
cmp dword [ebp - 0x1c], edx
ja 0x409874
mov edi, eax
sub edi, edx
lea ecx, [edi - 1]
mov dword [ebp - 0x14], edi
cmp ecx, 0xbffe
ja 0x409874
cmp edi, 0x800
jbe 0x409854
mov cl, byte [ebp - 0x18]
cmp cl, byte [edx + 3]
jne 0x409874
mov di, word [eax]
cmp word [edx], di
jne 0x409874
mov cl, byte [ebp - 0x1d]
cmp cl, byte [edx + 2]
jne 0x409874
mov edi, dword [ebp + 0xc]
mov dword [edi + ebx*4], eax
cmp eax, esi
je 0x4098fa
jmp 0x40988d
mov edi, dword [ebp + 0xc]
lea ecx, [eax + 1]
mov dword [edi + ebx*4], eax
cmp dword [ebp - 0x2c], ecx
jbe 0x409a55
mov eax, ecx
jmp 0x4097b2
mov ecx, eax
sub ecx, esi
mov dword [ebp - 0x18], ecx
cmp ecx, 3
ja 0x4098a4
mov edi, dword [ebp - 0x10]
mov bl, byte [ebp - 0x18]
or byte [edi - 2], bl
jmp 0x4098ec
mov edi, dword [ebp - 0x10]
cmp dword [ebp - 0x18], 0x12
lea ebx, [edi + 1]
ja 0x4098bf
mov edi, ebx
mov bl, byte [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
sub ebx, 3
mov byte [ecx], bl
jmp 0x4098ec
mov edi, dword [ebp - 0x18]
sub edi, 0x12
mov ecx, edi
mov edi, dword [ebp - 0x10]
mov byte [edi], 0
lea edi, [ebx + 1]
cmp ecx, 0xff
jbe 0x4098ea
mov ebx, ecx
mov byte [edi - 1], 0
sub ebx, 0xff
mov ecx, ebx
mov ebx, edi
jmp 0x4098cd
mov byte [ebx], cl
mov ebx, dword [ebp - 0x18]
add ebx, edi
mov dword [ebp - 0x10], ebx
movsb byte es:[edi], byte [esi]
cmp edi, dword [ebp - 0x10]
jne 0x4098f4
mov bl, byte [eax + 3]
lea ecx, [eax + 4]
cmp byte [edx + 3], bl
jne 0x40993c
mov bl, byte [eax + 4]
lea ecx, [eax + 5]
cmp byte [edx + 4], bl
jne 0x40993c
mov bl, byte [eax + 5]
lea ecx, [eax + 6]
cmp byte [edx + 5], bl
jne 0x40993c
mov bl, byte [eax + 6]
lea ecx, [eax + 7]
cmp byte [edx + 6], bl
jne 0x40993c
mov bl, byte [eax + 7]
lea ecx, [eax + 8]
cmp byte [edx + 7], bl
jne 0x40993c
mov bl, byte [eax + 8]
lea ecx, [eax + 9]
cmp byte [edx + 8], bl
je 0x4099ab
dec ecx
mov edx, ecx
sub edx, eax
cmp dword [ebp - 0x14], 0x800
ja 0x409978
mov ebx, dword [ebp - 0x14]
lea eax, [edx - 1]
mov esi, dword [ebp - 0x10]
shl eax, 5
dec ebx
lea edx, [ebx*4]
shr ebx, 3
and edx, 0x1c
mov byte [esi + 1], bl
or eax, edx
mov byte [esi], al
mov eax, esi
add eax, 2
mov dword [ebp - 0x10], eax
jmp 0x409a49
mov esi, dword [ebp - 0x10]
cmp dword [ebp - 0x14], 0x4000
lea eax, [edx - 2]
lea ebx, [esi + 1]
mov esi, dword [ebp - 0x14]
ja 0x40999b
mov edi, dword [ebp - 0x10]
or eax, 0x20
dec esi
mov byte [edi], al
jmp 0x409a32
sub esi, 0x4000
mov edx, esi
shr edx, 0xb
and edx, 8
jmp 0x409a00
add edx, 9
cmp ecx, dword [ebp - 0x28]
jae 0x4099bd
mov bl, byte [ecx]
cmp byte [edx], bl
jne 0x4099bd
inc edx
inc ecx
jmp 0x4099ae
mov edx, ecx
mov esi, dword [ebp - 0x14]
sub edx, eax
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0x14], 0x4000
lea ebx, [eax + 1]
ja 0x4099ea
dec esi
cmp edx, 0x21
ja 0x4099e3
sub edx, 2
or edx, 0x20
mov byte [eax], dl
jmp 0x409a32
sub edx, 0x21
mov al, 0x20
jmp 0x409a10
sub esi, 0x4000
mov eax, esi
shr eax, 0xb
and eax, 8
cmp edx, 9
ja 0x409a0a
sub edx, 2
or edx, eax
mov eax, dword [ebp - 0x10]
or edx, 0x10
jmp 0x4099df
sub edx, 9
or eax, 0x10
mov edi, dword [ebp - 0x10]
mov byte [edi], al
lea eax, [ebx + 1]
cmp edx, 0xff
jbe 0x409a2e
mov byte [eax - 1], 0
sub edx, 0xff
mov ebx, eax
jmp 0x409a15
mov byte [ebx], dl
mov ebx, eax
lea eax, [esi*4]
mov byte [ebx], al
lea eax, [ebx + 2]
mov dword [ebp - 0x10], eax
mov eax, esi
shr eax, 6
mov byte [ebx + 1], al
cmp ecx, dword [ebp - 0x2c]
jae 0x409a57
mov esi, ecx
jmp 0x409886
mov ecx, esi
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x30]
mov dword [edx], eax
mov eax, dword [ebp - 0x28]
add esp, 0x24
pop ebx
pop esi
sub eax, ecx
pop edi
pop ebp
ret