Function at 0x40c990
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 0x40c9b0
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 0x40cc72
mov ecx, edi
sub ecx, ebx
mov dword [ebp - 4], ecx
je 0x40cc72
cmp ecx, 0xbfff
ja 0x40cc72
cmp ecx, 0x800
jbe 0x40ca6a
mov dl, byte [edi + 3]
cmp byte [ebx + 3], dl
je 0x40ca67
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 0x40cc72
mov eax, edi
sub eax, ebx
mov dword [ebp - 4], eax
je 0x40cc72
cmp eax, 0xbfff
ja 0x40cc72
cmp eax, 0x800
jbe 0x40ca62
mov al, byte [edi + 3]
cmp byte [ebx + 3], al
jne 0x40cc72
mov ecx, dword [ebp - 4]
jmp 0x40ca6a
mov edx, dword [ebp - 0xc]
mov ax, word [ebx]
cmp ax, word [edi]
jne 0x40cc72
mov al, byte [edi + 2]
cmp byte [ebx + 2], al
jne 0x40cc72
mov eax, edi
sub eax, dword [ebp - 8]
mov dword [edx], edi
je 0x40cb04
mov dword [ebp - 0x18], eax
cmp eax, 3
ja 0x40ca98
or byte [esi - 2], al
jmp 0x40caf6
cmp eax, 0x12
ja 0x40caa2
lea edx, [eax - 3]
jmp 0x40caf3
lea edx, [eax - 0x12]
mov byte [esi], 0
inc esi
mov dword [ebp - 0xc], edx
cmp edx, 0xff
jbe 0x40caf0
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.004b2d10
mov eax, dword [ebp - 0x14]
add esp, 0xc
add esi, eax
jmp 0x40cae0
sub dword [ebp - 0xc], 0xff
dec eax
jne 0x40cae0
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 0x40caf6
mov al, byte [edi + 3]
add edi, 4
cmp byte [ebx + 3], al
jne 0x40cc03
mov dl, byte [edi]
inc edi
cmp byte [ebx + 4], dl
jne 0x40cc03
mov al, byte [edi]
inc edi
cmp byte [ebx + 5], al
jne 0x40cc03
mov dl, byte [edi]
inc edi
cmp byte [ebx + 6], dl
jne 0x40cc03
mov al, byte [edi]
inc edi
cmp byte [ebx + 7], al
jne 0x40cc03
mov dl, byte [edi]
inc edi
cmp byte [ebx + 8], dl
jne 0x40cc03
mov eax, dword [ebp - 0x10]
add ebx, 9
cmp edi, eax
jae 0x40cb6c
lea esp, [esp]
mov cl, byte [ebx]
cmp cl, byte [edi]
jne 0x40cb6c
inc edi
inc ebx
cmp edi, eax
jb 0x40cb60
mov eax, dword [ebp - 4]
mov ebx, edi
sub ebx, dword [ebp - 8]
cmp eax, 0x4000
ja 0x40cb9b
dec eax
mov dword [ebp - 4], eax
cmp ebx, 0x21
ja 0x40cb93
sub bl, 2
or bl, 0x20
mov byte [esi], bl
mov ecx, eax
jmp 0x40cc5b
sub ebx, 0x21
mov byte [esi], 0x20
jmp 0x40cbc5
sub eax, 0x4000
mov dword [ebp - 4], eax
shr eax, 0xb
and al, 8
cmp ebx, 9
ja 0x40cbbe
mov ecx, dword [ebp - 4]
sub bl, 2
or al, bl
or al, 0x10
mov byte [esi], al
jmp 0x40cc5b
sub ebx, 9
or al, 0x10
mov byte [esi], al
inc esi
cmp ebx, 0xff
jbe 0x40cbfc
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.004b2d10
mov eax, dword [ebp - 0x18]
add esp, 0xc
add esi, eax
sub ebx, 0xff
dec eax
jne 0x40cbf3
mov ecx, dword [ebp - 4]
mov byte [esi], bl
jmp 0x40cc5b
dec edi
mov eax, edi
sub eax, dword [ebp - 8]
cmp ecx, 0x800
ja 0x40cc35
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 0x40cc75
sub al, 2
cmp ecx, 0x4000
ja 0x40cc46
dec ecx
or al, 0x20
mov byte [esi], al
jmp 0x40cc5b
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 0x40cc75
mov dword [edx], edi
inc edi
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff3
cmp edi, eax
jb 0x40c9b0
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