Function at 0x4f379e
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
sub esp, 0x2c
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
jmp 0x4f37b8
xor edi, edi
cmp eax, edi
je 0x4f3a8f
cmp edx, edi
je 0x4f3a8f
lea ebx, [ecx - 1]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x24], ebx
test ecx, ecx
je 0x4f3a8f
lea ecx, [esi - 1]
mov dword [ebp - 0x1c], ecx
test esi, esi
je 0x4f3a8f
mov cl, byte [eax]
mov ebx, dword [ebp - 0x10]
mov byte [edx], cl
inc edx
inc eax
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x28], eax
jmp 0x4f3809
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x28]
call fcn.004f36e4
pop ecx
test eax, eax
je 0x4f3a8f
cmp dword [ebp - 8], 0
je 0x4f3a4c
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x28]
call fcn.004f36e4
pop ecx
test eax, eax
je 0x4f3a8f
cmp dword [ebp - 8], 0
je 0x4f393c
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x28]
call fcn.004f36e4
pop ecx
test eax, eax
je 0x4f3a8f
cmp dword [ebp - 8], 0
je 0x4f38d2
push 4
xor edi, edi
pop esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x28]
call fcn.004f36e4
pop ecx
test eax, eax
je 0x4f3a8f
dec esi
mov eax, dword [ebp - 8]
lea edi, [eax + edi*2]
mov dword [ebp - 0xc], edi
jne 0x4f3867
test edi, edi
je 0x4f38b6
mov eax, dword [ebp + 0xc]
sub eax, dword [ebp - 0x1c]
cmp edi, eax
ja 0x4f3a8f
mov eax, dword [ebp - 0x1c]
dec dword [ebp - 0x1c]
test eax, eax
je 0x4f3a8f
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
sub eax, edi
mov al, byte [eax]
mov byte [ecx], al
jmp 0x4f38ca
mov eax, dword [ebp - 0x1c]
dec dword [ebp - 0x1c]
test eax, eax
je 0x4f3a8f
mov eax, dword [ebp - 0x20]
mov byte [eax], 0
inc dword [ebp - 0x20]
jmp 0x4f3a70
mov eax, dword [ebp - 0x24]
dec dword [ebp - 0x24]
test eax, eax
je 0x4f3a8f
mov eax, dword [ebp - 0x28]
movzx esi, byte [eax]
inc dword [ebp - 0x28]
xor edi, edi
inc edi
mov eax, esi
and eax, edi
inc eax
inc eax
shr esi, 1
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], esi
je 0x4f3932
mov ecx, dword [ebp + 0xc]
sub ecx, dword [ebp - 0x1c]
cmp esi, ecx
ja 0x4f3a8f
cmp eax, dword [ebp - 0x1c]
ja 0x4f3a8f
sub dword [ebp - 0x1c], eax
test eax, eax
je 0x4f3935
mov ecx, dword [ebp - 0x20]
sub ecx, esi
mov ebx, dword [ebp - 0x20]
mov dl, byte [ecx]
inc dword [ebp - 0x20]
inc ecx
dec eax
mov byte [ebx], dl
jne 0x4f391f
mov dword [ebp - 4], eax
jmp 0x4f3935
mov dword [ebp - 0x10], edi
mov ebx, esi
jmp 0x4f3a72
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.004f3743
pop ecx
pop ecx
test eax, eax
je 0x4f3a8f
mov eax, dword [ebp - 0xc]
test edi, edi
jne 0x4f39ba
cmp eax, 2
jne 0x4f39b5
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0xc], ebx
call fcn.004f3743
pop ecx
pop ecx
test eax, eax
je 0x4f3a8f
sub esi, dword [ebp - 0x1c]
cmp ebx, esi
ja 0x4f3a8f
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x1c]
ja 0x4f3a8f
sub dword [ebp - 0x1c], eax
test eax, eax
je 0x4f3a47
mov eax, dword [ebp - 0x20]
sub eax, ebx
mov edx, dword [ebp - 0x20]
mov cl, byte [eax]
inc dword [ebp - 0x20]
inc eax
dec dword [ebp - 4]
mov byte [edx], cl
jne 0x4f39a0
jmp 0x4f3a47
sub eax, 3
jmp 0x4f39bc
dec eax
dec eax
mov ecx, dword [ebp - 0x24]
dec dword [ebp - 0x24]
test ecx, ecx
je 0x4f3a8f
mov ecx, dword [ebp - 0x28]
movzx ecx, byte [ecx]
shl eax, 8
add eax, ecx
inc dword [ebp - 0x28]
mov esi, eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0xc], esi
call fcn.004f3743
pop ecx
pop ecx
test eax, eax
je 0x4f3a8f
cmp esi, 0x7d00
jb 0x4f39ff
inc dword [ebp - 4]
cmp esi, 0x500
jb 0x4f3a0a
inc dword [ebp - 4]
cmp esi, 0x80
jae 0x4f3a16
add dword [ebp - 4], 2
mov eax, dword [ebp + 0xc]
sub eax, dword [ebp - 0x1c]
cmp esi, eax
ja 0x4f3a8f
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x1c]
ja 0x4f3a8f
sub dword [ebp - 0x1c], ecx
test ecx, ecx
je 0x4f3a45
mov eax, dword [ebp - 0x20]
sub eax, esi
mov edi, dword [ebp - 0x20]
mov dl, byte [eax]
inc dword [ebp - 0x20]
inc eax
dec ecx
mov byte [edi], dl
jne 0x4f3a34
mov dword [ebp - 4], ecx
mov ebx, esi
xor edi, edi
inc edi
jmp 0x4f3a72
mov eax, dword [ebp - 0x24]
dec dword [ebp - 0x24]
test eax, eax
je 0x4f3a8f
mov eax, dword [ebp - 0x1c]
dec dword [ebp - 0x1c]
test eax, eax
je 0x4f3a8f
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x20]
mov al, byte [eax]
inc dword [ebp - 0x20]
inc dword [ebp - 0x28]
mov byte [ecx], al
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x4f3806
jmp 0x4f3a87
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp + 8]
jmp 0x4f3a92
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret