Function at 0x1800087a0
Capabilities:
Decompress data using aplib

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
movzx eax, byte [rcx]
mov rsi, rdx
xor r9d, r9d
xor r10d, r10d
xor edi, edi
lea r11, [rdx + 1]
mov byte [rdx], al
mov edx, dword [rsp + 0x10]
lea r8, [rcx + 1]
xor ebx, ebx
nop dword [rax]
mov eax, r9d
dec r9d
test eax, eax
jne 0x1800087e5
movzx edx, byte [r8]
inc r8
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
je 0x180008a7b
mov eax, r9d
dec r9d
test eax, eax
jne 0x18000880a
movzx edx, byte [r8]
inc r8
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
je 0x1800088de
mov eax, r9d
dec r9d
test eax, eax
jne 0x18000882f
movzx edx, byte [r8]
inc r8
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
je 0x180008889
xor ecx, ecx
lea r10d, [rcx + 4]
mov eax, r9d
dec r9d
test eax, eax
jne 0x180008856
movzx edx, byte [r8]
inc r8
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
sub r10d, 1
lea ecx, [rax + rcx*2]
jne 0x180008841
test ecx, ecx
je 0x180008880
mov eax, ecx
mov rcx, r11
sub rcx, rax
movzx eax, byte [rcx]
mov byte [r11], al
jmp 0x180008a85
mov byte [r11], 0
jmp 0x180008a85
movzx ebx, byte [r8]
inc r8
mov r10d, ebx
and r10d, 1
add r10d, 2
shr ebx, 1
je 0x1800088ce
mov eax, ebx
test r10d, r10d
je 0x1800088d3
mov rcx, r11
sub rcx, rax
nop dword [rax]
movzx eax, byte [rcx]
inc r11
inc rcx
add r10d, 0xffffffff
mov byte [r11 - 1], al
jne 0x1800088b0
mov r10d, 1
jmp 0x180008a8b
mov edi, 1
mov r10d, 1
jmp 0x180008a8b
mov ecx, 1
mov eax, r9d
dec r9d
test eax, eax
jne 0x1800088f8
movzx edx, byte [r8]
inc r8
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
lea ecx, [rax + rcx*2]
mov eax, r9d
dec r9d
test eax, eax
jne 0x18000891a
movzx edx, byte [r8]
inc r8
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
jne 0x1800088e3
test r10d, r10d
jne 0x1800089c3
cmp ecx, 2
jne 0x1800089be
lea r10d, [rax + 1]
nop dword [rax]
mov eax, r9d
dec r9d
test eax, eax
jne 0x180008955
movzx edx, byte [r8]
inc r8
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
lea r10d, [rax + r10*2]
mov eax, r9d
dec r9d
test eax, eax
jne 0x180008978
movzx edx, byte [r8]
inc r8
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
jne 0x180008940
movsxd rax, ebx
test r10d, r10d
je 0x180008a73
mov rcx, r11
sub rcx, rax
nop word [rax + rax]
movzx eax, byte [rcx]
inc r11
inc rcx
add r10d, 0xffffffff
mov byte [r11 - 1], al
jne 0x1800089a0
mov r10d, 1
jmp 0x180008a8b
lea ebx, [rcx - 3]
jmp 0x1800089c6
lea ebx, [rcx - 2]
movzx eax, byte [r8]
shl ebx, 8
mov r10d, 1
add ebx, eax
inc r8
nop dword [rax + rax]
mov eax, r9d
dec r9d
test eax, eax
jne 0x1800089f5
movzx edx, byte [r8]
inc r8
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
lea r10d, [rax + r10*2]
mov eax, r9d
dec r9d
test eax, eax
jne 0x180008a18
movzx edx, byte [r8]
inc r8
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
jne 0x1800089e0
cmp ebx, 0x7d00
jb 0x180008a2f
inc r10d
cmp ebx, 0x500
jb 0x180008a3a
inc r10d
cmp ebx, 0x80
jae 0x180008a46
add r10d, 2
movsxd rax, ebx
test r10d, r10d
je 0x180008a73
mov rcx, r11
sub rcx, rax
nop word [rax + rax]
movzx eax, byte [rcx]
inc r11
inc rcx
add r10d, 0xffffffff
mov byte [r11 - 1], al
jne 0x180008a60
mov r10d, 1
jmp 0x180008a8b
movzx ecx, byte [r8]
inc r8
mov byte [r11], cl
inc r11
xor r10d, r10d
test edi, edi
je 0x1800087d0
mov rbx, qword [rsp + 0x30]
sub r11, rsi
mov rsi, qword [rsp + 0x38]
mov eax, r11d
add rsp, 0x20
pop rdi
ret