Function at 0x40c350
Capabilities:
Decompress data using aplib

Disassembly:
dec eax
mov eax, esp
dec eax
mov dword [eax + 8], ebx
dec eax
mov dword [eax + 0x10], esi
dec eax
mov dword [eax + 0x18], edi
dec esp
mov dword [eax + 0x20], esi
push ebp
dec eax
mov ebp, esp
dec eax
sub esp, 0x40
mov al, byte [ecx]
inc ecx
or esi, 0xffffffff
and dword [ebp - 0xc], 0
inc ebp
xor ecx, ecx
mov byte [edx], al
xor edi, edi
dec eax
lea eax, [edx + 1]
dec eax
mov ebx, edx
dec eax
mov dword [ebp - 0x18], eax
inc ebp
mov ebx, esi
dec eax
lea eax, [ecx + 1]
dec eax
mov dword [ebp - 0x20], eax
lea esi, [edi + 1]
dec eax
lea ecx, [ebp - 0x20]
call fcn.0040c594
test eax, eax
je 0x40c550
dec eax
lea ecx, [ebp - 0x20]
call fcn.0040c594
test eax, eax
je 0x40c456
dec eax
lea ecx, [ebp - 0x20]
call fcn.0040c594
test eax, eax
je 0x40c412
inc ebp
xor ecx, ecx
inc ebp
lea edx, [ecx + 4]
dec eax
lea ecx, [ebp - 0x20]
call fcn.0040c594
inc esi
lea ecx, [eax + ecx*2]
inc esp
sub edx, esi
jne 0x40c3cb
inc ebp
test ecx, ecx
je 0x40c3ff
dec eax
mov edx, dword [ebp - 0x18]
dec eax
mov eax, edx
inc ecx
mov ecx, ecx
dec eax
sub eax, ecx
mov al, byte [eax]
mov byte [edx], al
dec eax
add edx, esi
dec eax
mov dword [ebp - 0x18], edx
jmp 0x40c56a
dec eax
mov eax, dword [ebp - 0x18]
mov byte [eax], 0
dec eax
add eax, esi
dec eax
mov dword [ebp - 0x18], eax
jmp 0x40c56a
dec eax
mov eax, dword [ebp - 0x20]
inc esp
movzx ebx, byte [eax]
dec eax
add eax, esi
inc ecx
mov ecx, ebx
dec eax
mov dword [ebp - 0x20], eax
and ecx, esi
add ecx, 2
inc ecx
shr ebx, 1
je 0x40c44f
dec eax
mov edx, dword [ebp - 0x18]
inc ebp
mov eax, ebx
dec ecx
neg eax
inc ecx
mov al, byte [eax + edx]
mov byte [edx], al
dec eax
add edx, esi
inc ecx
add ecx, esi
jne 0x40c438
dec eax
mov dword [ebp - 0x18], edx
jmp 0x40c54b
mov edi, esi
jmp 0x40c54b
inc esp
mov edx, esi
dec eax
lea ecx, [ebp - 0x20]
call fcn.0040c594
dec eax
lea ecx, [ebp - 0x20]
inc esi
lea edx, [eax + edx*2]
call fcn.0040c594
test eax, eax
jne 0x40c459
inc ebp
test ecx, ecx
jne 0x40c4c0
inc ecx
cmp edx, 2
jne 0x40c4c0
inc esp
mov ecx, esi
dec eax
lea ecx, [ebp - 0x20]
call fcn.0040c594
dec eax
lea ecx, [ebp - 0x20]
inc esi
lea ecx, [eax + ecx*2]
call fcn.0040c594
test eax, eax
jne 0x40c481
inc ebp
test ecx, ecx
je 0x40c54b
dec eax
mov ecx, dword [ebp - 0x18]
inc ecx
mov edx, ebx
dec eax
neg edx
mov al, byte [edx + ecx]
mov byte [ecx], al
dec eax
add ecx, esi
inc ebp
add ecx, esi
jne 0x40c4ae
jmp 0x40c547
dec eax
mov ecx, dword [ebp - 0x20]
inc esp
xor ecx, esi
inc ebp
sub edx, ecx
inc esp
mov ecx, esi
inc ecx
shl edx, 8
inc esp
movzx ebx, byte [ecx]
inc ecx
add ebx, 0xfffffe00
inc ebp
add ebx, edx
dec eax
add ecx, esi
dec eax
mov dword [ebp - 0x20], ecx
dec eax
lea ecx, [ebp - 0x20]
call fcn.0040c594
dec eax
lea ecx, [ebp - 0x20]
inc esi
lea ecx, [eax + ecx*2]
call fcn.0040c594
test eax, eax
jne 0x40c4e6
inc ecx
cmp ebx, 0x7d00
inc ecx
lea eax, [ecx + 1]
inc ecx
cmovb eax, ecx
inc ecx
cmp ebx, 0x500
lea ecx, [eax + 1]
cmovb ecx, eax
inc ecx
cmp ebx, 0x80
inc esp
lea eax, [ecx + 2]
inc esp
cmovae eax, ecx
inc ebp
test eax, eax
je 0x40c54b
dec eax
mov ecx, dword [ebp - 0x18]
inc ecx
mov edx, ebx
dec eax
neg edx
mov al, byte [edx + ecx]
mov byte [ecx], al
dec eax
add ecx, esi
inc ebp
add eax, esi
jne 0x40c53a
dec eax
mov dword [ebp - 0x18], ecx
inc esp
mov ecx, esi
jmp 0x40c56d
dec eax
mov edx, dword [ebp - 0x20]
dec eax
mov ecx, dword [ebp - 0x18]
mov al, byte [edx]
mov byte [ecx], al
dec eax
add ecx, esi
dec eax
add edx, esi
dec eax
mov dword [ebp - 0x18], ecx
dec eax
mov dword [ebp - 0x20], edx
inc ebp
xor ecx, ecx
test edi, edi
je 0x40c395
mov eax, dword [ebp - 0x18]
dec eax
mov esi, dword [esp + 0x58]
sub eax, ebx
dec eax
mov ebx, dword [esp + 0x50]
dec eax
mov edi, dword [esp + 0x60]
dec esp
mov esi, dword [esp + 0x68]
dec eax
add esp, 0x40
pop ebp
ret