Function at 0x410560
Capabilities:
Compress data using lzo

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
lea ecx, [edi + eax]
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], ecx
add edi, 4
jmp 0x410580
movzx eax, byte [edi + 3]
movzx edx, byte [edi + 2]
movzx ecx, byte [edi + 1]
shl eax, 6
xor eax, edx
movzx edx, byte [edi]
shl eax, 5
xor eax, ecx
shl eax, 5
xor eax, edx
mov edx, dword [ebp + 0x14]
mov ecx, eax
shl ecx, 5
add eax, ecx
shr eax, 5
and eax, 0x3fff
mov ebx, dword [edx + eax*4]
lea edx, [edx + eax*4]
mov dword [ebp - 0xc], edx
cmp ebx, dword [ebp + 8]
jb 0x410842
mov ecx, edi
sub ecx, ebx
mov dword [ebp - 4], ecx
je 0x410842
cmp ecx, 0xbfff
ja 0x410842
cmp ecx, 0x800
jbe 0x41063a
mov dl, byte [edi + 3]
cmp byte [ebx + 3], dl
je 0x410637
mov ecx, dword [ebp + 0x14]
and eax, 0x7ff
xor eax, 0x201f
mov ebx, dword [ecx + eax*4]
lea edx, [ecx + eax*4]
cmp ebx, dword [ebp + 8]
jb 0x410842
mov eax, edi
sub eax, ebx
mov dword [ebp - 4], eax
je 0x410842
cmp eax, 0xbfff
ja 0x410842
cmp eax, 0x800
jbe 0x410632
mov al, byte [edi + 3]
cmp byte [ebx + 3], al
jne 0x410842
mov ecx, dword [ebp - 4]
jmp 0x41063a
mov edx, dword [ebp - 0xc]
mov ax, word [ebx]
cmp ax, word [edi]
jne 0x410842
mov al, byte [edi + 2]
cmp byte [ebx + 2], al
jne 0x410842
mov eax, edi
sub eax, dword [ebp - 8]
mov dword [edx], edi
je 0x4106d4
mov dword [ebp - 0x18], eax
cmp eax, 3
ja 0x410668
or byte [esi - 2], al
jmp 0x4106c6
cmp eax, 0x12
ja 0x410672
lea edx, [eax - 3]
jmp 0x4106c3
lea edx, [eax - 0x12]
mov byte [esi], 0
inc esi
mov dword [ebp - 0xc], edx
cmp edx, 0xff
jbe 0x4106c0
mov ecx, edx
lea ecx, [ecx - 0x100]
mov eax, 0x80808081
mul ecx
shr edx, 7
inc edx
push edx
push 0
push esi
mov dword [ebp - 0x14], edx
call fcn.004a52a0
mov eax, dword [ebp - 0x14]
add esp, 0xc
add esi, eax
jmp 0x4106b0
sub dword [ebp - 0xc], 0xff
dec eax
jne 0x4106b0
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
mov dl, byte [ebp - 0xc]
mov byte [esi], dl
inc esi
mov edx, dword [ebp - 8]
mov dl, byte [edx]
inc dword [ebp - 8]
mov byte [esi], dl
inc esi
dec eax
jne 0x4106c6
mov al, byte [edi + 3]
add edi, 4
cmp byte [ebx + 3], al
jne 0x4107d3
mov dl, byte [edi]
inc edi
cmp byte [ebx + 4], dl
jne 0x4107d3
mov al, byte [edi]
inc edi
cmp byte [ebx + 5], al
jne 0x4107d3
mov dl, byte [edi]
inc edi
cmp byte [ebx + 6], dl
jne 0x4107d3
mov al, byte [edi]
inc edi
cmp byte [ebx + 7], al
jne 0x4107d3
mov dl, byte [edi]
inc edi
cmp byte [ebx + 8], dl
jne 0x4107d3
mov eax, dword [ebp - 0x10]
add ebx, 9
cmp edi, eax
jae 0x41073c
lea esp, [esp]
mov cl, byte [ebx]
cmp cl, byte [edi]
jne 0x41073c
inc edi
inc ebx
cmp edi, eax
jb 0x410730
mov eax, dword [ebp - 4]
mov ebx, edi
sub ebx, dword [ebp - 8]
cmp eax, 0x4000
ja 0x41076b
dec eax
mov dword [ebp - 4], eax
cmp ebx, 0x21
ja 0x410763
sub bl, 2
or bl, 0x20
mov byte [esi], bl
mov ecx, eax
jmp 0x41082b
sub ebx, 0x21
mov byte [esi], 0x20
jmp 0x410795
sub eax, 0x4000
mov dword [ebp - 4], eax
shr eax, 0xb
and al, 8
cmp ebx, 9
ja 0x41078e
mov ecx, dword [ebp - 4]
sub bl, 2
or al, bl
or al, 0x10
mov byte [esi], al
jmp 0x41082b
sub ebx, 9
or al, 0x10
mov byte [esi], al
inc esi
cmp ebx, 0xff
jbe 0x4107cc
lea edx, [ebx - 0x100]
mov eax, 0x80808081
mul edx
shr edx, 7
inc edx
push edx
push 0
push esi
mov dword [ebp - 0x18], edx
call fcn.004a52a0
mov eax, dword [ebp - 0x18]
add esp, 0xc
add esi, eax
sub ebx, 0xff
dec eax
jne 0x4107c3
mov ecx, dword [ebp - 4]
mov byte [esi], bl
jmp 0x41082b
dec edi
mov eax, edi
sub eax, dword [ebp - 8]
cmp ecx, 0x800
ja 0x410805
dec al
add al, al
dec ecx
add al, al
add al, al
mov dl, cl
and dl, 7
or al, dl
add al, al
add al, al
shr ecx, 3
mov byte [esi], al
mov byte [esi + 1], cl
add esi, 2
mov dword [ebp - 8], edi
jmp 0x410845
sub al, 2
cmp ecx, 0x4000
ja 0x410816
dec ecx
or al, 0x20
mov byte [esi], al
jmp 0x41082b
sub ecx, 0x4000
mov edx, ecx
shr edx, 0xb
and dl, 8
or dl, al
or dl, 0x10
mov byte [esi], dl
mov al, cl
add al, al
inc esi
add al, al
shr ecx, 6
mov byte [esi], al
mov byte [esi + 1], cl
add esi, 2
mov dword [ebp - 8], edi
jmp 0x410845
mov dword [edx], edi
inc edi
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff3
cmp edi, eax
jb 0x410580
sub esi, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 8]
pop edi
mov dword [ecx], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret