Function at 0x4f61e0
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov edx, dword [ebp + 8]
push ebx
push esi
mov ecx, dword [ebp - 0x10]
mov al, byte [edx]
push edi
mov edi, dword [ebp + 0xc]
xor esi, esi
xor ebx, ebx
mov dword [ebp - 4], esi
mov byte [edi], al
inc edi
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], edi
inc edx
mov eax, esi
dec esi
test eax, eax
jne 0x4f6216
xor ecx, ecx
mov esi, 7
mov cl, byte [edx]
inc edx
mov eax, ecx
shr eax, 7
and eax, 1
shl ecx, 1
test eax, eax
je 0x4f6463
mov eax, esi
dec esi
test eax, eax
jne 0x4f6239
xor ecx, ecx
mov esi, 7
mov cl, byte [edx]
inc edx
mov eax, ecx
shr eax, 7
and eax, 1
shl ecx, 1
test eax, eax
je 0x4f630e
mov eax, esi
dec esi
test eax, eax
jne 0x4f625c
xor ecx, ecx
mov esi, 7
mov cl, byte [edx]
inc edx
mov eax, ecx
shr eax, 7
and eax, 1
shl ecx, 1
test eax, eax
je 0x4f62ba
xor eax, eax
mov ebx, 4
mov edi, esi
dec esi
test edi, edi
jne 0x4f6282
xor ecx, ecx
mov esi, 7
mov cl, byte [edx]
inc edx
mov edi, ecx
shr edi, 7
and edi, 1
shl ecx, 1
dec ebx
lea eax, [edi + eax*2]
jne 0x4f6271
test eax, eax
je 0x4f62ab
mov edi, dword [ebp - 0x14]
mov ebx, edi
sub ebx, eax
inc edi
mov dword [ebp - 0x14], edi
mov al, byte [ebx]
mov byte [edi - 1], al
jmp 0x4f646f
mov eax, dword [ebp - 0x14]
mov byte [eax], 0
inc eax
mov dword [ebp - 0x14], eax
jmp 0x4f646f
xor eax, eax
mov al, byte [edx]
inc edx
mov edi, eax
and edi, 1
add edi, 2
shr eax, 1
je 0x4f62fa
test edi, edi
je 0x4f6301
mov dword [ebp + 8], edi
mov edi, dword [ebp - 0x14]
sub edi, eax
mov bl, byte [edi]
mov edi, dword [ebp - 0x14]
mov byte [edi], bl
mov ebx, edi
mov edi, dword [ebp + 8]
inc ebx
dec edi
mov dword [ebp - 0x14], ebx
mov dword [ebp + 8], edi
jne 0x4f62d2
mov dword [ebp - 4], eax
mov ebx, 1
jmp 0x4f6471
mov dword [ebp - 8], 1
mov dword [ebp - 4], eax
mov ebx, 1
jmp 0x4f6471
mov eax, 1
mov edi, esi
dec esi
test edi, edi
jne 0x4f6324
xor ecx, ecx
mov esi, 7
mov cl, byte [edx]
inc edx
mov edi, ecx
shr edi, 7
and edi, 1
shl ecx, 1
lea eax, [edi + eax*2]
mov edi, esi
dec esi
test edi, edi
jne 0x4f6342
xor ecx, ecx
mov esi, 7
mov cl, byte [edx]
inc edx
mov edi, ecx
shr edi, 7
and edi, 1
shl ecx, 1
test edi, edi
jne 0x4f6313
test ebx, ebx
jne 0x4f63c6
cmp eax, 2
jne 0x4f63c1
mov eax, 1
mov edi, esi
dec esi
test edi, edi
jne 0x4f636f
xor ecx, ecx
mov esi, 7
mov cl, byte [edx]
inc edx
mov edi, ecx
shr edi, 7
and edi, 1
shl ecx, 1
lea eax, [edi + eax*2]
mov edi, esi
dec esi
test edi, edi
jne 0x4f638d
xor ecx, ecx
mov esi, 7
mov cl, byte [edx]
inc edx
mov edi, ecx
shr edi, 7
and edi, 1
shl ecx, 1
test edi, edi
jne 0x4f635e
test eax, eax
je 0x4f645c
mov edi, dword [ebp - 0x14]
mov ebx, edi
sub ebx, dword [ebp - 4]
inc edi
dec eax
mov dword [ebp - 0x14], edi
mov bl, byte [ebx]
mov byte [edi - 1], bl
jne 0x4f63a3
mov ebx, 1
jmp 0x4f6471
lea edi, [eax - 3]
jmp 0x4f63c9
lea edi, [eax - 2]
xor eax, eax
mov al, byte [edx]
shl edi, 8
add edi, eax
inc edx
mov dword [ebp + 8], edi
mov eax, 1
mov edi, esi
dec esi
test edi, edi
jne 0x4f63ec
xor ecx, ecx
mov esi, 7
mov cl, byte [edx]
inc edx
mov edi, ecx
shr edi, 7
and edi, 1
shl ecx, 1
lea eax, [edi + eax*2]
mov edi, esi
dec esi
test edi, edi
jne 0x4f640a
xor ecx, ecx
mov esi, 7
mov cl, byte [edx]
inc edx
mov edi, ecx
shr edi, 7
and edi, 1
shl ecx, 1
test edi, edi
jne 0x4f63db
cmp dword [ebp + 8], 0x7d00
jb 0x4f6422
inc eax
mov edi, dword [ebp + 8]
cmp edi, 0x500
jb 0x4f642e
inc eax
cmp edi, 0x80
jae 0x4f6439
add eax, 2
test eax, eax
je 0x4f6459
mov dword [ebp + 8], eax
mov eax, dword [ebp - 0x14]
mov ebx, eax
sub ebx, edi
inc eax
mov dword [ebp - 0x14], eax
mov bl, byte [ebx]
mov byte [eax - 1], bl
mov eax, dword [ebp + 8]
dec eax
mov dword [ebp + 8], eax
jne 0x4f6440
mov dword [ebp - 4], edi
mov ebx, 1
jmp 0x4f6471
mov edi, dword [ebp - 0x14]
mov al, byte [edx]
mov byte [edi], al
inc edi
mov dword [ebp - 0x14], edi
inc edx
xor ebx, ebx
mov eax, dword [ebp - 8]
test eax, eax
je 0x4f6205
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 0xc]
pop edi
pop esi
sub eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret