Function at 0x406580
Capabilities:
Decompress data using lzo

Disassembly:
mov eax, dword [esp + 8]
push ebx
mov ebx, dword [esp + 0x14]
push ebp
push esi
mov esi, dword [esp + 0x10]
mov dword [ebx], 0
push edi
mov dl, byte [esi]
lea ebp, [esi + eax]
mov eax, dword [esp + 0x1c]
cmp dl, 0x11
mov ecx, esi
jbe 0x4065c8
and edx, 0xff
lea ecx, [esi + 1]
sub edx, 0x11
mov edi, edx
cmp edi, 4
jb 0x40667a
mov dl, byte [ecx]
mov byte [eax], dl
inc eax
inc ecx
dec edi
jne 0x4065bd
jmp 0x406634
xor edx, edx
mov dl, byte [ecx]
inc ecx
mov esi, edx
cmp esi, 0x10
jae 0x40669d
test esi, esi
jne 0x4065f8
cmp byte [ecx], 0
jne 0x4065ef
mov dl, byte [ecx + 1]
add esi, 0xff
inc ecx
test dl, dl
je 0x4065e1
xor edx, edx
mov dl, byte [ecx]
inc ecx
lea esi, [esi + edx + 0xf]
mov edx, dword [ecx]
mov dword [eax], edx
add eax, 4
add ecx, 4
dec esi
je 0x406634
cmp esi, 4
jb 0x40662b
mov edx, dword [ecx]
mov dword [eax], edx
sub esi, 4
add eax, 4
add ecx, 4
cmp esi, 4
jae 0x40660a
test esi, esi
jbe 0x406634
mov dl, byte [ecx]
mov byte [eax], dl
inc eax
inc ecx
dec esi
jne 0x406620
jmp 0x406634
mov dl, byte [ecx]
mov byte [eax], dl
inc eax
inc ecx
dec esi
jne 0x40662b
xor edx, edx
mov dl, byte [ecx]
inc ecx
mov esi, edx
cmp esi, 0x10
jae 0x40669d
xor edx, edx
mov edi, eax
mov dl, byte [ecx]
shr esi, 2
sub edi, esi
shl edx, 2
sub edi, edx
mov dl, byte [edi - 0x801]
sub edi, 0x801
inc ecx
mov byte [eax], dl
inc eax
inc edi
mov dl, byte [edi]
mov byte [eax], dl
mov dl, byte [edi + 1]
inc eax
mov byte [eax], dl
inc eax
mov dl, byte [ecx - 2]
and edx, 3
mov edi, edx
je 0x4065c8
mov dl, byte [ecx]
mov byte [eax], dl
inc eax
inc ecx
cmp edi, 1
jbe 0x406696
mov dl, byte [ecx]
mov byte [eax], dl
inc eax
inc ecx
cmp edi, 2
jbe 0x406696
mov dl, byte [ecx]
mov byte [eax], dl
inc eax
inc ecx
xor edx, edx
mov dl, byte [ecx]
inc ecx
mov esi, edx
cmp esi, 0x40
jb 0x4066d5
mov edx, esi
mov edi, eax
shr edx, 2
and edx, 7
sub edi, edx
xor edx, edx
mov dl, byte [ecx]
shl edx, 3
sub edi, edx
dec edi
inc ecx
shr esi, 5
dec esi
mov dl, byte [edi]
mov byte [eax], dl
mov dl, byte [edi + 1]
inc eax
inc edi
mov byte [eax], dl
inc eax
inc edi
mov dl, byte [edi]
mov byte [eax], dl
inc eax
inc edi
dec esi
jne 0x4066ca
jmp 0x40666c
cmp esi, 0x20
jb 0x406711
and esi, 0x1f
jne 0x4066fb
cmp byte [ecx], 0
jne 0x4066f2
mov dl, byte [ecx + 1]
add esi, 0xff
inc ecx
test dl, dl
je 0x4066e4
xor edx, edx
mov dl, byte [ecx]
inc ecx
lea esi, [esi + edx + 0x1f]
lea edi, [eax - 1]
mov dx, word [ecx]
and edx, 0xffff
shr edx, 2
sub edi, edx
add ecx, 2
jmp 0x406762
cmp esi, 0x10
jb 0x4067ad
mov edx, esi
mov edi, eax
and edx, 8
shl edx, 0xb
sub edi, edx
and esi, 7
jne 0x406747
cmp byte [ecx], 0
jne 0x40673e
mov dl, byte [ecx + 1]
add esi, 0xff
inc ecx
test dl, dl
je 0x406730
xor edx, edx
mov dl, byte [ecx]
inc ecx
lea esi, [esi + edx + 7]
mov dx, word [ecx]
and edx, 0xffff
shr edx, 2
sub edi, edx
add ecx, 2
cmp edi, eax
je 0x4067c4
sub edi, 0x4000
cmp esi, 6
jb 0x4066bd
mov edx, eax
sub edx, edi
cmp edx, 4
jl 0x4066bd
mov edx, dword [edi]
mov dword [eax], edx
add eax, 4
add edi, 4
sub esi, 2
mov edx, dword [edi]
mov dword [eax], edx
sub esi, 4
add eax, 4
add edi, 4
cmp esi, 4
jae 0x406785
test esi, esi
jbe 0x40666c
mov dl, byte [edi]
mov byte [eax], dl
inc eax
inc edi
dec esi
jne 0x40679f
jmp 0x40666c
xor edx, edx
mov edi, eax
mov dl, byte [ecx]
shr esi, 2
sub edi, esi
shl edx, 2
sub edi, edx
dec edi
inc ecx
jmp 0x406661
mov edx, dword [esp + 0x1c]
sub eax, edx
cmp ecx, ebp
mov dword [ebx], eax
jne 0x4067d7
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
sbb eax, eax
pop edi
and al, 0xfc
pop esi
pop ebp
add eax, 0xfffffffc
pop ebx
ret