Function at 0x401a99
Capabilities:
Decompress data using aplib

Disassembly:
mov cl, byte [ebx]
lea ebp, [eax + 1]
inc ebx
mov dword [esp + 0xc], eax
mov byte [eax], cl
xor eax, eax
xor edi, edi
xor ecx, ecx
dec eax
mov dword [esp], eax
mov al, 1
sub ecx, 1
mov dword [esp + 8], eax
jae 0x4019bb
movzx edi, byte [ebx]
inc ebx
push 7
pop ecx
mov eax, edi
add edi, edi
test al, al
js 0x4019ce
mov al, byte [ebx]
inc ebx
mov byte [ebp], al
inc ebp
mov al, 1
jmp 0x4019ab
sub ecx, 1
jae 0x4019da
movzx edi, byte [ebx]
inc ebx
push 7
pop ecx
mov eax, edi
add edi, edi
test al, al
js 0x401a82
xor esi, esi
mov dword [esp + 4], ebp
inc esi
sub ecx, 1
jae 0x4019f9
movzx edi, byte [ebx]
inc ebx
push 7
pop ecx
mov ebp, edi
add esi, esi
shr ebp, 7
pop es
and ebp, 1
sub ecx, 1
jae 0x401a11
movzx edx, byte [ebx]
inc ebx
push 7
pop ecx
jmp 0x401a15
add edi, edi
mov edx, edi
or esi, ebp
mov ebp, dword [esp + 4]
lea edi, [edx + edx]
test dl, dl
js 0x4019ed
mov edx, dword [esp + 8]
cmp esi, 2
sete al
and al, dl
cmp al, 1
jne 0x401ac9
xor edx, edx
inc edx
sub ecx, 1
jae 0x401a45
movzx edi, byte [ebx]
inc ebx
push 7
pop ecx
mov esi, edi
add edx, edx
shr esi, 7
and esi, 1
sub ecx, 1
jae 0x401a5d
movzx eax, byte [ebx]
inc ebx
push 7
pop ecx
jmp 0x401a61
add edi, edi
mov eax, edi
or edx, esi
lea edi, [eax + eax]
test al, al
js 0x401a39
mov esi, dword [esp]
neg esi
sub edx, 1
jb 0x401b6c
mov al, byte [ebp + esi]
mov byte [ebp], al
inc ebp
jmp 0x401a6f
sub ecx, 1
jae 0x401a8e
movzx edi, byte [ebx]
inc ebx
push 7
pop ecx
mov eax, edi
add edi, edi
test al, al
js 0x401b73
invalid
movzx edx, byte [ebx]
cmp edx, 1
jbe 0x401baf
mov esi, edx
and edx, 1
inc ebx
shr esi, 1
or edx, 2
mov dword [esp], esi
neg esi
sub edx, 1
jb 0x401b6c
mov al, byte [ebp + esi]
mov byte [ebp], al
inc ebp
jmp 0x401ab6
movzx eax, dl
movzx ebp, byte [ebx]
inc ebx
and eax, 1
sub esi, eax
add esi, 0xfffffe
xor edx, edx
inc edx
mov dword [esp + 8], ebp
sub ecx, 1
jae 0x401aee
movzx edi, byte [ebx]
inc ebx
push 7
pop ecx
mov ebp, edi
add edx, edx
shr ebp, 7
and ebp, 1
sub ecx, 1
jae 0x401b06
movzx eax, byte [ebx]
inc ebx
push 7
add edi, edi
mov eax, edi
or edx, ebp
mov ebp, dword [esp + 4]
lea edi, [eax + eax]
test al, al
js 0x401ae2
shl esi, 8
xor eax, eax
add esi, dword [esp + 8]
cmp esi, 0x500
setae al
cmp esi, 0x7d00
add byte [ebp], bh
add byte [ebx - 0x17e0028], al
add byte [eax], 0
add byte [ecx - 0x74f7dbbc], cl
inc esp
and al, 8
lea eax, [eax + edx]
mov dword [esp], eax
mov eax, dword [esp + 8]
lea edx, [eax + edx + 2]
mov eax, esi
cmovae edx, dword [esp]
neg eax
mov dword [esp], esi
sub edx, 1
jb 0x401b6c
mov esi, ebx
mov bl, byte [ebp + eax]
mov byte [ebp], bl
mov ebx, esi
inc ebp
jmp 0x401b59
xor eax, eax
jmp 0x4019ab
xor edx, edx
push 0xfffffffffffffffc
pop esi
test esi, esi
je 0x401b99
add edx, edx
sub ecx, 1
jae 0x401b8a
movzx edi, byte [ebx]
inc ebx
push 7
pop ecx
mov eax, edi
add edi, edi
inc esi
shr eax, 7
and eax, 1
or edx, eax
jmp 0x401b78
test edx, edx
je 0x401ba5
mov eax, ebp
sub eax, edx
mov al, byte [eax]
jmp 0x401ba7
xor eax, eax
mov byte [ebp], al
jmp 0x4019c9
mov eax, dword [esp + 0x4c]
push 0xc000
push 0
push dword [esp + 0x18]
mov dword [esp + 0x38], eax
call eax
mov ecx, dword [esp + 0xc]
xor eax, eax
mov esi, dword [ecx + 0x3c]
test byte [esi + ecx + 0x16], 1
mov ecx, dword [esp + 0x24]
mov edx, esi
mov dword [esp], esi
je 0x401be8
mov eax, dword [esp + 0xc]
mov edx, dword [esp]
mov eax, dword [eax + edx + 0x34]
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0xc]
mov edi, dword [esp]
mov dword [esp + 0x30], edx
mov edx, 0x1000
add edx, dword [esi + edi + 0x50]
push 0x40
push 0x3000
push edx
push eax
call ecx
test eax, eax
mov ecx, eax
mov dword [esp + 4], eax
je 0x401db0
mov edx, dword [esp + 0xc]
mov eax, dword [esp]
mov esi, dword [esp + 4]
mov edi, dword [edx + eax + 0x54]
xor eax, eax
cmp edi, eax
je 0x401c37
mov cl, byte [edx + eax]
mov byte [esi + eax], cl
inc eax
jmp 0x401c2a
mov ecx, dword [esp]
mov eax, dword [edx + 0x3c]
mov dword [esp + 0x28], edi
movzx ecx, word [edx + ecx + 6]
lea eax, [edx + eax + 0xf8]
xor edx, edx
mov dword [esp + 8], ecx
cmp edx, dword [esp + 8]
mov ecx, dword [esp + 0xc]
je 0x401c84
imul ebx, edx, 0x28
xor ebp, ebp
mov edi, dword [eax + ebx + 0xc]
mov esi, dword [eax + ebx + 0x10]
mov ebx, dword [eax + ebx + 0x14]
add edi, dword [esp + 4]
add ebx, ecx
cmp esi, ebp
je 0x401c81
mov cl, byte [ebx + ebp]
mov byte [edi + ebp], cl
inc ebp
jmp 0x401c74
inc edx
jmp 0x401c53
mov eax, dword [esp]
mov eax, dword [ecx + eax + 0xa0]
test eax, eax
je 0x401cf0
add eax, dword [esp + 4]
cmp dword [eax], 0
je 0x401cf0
lea ecx, [eax + 8]
mov dword [esp + 8], eax
mov edx, ecx
mov esi, dword [eax + 4]
add esi, eax
cmp ecx, esi
je 0x401cec
movzx esi, word [edx]
mov edi, esi
and edi, 0xf000
cmp di, 0x3000
inc dword [eax]
xor byte [ebp + 0x25], dh
mov edi, dword [eax]
mov ebp, dword [esp + 4]
and esi, 0xfff
mov eax, dword [esp + 0xc]
add edi, ebp
mov ebx, dword [esi + edi]
add ebx, ebp
mov ebp, dword [esp]
sub ebx, dword [eax + ebp + 0x34]
mov eax, dword [esp + 8]
mov dword [esi + edi], ebx
add edx, 2
add ecx, 2
jmp 0x401ca4
mov eax, edx
jmp 0x401c96
mov eax, dword [esp]
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 4]
mov ebp, dword [ecx + eax + 0x80]
test ebp, ebp
je 0x401d80
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
add ebp, edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], edx
mov dword [esp + 8], ecx
mov esi, dword [ebp + 0xc]
mov edi, dword [esp + 4]
test esi, esi
je 0x401d80
add esi, edi
push esi
call dword [esp + 0x1c]
mov ebx, eax
test eax, eax
jne 0x401d3f
push esi
call dword [esp + 0x24]
mov ebx, eax
mov ecx, ebp
mov ebp, dword [ebp]
mov eax, edi
clc
xor esi, esi
mov dword [esp + 0x10], ecx
add ebp, edi
mov edi, dword [ecx + 0x10]
add edi, eax
mov eax, dword [ebp + esi]
test eax, eax
je 0x401d77
mov ecx, dword [esp + 4]
lea ecx, [eax + ecx + 2]
movzx eax, ax
cmovns eax, ecx
push eax
push ebx
call dword [esp + 0x10]
mov dword [edi + esi], eax
add esi, 4
jmp 0x401d53
mov ebp, dword [esp + 0x10]
add ebp, 0x14
jmp 0x401d20
mov ecx, dword [esp + 0x28]
xor eax, eax
cmp ecx, eax
je 0x401d91
mov byte [edi + eax], 0
inc eax
jmp 0x401d86
mov eax, dword [esp + 0xc]
mov ecx, dword [esp]
mov ecx, dword [eax + ecx + 0x28]
add ecx, edi
call ecx
mov esi, eax
push 0xc000
push 0
push edi
call dword [esp + 0x38]
jmp 0x401db3
push 0xfffffffffffffffb
pop esi
push esi
call dword [esp + 0x34]
add byte [eax], al
pop ecx
pop ebx
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], edi
mov byte [edi + esi], 0
pop ebp
ret 4