Function at 0x1004b470
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
cmp dword [ebp + 8], 0
je 0x1004b482
cmp dword [ebp + 0x10], 0
jne 0x1004b48a
or eax, 0xffffffff
jmp 0x1004b905
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0xc], 0xffffffff
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x2c]
sub edx, 1
mov dword [ebp - 0x2c], edx
test ecx, ecx
je 0x1004b4de
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x24]
sub ecx, 1
mov dword [ebp - 0x24], ecx
test eax, eax
jne 0x1004b4e6
or eax, 0xffffffff
jmp 0x1004b905
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x30]
mov cl, byte [eax]
mov byte [edx], cl
mov edx, dword [ebp - 0x28]
add edx, 1
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x30]
add eax, 1
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x18], 0
jne 0x1004b8ff
lea ecx, [ebp - 0x34]
push ecx
lea edx, [ebp - 0x30]
push edx
call fcn.1004b370
add esp, 8
test eax, eax
jne 0x1004b528
or eax, 0xffffffff
jmp 0x1004b905
cmp dword [ebp - 0x34], 0
je 0x1004b8b2
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x30]
push ecx
call fcn.1004b370
add esp, 8
test eax, eax
jne 0x1004b54e
or eax, 0xffffffff
jmp 0x1004b905
cmp dword [ebp - 0x34], 0
je 0x1004b6f3
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp - 0x30]
push eax
call fcn.1004b370
add esp, 8
test eax, eax
jne 0x1004b574
or eax, 0xffffffff
jmp 0x1004b905
cmp dword [ebp - 0x34], 0
je 0x1004b643
mov dword [ebp - 0x14], 0
mov dword [ebp - 8], 4
jmp 0x1004b597
mov ecx, dword [ebp - 8]
sub ecx, 1
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
je 0x1004b5c7
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp - 0x30]
push eax
call fcn.1004b370
add esp, 8
test eax, eax
jne 0x1004b5b9
or eax, 0xffffffff
jmp 0x1004b905
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x34]
lea eax, [edx + ecx*2]
mov dword [ebp - 0x14], eax
jmp 0x1004b58e
cmp dword [ebp - 0x14], 0
je 0x1004b610
mov ecx, dword [ebp + 0x14]
sub ecx, dword [ebp - 0x24]
cmp dword [ebp - 0x14], ecx
jbe 0x1004b5e0
or eax, 0xffffffff
jmp 0x1004b905
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
sub eax, 1
mov dword [ebp - 0x24], eax
test edx, edx
jne 0x1004b5f8
or eax, 0xffffffff
jmp 0x1004b905
mov ecx, dword [ebp - 0x28]
sub ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
mov al, byte [ecx]
mov byte [edx], al
mov ecx, dword [ebp - 0x28]
add ecx, 1
mov dword [ebp - 0x28], ecx
jmp 0x1004b637
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
sub eax, 1
mov dword [ebp - 0x24], eax
test edx, edx
jne 0x1004b628
or eax, 0xffffffff
jmp 0x1004b905
mov ecx, dword [ebp - 0x28]
mov byte [ecx], 0
mov edx, dword [ebp - 0x28]
add edx, 1
mov dword [ebp - 0x28], edx
mov dword [ebp - 4], 0
jmp 0x1004b6ee
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x2c]
sub ecx, 1
mov dword [ebp - 0x2c], ecx
test eax, eax
jne 0x1004b65b
or eax, 0xffffffff
jmp 0x1004b905
mov edx, dword [ebp - 0x30]
movzx eax, byte [edx]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x30]
add ecx, 1
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x14]
and edx, 1
add edx, 2
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x14]
shr eax, 1
mov dword [ebp - 0x14], eax
je 0x1004b6da
mov ecx, dword [ebp + 0x14]
sub ecx, dword [ebp - 0x24]
cmp dword [ebp - 0x14], ecx
jbe 0x1004b696
or eax, 0xffffffff
jmp 0x1004b905
mov edx, dword [ebp - 0x10]
cmp edx, dword [ebp - 0x24]
jbe 0x1004b6a6
or eax, 0xffffffff
jmp 0x1004b905
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x10]
mov dword [ebp - 0x24], eax
jmp 0x1004b6ba
mov ecx, dword [ebp - 0x10]
sub ecx, 1
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], 0
je 0x1004b6d8
mov edx, dword [ebp - 0x28]
sub edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
mov cl, byte [edx]
mov byte [eax], cl
mov edx, dword [ebp - 0x28]
add edx, 1
mov dword [ebp - 0x28], edx
jmp 0x1004b6b1
jmp 0x1004b6e1
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], 1
jmp 0x1004b8b0
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x30]
push edx
call fcn.1004b400
add esp, 8
test eax, eax
jne 0x1004b70f
or eax, 0xffffffff
jmp 0x1004b905
cmp dword [ebp - 4], 0
jne 0x1004b79b
cmp dword [ebp - 0x14], 2
jne 0x1004b79b
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x30]
push edx
call fcn.1004b400
add esp, 8
test eax, eax
jne 0x1004b741
or eax, 0xffffffff
jmp 0x1004b905
mov eax, dword [ebp + 0x14]
sub eax, dword [ebp - 0x24]
cmp dword [ebp - 0x14], eax
jbe 0x1004b754
or eax, 0xffffffff
jmp 0x1004b905
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x24]
jbe 0x1004b764
or eax, 0xffffffff
jmp 0x1004b905
mov edx, dword [ebp - 0x24]
sub edx, dword [ebp - 0x10]
mov dword [ebp - 0x24], edx
jmp 0x1004b778
mov eax, dword [ebp - 0x10]
sub eax, 1
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x1004b796
mov ecx, dword [ebp - 0x28]
sub ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
mov al, byte [ecx]
mov byte [edx], al
mov ecx, dword [ebp - 0x28]
add ecx, 1
mov dword [ebp - 0x28], ecx
jmp 0x1004b76f
jmp 0x1004b8a9
cmp dword [ebp - 4], 0
jne 0x1004b7ac
mov edx, dword [ebp - 0x14]
sub edx, 3
mov dword [ebp - 0x14], edx
jmp 0x1004b7b5
mov eax, dword [ebp - 0x14]
sub eax, 2
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xfffffe
jbe 0x1004b7c6
or eax, 0xffffffff
jmp 0x1004b905
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x2c]
sub edx, 1
mov dword [ebp - 0x2c], edx
test ecx, ecx
jne 0x1004b7de
or eax, 0xffffffff
jmp 0x1004b905
mov eax, dword [ebp - 0x14]
shl eax, 8
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x30]
movzx edx, byte [ecx]
add edx, dword [ebp - 0x14]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x30]
add eax, 1
mov dword [ebp - 0x30], eax
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x30]
push edx
call fcn.1004b400
add esp, 8
test eax, eax
jne 0x1004b818
or eax, 0xffffffff
jmp 0x1004b905
cmp dword [ebp - 0x14], 0x7d00
jb 0x1004b82a
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x14], 0x500
jb 0x1004b83c
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x14], 0x80
jae 0x1004b84e
mov edx, dword [ebp - 0x10]
add edx, 2
mov dword [ebp - 0x10], edx
mov eax, dword [ebp + 0x14]
sub eax, dword [ebp - 0x24]
cmp dword [ebp - 0x14], eax
jbe 0x1004b861
or eax, 0xffffffff
jmp 0x1004b905
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x24]
jbe 0x1004b871
or eax, 0xffffffff
jmp 0x1004b905
mov edx, dword [ebp - 0x24]
sub edx, dword [ebp - 0x10]
mov dword [ebp - 0x24], edx
jmp 0x1004b885
mov eax, dword [ebp - 0x10]
sub eax, 1
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x1004b8a3
mov ecx, dword [ebp - 0x28]
sub ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
mov al, byte [ecx]
mov byte [edx], al
mov ecx, dword [ebp - 0x28]
add ecx, 1
mov dword [ebp - 0x28], ecx
jmp 0x1004b87c
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0xc], edx
mov dword [ebp - 4], 1
jmp 0x1004b8fa
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x2c]
sub ecx, 1
mov dword [ebp - 0x2c], ecx
test eax, eax
je 0x1004b8d2
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
sub eax, 1
mov dword [ebp - 0x24], eax
test edx, edx
jne 0x1004b8d7
or eax, 0xffffffff
jmp 0x1004b905
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x30]
mov al, byte [edx]
mov byte [ecx], al
mov ecx, dword [ebp - 0x28]
add ecx, 1
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x30]
add edx, 1
mov dword [ebp - 0x30], edx
mov dword [ebp - 4], 0
jmp 0x1004b502
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp + 0x10]
mov esp, ebp
pop ebp
ret