Function at 0x695c20
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov edx, dword [ebp + 8]
sub esp, 0x2c
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
jmp 0x695c3a
xor edi, edi
cmp eax, edi
je 0x695f66
cmp edx, edi
je 0x695f66
lea ebx, [ecx - 1]
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x34], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], ebx
test ecx, ecx
je 0x695f66
lea ecx, [esi - 1]
mov dword [esp + 0x2c], ecx
test esi, esi
je 0x695f66
mov cl, byte [eax]
mov ebx, dword [esp + 0x1c]
mov byte [edx], cl
inc edx
inc eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x20], eax
jmp 0x695c95
mov esi, dword [ebp + 0xc]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x24]
call fcn.00695b72
pop ecx
test eax, eax
je 0x695f66
cmp dword [esp + 0x14], 0
je 0x695f1c
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x24]
call fcn.00695b72
pop ecx
test eax, eax
je 0x695f66
cmp dword [esp + 0x14], 0
je 0x695dec
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x24]
call fcn.00695b72
pop ecx
test eax, eax
je 0x695f66
cmp dword [esp + 0x14], 0
je 0x695d74
push 4
xor edi, edi
pop esi
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x24]
call fcn.00695b72
pop ecx
test eax, eax
je 0x695f66
dec esi
mov eax, dword [esp + 0x14]
lea edi, [eax + edi*2]
mov dword [esp + 0x18], edi
jne 0x695cfc
test edi, edi
je 0x695d54
mov eax, dword [ebp + 0xc]
sub eax, dword [esp + 0x2c]
cmp edi, eax
ja 0x695f66
mov eax, dword [esp + 0x2c]
dec dword [esp + 0x2c]
test eax, eax
je 0x695f66
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x28]
sub eax, edi
mov al, byte [eax]
mov byte [ecx], al
jmp 0x695d6b
mov eax, dword [esp + 0x2c]
dec dword [esp + 0x2c]
test eax, eax
je 0x695f66
mov eax, dword [esp + 0x28]
mov byte [eax], 0
inc dword [esp + 0x28]
jmp 0x695f48
mov eax, dword [esp + 0x24]
dec dword [esp + 0x24]
test eax, eax
je 0x695f66
mov eax, dword [esp + 0x20]
movzx esi, byte [eax]
inc dword [esp + 0x20]
xor edi, edi
inc edi
mov eax, esi
and eax, edi
inc eax
inc eax
shr esi, 1
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], esi
je 0x695de1
mov ecx, dword [ebp + 0xc]
sub ecx, dword [esp + 0x2c]
cmp esi, ecx
ja 0x695f66
cmp eax, dword [esp + 0x2c]
ja 0x695f66
sub dword [esp + 0x2c], eax
test eax, eax
je 0x695de5
mov ecx, dword [esp + 0x28]
sub ecx, esi
mov ebx, dword [esp + 0x28]
mov dl, byte [ecx]
inc dword [esp + 0x28]
inc ecx
dec eax
mov byte [ebx], dl
jne 0x695dcb
mov dword [esp + 0x10], eax
jmp 0x695de5
mov dword [esp + 0x1c], edi
mov ebx, esi
jmp 0x695f4a
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.00695bcb
pop ecx
pop ecx
test eax, eax
je 0x695f66
mov eax, dword [esp + 0x18]
test edi, edi
jne 0x695e78
cmp eax, 2
jne 0x695e73
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x20], ebx
call fcn.00695bcb
pop ecx
pop ecx
test eax, eax
je 0x695f66
sub esi, dword [esp + 0x2c]
cmp ebx, esi
ja 0x695f66
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x2c]
ja 0x695f66
sub dword [esp + 0x2c], eax
test eax, eax
je 0x695f17
mov eax, dword [esp + 0x28]
sub eax, ebx
mov edx, dword [esp + 0x28]
mov cl, byte [eax]
inc dword [esp + 0x28]
inc eax
dec dword [esp + 0x10]
mov byte [edx], cl
jne 0x695e5b
jmp 0x695f17
sub eax, 3
jmp 0x695e7a
dec eax
dec eax
mov ecx, dword [esp + 0x24]
dec dword [esp + 0x24]
test ecx, ecx
je 0x695f66
mov ecx, dword [esp + 0x20]
movzx ecx, byte [ecx]
shl eax, 8
add eax, ecx
inc dword [esp + 0x20]
mov esi, eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x20], esi
call fcn.00695bcb
pop ecx
pop ecx
test eax, eax
je 0x695f66
cmp esi, 0x7d00
jb 0x695ec5
inc dword [esp + 0x10]
cmp esi, 0x500
jb 0x695ed1
inc dword [esp + 0x10]
cmp esi, 0x80
jae 0x695ede
add dword [esp + 0x10], 2
mov eax, dword [ebp + 0xc]
sub eax, dword [esp + 0x2c]
cmp esi, eax
ja 0x695f66
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x2c]
ja 0x695f66
sub dword [esp + 0x2c], ecx
test ecx, ecx
je 0x695f15
mov eax, dword [esp + 0x28]
sub eax, esi
mov edi, dword [esp + 0x28]
mov dl, byte [eax]
inc dword [esp + 0x28]
inc eax
dec ecx
mov byte [edi], dl
jne 0x695f01
mov dword [esp + 0x10], ecx
mov ebx, esi
xor edi, edi
inc edi
jmp 0x695f4a
mov eax, dword [esp + 0x24]
dec dword [esp + 0x24]
test eax, eax
je 0x695f66
mov eax, dword [esp + 0x2c]
dec dword [esp + 0x2c]
test eax, eax
je 0x695f66
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov al, byte [eax]
inc dword [esp + 0x28]
inc dword [esp + 0x20]
mov byte [ecx], al
xor edi, edi
cmp dword [esp + 0x1c], 0
je 0x695c92
jmp 0x695f5d
mov eax, dword [esp + 0x28]
sub eax, dword [ebp + 8]
jmp 0x695f69
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret