Function at 0x140012ccc
Capabilities:
Decompress data using aplib

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x58
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x4c], 0
mov dword [rsp + 0x30], 0xffffffff
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x34], 0
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
mov cl, byte [rcx]
mov byte [rax], cl
mov rax, qword [rsp + 0x40]
inc rax
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
cmp dword [rsp + 0x34], 0
jne 0x14001301a
lea rcx, [rsp + 0x38]
call fcn.140013030
test eax, eax
je 0x140012fe5
lea rcx, [rsp + 0x38]
call fcn.140013030
test eax, eax
je 0x140012e92
lea rcx, [rsp + 0x38]
call fcn.140013030
test eax, eax
je 0x140012e01
mov dword [rsp + 0x20], 0
mov dword [rsp + 0x2c], 4
jmp 0x140012d93
mov eax, dword [rsp + 0x2c]
dec eax
mov dword [rsp + 0x2c], eax
cmp dword [rsp + 0x2c], 0
je 0x140012db1
lea rcx, [rsp + 0x38]
call fcn.140013030
mov ecx, dword [rsp + 0x20]
lea eax, [rax + rcx*2]
mov dword [rsp + 0x20], eax
jmp 0x140012d89
cmp dword [rsp + 0x20], 0
je 0x140012ddf
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x40]
mov al, byte [rax]
mov byte [rcx], al
mov rax, qword [rsp + 0x40]
inc rax
mov qword [rsp + 0x40], rax
jmp 0x140012df4
mov rax, qword [rsp + 0x40]
mov byte [rax], 0
mov rax, qword [rsp + 0x40]
inc rax
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x28], 0
jmp 0x140012e8d
mov rax, qword [rsp + 0x38]
movzx eax, byte [rax]
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov eax, dword [rsp + 0x20]
and eax, 1
add eax, 2
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x20]
shr eax, 1
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
je 0x140012e75
jmp 0x140012e45
mov eax, dword [rsp + 0x24]
dec eax
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0
je 0x140012e73
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x40]
mov al, byte [rax]
mov byte [rcx], al
mov rax, qword [rsp + 0x40]
inc rax
mov qword [rsp + 0x40], rax
jmp 0x140012e3b
jmp 0x140012e7d
mov dword [rsp + 0x34], 1
mov eax, dword [rsp + 0x20]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], 1
jmp 0x140012fe3
lea rcx, [rsp + 0x38]
call fcn.1400130bc
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x28], 0
jne 0x140012f03
cmp dword [rsp + 0x20], 2
jne 0x140012f03
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x38]
call fcn.1400130bc
mov dword [rsp + 0x24], eax
jmp 0x140012ed0
mov eax, dword [rsp + 0x24]
dec eax
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0
je 0x140012efe
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x40]
mov al, byte [rax]
mov byte [rcx], al
mov rax, qword [rsp + 0x40]
inc rax
mov qword [rsp + 0x40], rax
jmp 0x140012ec6
jmp 0x140012fdb
cmp dword [rsp + 0x28], 0
jne 0x140012f17
mov eax, dword [rsp + 0x20]
sub eax, 3
mov dword [rsp + 0x20], eax
jmp 0x140012f22
mov eax, dword [rsp + 0x20]
sub eax, 2
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
shl eax, 8
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x38]
movzx eax, byte [rax]
mov ecx, dword [rsp + 0x20]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x38]
call fcn.1400130bc
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x20], 0x7d00
jb 0x140012f70
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x20], 0x500
jb 0x140012f84
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x20], 0x80
jae 0x140012f99
mov eax, dword [rsp + 0x24]
add eax, 2
mov dword [rsp + 0x24], eax
jmp 0x140012fa5
mov eax, dword [rsp + 0x24]
dec eax
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0
je 0x140012fd3
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x40]
mov al, byte [rax]
mov byte [rcx], al
mov rax, qword [rsp + 0x40]
inc rax
mov qword [rsp + 0x40], rax
jmp 0x140012f9b
mov eax, dword [rsp + 0x20]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], 1
jmp 0x140013015
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
mov cl, byte [rcx]
mov byte [rax], cl
mov rax, qword [rsp + 0x40]
inc rax
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x28], 0
jmp 0x140012d36
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov rax, rcx
add rsp, 0x58
ret