Function at 0x180040a50
Capabilities:
Decompress data using aplib

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
movzx eax, byte [rcx]
mov ebx, dword [rsp + 0x30]
mov rsi, rdx
xor r9d, r9d
xor r11d, r11d
lea r10, [rdx + 1]
mov byte [rdx], al
mov edx, dword [rsp + 0x10]
lea r8, [rcx + 1]
xor edi, edi
nop
mov eax, r9d
add r9d, 0xffffffff
test eax, eax
jne 0x180040a97
movzx edx, byte [r8]
add r8, 1
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
je 0x180040d2e
mov eax, r9d
add r9d, 0xffffffff
test eax, eax
jne 0x180040abe
movzx edx, byte [r8]
add r8, 1
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
je 0x180040b9f
mov eax, r9d
add r9d, 0xffffffff
test eax, eax
jne 0x180040ae5
movzx edx, byte [r8]
add r8, 1
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
je 0x180040b4a
xor ecx, ecx
lea r11d, [rcx + 4]
nop
nop
nop
mov eax, r9d
add r9d, 0xffffffff
test eax, eax
jne 0x180040b17
movzx edx, byte [r8]
add r8, 1
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
sub r11d, 1
lea ecx, [rax + rcx*2]
jne 0x180040b00
test ecx, ecx
je 0x180040b41
mov eax, ecx
mov rcx, r10
sub rcx, rax
movzx eax, byte [rcx]
mov byte [r10], al
jmp 0x180040d39
mov byte [r10], 0
jmp 0x180040d39
movzx ebx, byte [r8]
add r8, 1
mov ecx, ebx
and ecx, 1
add ecx, 2
shr ebx, 1
je 0x180040b8f
test ecx, ecx
mov r11d, ebx
je 0x180040b94
nop
nop
nop
mov rax, r10
add r10, 1
sub rax, r11
add ecx, 0xffffffff
movzx eax, byte [rax]
mov byte [r10 - 1], al
jne 0x180040b70
lea r11d, [rcx + 1]
jmp 0x180040d40
mov edi, 1
mov r11d, 1
jmp 0x180040d40
mov ecx, 1
mov eax, r9d
add r9d, 0xffffffff
test eax, eax
jne 0x180040bbb
movzx edx, byte [r8]
add r8, 1
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
lea ecx, [rax + rcx*2]
mov eax, r9d
add r9d, 0xffffffff
test eax, eax
jne 0x180040bdf
movzx edx, byte [r8]
add r8, 1
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
jne 0x180040ba4
test r11d, r11d
jne 0x180040c84
cmp ecx, 2
jne 0x180040c7f
lea ecx, [rax + 1]
mov eax, r9d
add r9d, 0xffffffff
test eax, eax
jne 0x180040c17
movzx edx, byte [r8]
add r8, 1
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
lea ecx, [rax + rcx*2]
mov eax, r9d
add r9d, 0xffffffff
test eax, eax
jne 0x180040c3b
movzx edx, byte [r8]
add r8, 1
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
jne 0x180040c00
test ecx, ecx
movsxd r11, ebx
je 0x180040d26
nop
nop
nop
nop
mov rax, r10
add r10, 1
sub rax, r11
add ecx, 0xffffffff
movzx eax, byte [rax]
mov byte [r10 - 1], al
jne 0x180040c60
lea r11d, [rcx + 1]
jmp 0x180040d40
lea ebx, [rcx - 3]
jmp 0x180040c87
lea ebx, [rcx - 2]
movzx eax, byte [r8]
shl ebx, 8
mov ecx, 1
add ebx, eax
add r8, 1
nop
nop
mov eax, r9d
add r9d, 0xffffffff
test eax, eax
jne 0x180040cb7
movzx edx, byte [r8]
add r8, 1
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
lea ecx, [rax + rcx*2]
mov eax, r9d
add r9d, 0xffffffff
test eax, eax
jne 0x180040cdb
movzx edx, byte [r8]
add r8, 1
lea r9d, [rax + 7]
mov eax, edx
add edx, edx
shr eax, 7
and eax, 1
jne 0x180040ca0
cmp ebx, 0x7d00
jb 0x180040cf2
add ecx, 1
cmp ebx, 0x500
jb 0x180040cfd
add ecx, 1
cmp ebx, 0x80
jae 0x180040d08
add ecx, 2
test ecx, ecx
movsxd r11, ebx
je 0x180040d26
nop
mov rax, r10
add r10, 1
sub rax, r11
add ecx, 0xffffffff
movzx eax, byte [rax]
mov byte [r10 - 1], al
jne 0x180040d10
mov r11d, 1
jmp 0x180040d40
movzx ecx, byte [r8]
add r8, 1
mov byte [r10], cl
add r10, 1
xor r11d, r11d
test edi, edi
je 0x180040a80
mov rbx, qword [rsp + 0x38]
sub r10, rsi
mov rsi, qword [rsp + 0x40]
mov eax, r10d
add rsp, 0x20
pop rdi
ret