Function at 0x1001aadd
Capabilities:
Decompress data using aplib

Disassembly:
mov esi, dword [ebp + 0xc]
lea edx, [esp + 0x14]
lea ecx, [esp + 0x20]
call fcn.1001a8af
test eax, eax
je 0x1001ac82
cmp dword [esp + 0x14], 0
je 0x1001ac35
call fcn.1001a8af
test eax, eax
je 0x1001ac82
cmp dword [esp + 0x14], 0
je 0x1001ab11
call fcn.1001a8af
test eax, eax
je 0x1001ac82
cmp dword [esp + 0x14], 0
je 0x1001aa99
push 4
xor edi, edi
pop esi
lea edx, [esp + 0x14]
lea ecx, [esp + 0x20]
call fcn.1001a8af
test eax, eax
je 0x1001ac82
dec esi
mov eax, dword [esp + 0x14]
lea edi, [eax + edi*2]
mov dword [esp + 0x18], edi
sbb byte [ebp - 0x23], dh
sbb byte [ebp - 0x23], dh
test edi, edi
je 0x1001aa79
mov eax, dword [ebp + 0xc]
sub eax, dword [esp + 0x2c]
cmp edi, eax
ja 0x1001ac82
mov eax, dword [esp + 0x2c]
dec dword [esp + 0x2c]
test eax, eax
je 0x1001ac82
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x28]
sub eax, edi
mov al, byte [eax]
mov byte [ecx], al
jmp 0x1001aa90
mov eax, dword [esp + 0x2c]
dec dword [esp + 0x2c]
test eax, eax
je 0x1001ac82
mov eax, dword [esp + 0x28]
mov byte [eax], 0
inc dword [esp + 0x28]
jmp 0x1001ac61
mov eax, dword [esp + 0x24]
dec dword [esp + 0x24]
test eax, eax
je 0x1001ac82
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 0x1001ab06
mov ecx, dword [ebp + 0xc]
sub ecx, dword [esp + 0x2c]
cmp esi, ecx
ja 0x1001ac82
cmp eax, dword [esp + 0x2c]
ja 0x1001ac82
sub dword [esp + 0x2c], eax
test eax, eax
je 0x1001ab0a
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 0x1001aaf0
mov dword [esp + 0x10], eax
jmp 0x1001ab0a
mov dword [esp + 0x1c], edi
mov ebx, esi
jmp 0x1001ac63
lea edx, [esp + 0x18]
call fcn.1001a90b
test eax, eax
je 0x1001ac82
mov eax, dword [esp + 0x18]
test edi, edi
jne 0x1001ab91
cmp eax, 2
jne 0x1001ab8c
lea edx, [esp + 0x10]
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], ebx
call fcn.1001a90b
test eax, eax
je 0x1001ac82
sub esi, dword [esp + 0x2c]
cmp ebx, esi
ja 0x1001ac82
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x2c]
ja 0x1001ac82
sub dword [esp + 0x2c], eax
test eax, eax
je 0x1001ac30
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 0x1001ab74
jmp 0x1001ac30
sub eax, 3
jmp 0x1001ab93
dec eax
dec eax
mov ecx, dword [esp + 0x24]
dec dword [esp + 0x24]
test ecx, ecx
je 0x1001ac82
mov ecx, dword [esp + 0x20]
movzx ecx, byte [ecx]
shl eax, 8
add eax, ecx
inc dword [esp + 0x20]
mov esi, eax
lea edx, [esp + 0x10]
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], esi
call fcn.1001a90b
test eax, eax
je 0x1001ac82
cmp esi, 0x7d00
jb 0x1001abda
inc dword [esp + 0x10]
cmp esi, 0x500
jb 0x1001abe6
inc dword [esp + 0x10]
cmp esi, 0x80
jae 0x1001abf3
add dword [esp + 0x10], 2
mov eax, dword [ebp + 0xc]
sub eax, dword [esp + 0x2c]
cmp esi, eax
ja 0x1001ac82
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x2c]
ja 0x1001ac82
sub dword [esp + 0x2c], ecx
test ecx, ecx
je 0x1001ac2e
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 0x1001ac1a
mov dword [esp + 0x10], ecx
mov ebx, esi
xor edi, edi
inc edi
jmp 0x1001ac63
mov eax, dword [esp + 0x24]
dec dword [esp + 0x24]
test eax, eax
je 0x1001ac82
mov eax, dword [esp + 0x2c]
dec dword [esp + 0x2c]
test eax, eax
je 0x1001ac82
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 0x1001a9cf
jmp 0x1001ac79
mov eax, dword [esp + 0x28]
sub eax, dword [ebp + 8]
jmp 0x1001ac85
or eax, reloc.KERNEL32.dll_GetCurrentProcess
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8