Function at 0x87f7b0
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov edx, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov eax, esi
push 1
mov ebx, ecx
mov ecx, edx
push eax
add edx, 1
push ecx
mov dword [ebp - 0x14], esi
mov ecx, ebx
mov dword [ebp - 0x10], 0
mov byte [ebp + 0xf], 0x80
mov dword [ebp + 8], edx
add esi, 1
call fcn.008e72e0
test eax, eax
jne 0x87f7f2
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push edi
movzx eax, byte [ebp + 0xf]
add eax, eax
mov ecx, 0xff
cmp ecx, eax
sbb edi, edi
neg edi
test al, al
mov dword [ebp - 0xc], edi
mov byte [ebp + 0xf], al
jne 0x87f83d
mov eax, dword [ebp + 8]
lea edx, [ebp + 0xf]
push edx
push eax
mov ecx, ebx
call fcn.008e8240
test eax, eax
je 0x87f860
movzx ecx, byte [ebp + 0xf]
add dword [ebp + 8], 1
lea eax, [edi + ecx*2]
mov edx, 0xff
cmp edx, eax
sbb edi, edi
neg edi
mov dword [ebp - 0xc], edi
mov byte [ebp + 0xf], al
test edi, edi
jne 0x87f86b
mov edx, dword [ebp + 8]
mov eax, esi
push 1
mov ecx, edx
push eax
add edx, 1
push ecx
mov ecx, ebx
mov dword [ebp + 8], edx
add esi, 1
call fcn.008e72e0
test eax, eax
jne 0x87f7f3
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0xc
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp + 0xf]
push edx
mov ecx, ebx
mov dword [ebp - 4], 0
call fcn.0087f650
test eax, eax
je 0x87f860
xor edi, edi
cmp dword [ebp - 0xc], edi
jbe 0x87f99a
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp + 0xf]
push edx
mov ecx, ebx
mov dword [ebp - 8], edi
call fcn.0087f650
test eax, eax
je 0x87f860
cmp dword [ebp - 0xc], edi
jbe 0x87f928
mov byte [ebp - 8], 0x10
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp + 0xf]
push edx
mov ecx, ebx
call fcn.0087f650
test eax, eax
je 0x87f860
movzx eax, byte [ebp - 8]
mov ecx, dword [ebp - 0xc]
lea eax, [ecx + eax*2]
mov edx, 0xff
cmp edx, eax
sbb ecx, ecx
neg ecx
mov dword [ebp - 0xc], ecx
mov byte [ebp - 8], al
je 0x87f8b7
test al, al
jne 0x87f900
push edi
push esi
mov ecx, ebx
call fcn.008e8360
add esi, 1
jmp 0x87f85c
push 1
mov edx, esi
sub edx, dword [ebp - 8]
push esi
push edx
mov ecx, ebx
call fcn.008e72e0
test eax, eax
je 0x87f860
add edi, 1
add esi, 1
cmp edi, 1
jb 0x87f900
jmp 0x87f7f3
mov eax, dword [ebp + 8]
mov ecx, eax
add eax, 1
mov dword [ebp + 8], eax
lea eax, [ebp - 8]
push eax
push ecx
mov ecx, ebx
call fcn.008e8240
test eax, eax
je 0x87f860
mov eax, dword [ebp - 8]
mov ecx, eax
and ecx, 1
shr eax, 1
mov dword [ebp - 8], eax
je 0x87fa8f
add ecx, 2
cmp ecx, edi
mov dword [ebp - 4], ecx
mov dword [ebp - 0x10], eax
jbe 0x87f7f3
jmp 0x87f973
mov eax, dword [ebp - 8]
push 1
mov ecx, esi
sub ecx, eax
push esi
push ecx
mov ecx, ebx
call fcn.008e72e0
test eax, eax
je 0x87f860
add edi, 1
add esi, 1
cmp edi, dword [ebp - 4]
jb 0x87f970
jmp 0x87f7f3
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp + 8]
push eax
lea ecx, [ebp + 0xf]
push ecx
lea edx, [ebp - 4]
push edx
mov ecx, ebx
call fcn.0087f6c0
test eax, eax
je 0x87f860
mov eax, dword [ebp - 4]
sub eax, 2
je 0x87fa36
add eax, 0xffffffff
shl eax, 8
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov ecx, eax
add eax, 1
mov dword [ebp + 8], eax
lea eax, [ebp - 8]
push eax
push ecx
mov ecx, ebx
call fcn.008e8240
test eax, eax
je 0x87f860
lea ecx, [ebp - 0xc]
push ecx
lea edx, [ebp + 8]
push edx
lea eax, [ebp + 0xf]
push eax
lea ecx, [ebp - 4]
push ecx
mov ecx, ebx
mov dword [ebp - 4], edi
call fcn.0087f6c0
test eax, eax
je 0x87f860
mov eax, dword [ebp - 8]
cmp eax, 0x7d00
jae 0x87fa2d
mov edx, eax
shr edx, 8
cmp dl, 5
jb 0x87fa28
add dword [ebp - 4], 1
mov dword [ebp - 0x10], eax
jmp 0x87fa58
cmp eax, 0x7f
ja 0x87fa31
add dword [ebp - 4], 2
mov dword [ebp - 0x10], eax
jmp 0x87fa58
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp + 0xf]
push edx
lea eax, [ebp - 4]
push eax
mov ecx, ebx
mov dword [ebp - 4], edi
call fcn.0087f6c0
test eax, eax
je 0x87f860
cmp dword [ebp - 4], edi
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 8], ecx
jbe 0x87f7f3
push 1
mov edx, esi
sub edx, dword [ebp - 8]
push esi
push edx
mov ecx, ebx
call fcn.008e72e0
test eax, eax
je 0x87f860
add edi, 1
add esi, 1
cmp edi, dword [ebp - 4]
jb 0x87fa67
jmp 0x87f7f3
sub esi, dword [ebp - 0x14]
mov eax, dword [ebp + 0x10]
pop edi
mov dword [eax], esi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc