Function at 0x407640
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1002f5a0
push 0x1001bbe4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3b8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
xor ebx, ebx
mov dword [ebp - 0x124], ebx
mov dword [ebp - 0x120], ebx
wait
mov dword [ebp - 4], ebx
mov ecx, 0x27
xor eax, eax
mov esi, dword [ebp + 0xc]
mov edi, esi
rep stosd dword es:[edi], eax
wait
mov dword [ebp - 4], 0xffffffff
push 0x104
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x11c]
push ecx
call dword [0x1002f068]
push ebx
push 0x23
push 3
push ebx
push 1
push 0x80000000
lea edx, [ebp - 0x11c]
push edx
call dword [0x1002f05c]
mov edi, eax
mov dword [ebp - 0x1b8], edi
cmp edi, 0xffffffff
je 0x408062
push ebx
push edi
call dword [0x1002f058]
mov dword [ebp - 0x1c0], eax
push 2
push ebx
push 0xffffffffffffff80
push edi
call dword [0x1002f054]
push ebx
lea eax, [ebp - 0x124]
push eax
push 0x80
lea ecx, [ebp - 0x1a8]
push ecx
push edi
call dword [0x1002f06c]
test eax, eax
je 0x408048
cmp dword [ebp - 0x124], 0x80
jne 0x408048
mov edx, dword [ebp - 0x1a8]
and edx, 0xffffff
cmp edx, 0x474154
jne 0x4077c9
or dword [esi], 1
lea edi, [esi + 8]
mov ecx, 7
lea esi, [ebp - 0x1a5]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov eax, dword [ebp + 0xc]
lea edi, [eax + 0x28]
mov ecx, 7
lea esi, [ebp - 0x187]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea edi, [eax + 0x48]
mov ecx, 7
lea esi, [ebp - 0x169]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov ecx, dword [ebp - 0x14b]
mov dword [eax + 0x68], ecx
lea edi, [eax + 0x6e]
mov ecx, 7
lea esi, [ebp - 0x147]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edx, dword [ebp - 0x129]
and edx, 0xff
mov dword [eax + 0x90], edx
cmp byte [eax + 0x8a], bl
jne 0x4077c0
mov al, byte [eax + 0x8b]
cmp al, bl
je 0x4077c0
and eax, 0xff
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x94], eax
mov edi, dword [ebp - 0x1b8]
mov esi, dword [ebp + 0xc]
push ebx
push ebx
push ebx
push edi
call dword [0x1002f054]
push ebx
lea edx, [ebp - 0x124]
push edx
push 0xa
lea eax, [ebp - 0x1b4]
push eax
push edi
call dword [0x1002f06c]
test eax, eax
je 0x408048
cmp dword [ebp - 0x124], 0xa
jne 0x408048
mov ecx, dword [ebp - 0x1b4]
and ecx, 0xffffff
cmp ecx, 0x334449
jne 0x40784e
or dword [esi], 2
movsx eax, byte [ebp - 0x1ae]
shl eax, 7
movsx edx, byte [ebp - 0x1ad]
add eax, edx
shl eax, 7
movsx ecx, byte [ebp - 0x1ac]
add eax, ecx
shl eax, 7
movsx edx, byte [ebp - 0x1ab]
add eax, edx
mov dword [ebp - 0x120], eax
push 1
push ebx
push eax
jmp 0x407851
push ebx
push ebx
push ebx
push edi
call dword [0x1002f054]
mov dword [ebp - 0x390], ebx
mov dword [ebp - 0x1c4], ebx
mov dword [ebp - 0x388], ebx
mov dword [ebp - 0x1fc], 2
mov dword [ebp - 0x1f8], 3
mov dword [ebp - 0x1f4], 1
mov dword [ebp - 0x1f0], ebx
mov dword [ebp - 0x1ec], 0xac44
mov dword [ebp - 0x1e8], 0xbb80
mov dword [ebp - 0x1e4], 0x7d00
mov dword [ebp - 0x1e0], ebx
mov dword [ebp - 0x380], ebx
mov edi, 0x20
mov dword [ebp - 0x37c], edi
mov edx, 0x40
mov dword [ebp - 0x378], edx
mov ecx, 0x60
mov dword [ebp - 0x374], ecx
mov dword [ebp - 0x370], 0x80
mov eax, 0xa0
mov dword [ebp - 0x36c], eax
mov dword [ebp - 0x368], 0xc0
mov dword [ebp - 0x364], 0xe0
mov dword [ebp - 0x360], 0x100
mov dword [ebp - 0x35c], 0x120
mov dword [ebp - 0x358], 0x140
mov dword [ebp - 0x354], 0x160
mov dword [ebp - 0x350], 0x180
mov dword [ebp - 0x34c], 0x1a0
mov dword [ebp - 0x348], 0x1c0
mov dword [ebp - 0x344], ebx
mov dword [ebp - 0x340], ebx
mov dword [ebp - 0x33c], edi
mov dword [ebp - 0x338], 0x30
mov dword [ebp - 0x334], 0x38
mov dword [ebp - 0x330], edx
mov dword [ebp - 0x32c], 0x50
mov dword [ebp - 0x328], ecx
mov esi, 0x70
mov dword [ebp - 0x324], esi
mov dword [ebp - 0x320], 0x80
mov dword [ebp - 0x31c], eax
mov dword [ebp - 0x318], 0xc0
mov dword [ebp - 0x314], 0xe0
mov dword [ebp - 0x310], 0x100
mov dword [ebp - 0x30c], 0x140
mov dword [ebp - 0x308], 0x180
mov dword [ebp - 0x304], ebx
mov dword [ebp - 0x300], ebx
mov dword [ebp - 0x2fc], edi
mov dword [ebp - 0x2f8], 0x28
mov dword [ebp - 0x2f4], 0x30
mov dword [ebp - 0x2f0], 0x38
mov dword [ebp - 0x2ec], edx
mov dword [ebp - 0x2e8], 0x50
mov dword [ebp - 0x2e4], ecx
mov dword [ebp - 0x2e0], esi
mov dword [ebp - 0x2dc], 0x80
mov dword [ebp - 0x2d8], eax
mov dword [ebp - 0x2d4], 0xc0
mov dword [ebp - 0x2d0], 0xe0
mov dword [ebp - 0x2cc], 0x100
mov dword [ebp - 0x2c8], 0x140
mov dword [ebp - 0x2c4], ebx
mov dword [ebp - 0x2c0], ebx
mov dword [ebp - 0x2bc], edi
mov dword [ebp - 0x2b8], 0x30
mov dword [ebp - 0x2b4], 0x38
mov dword [ebp - 0x2b0], edx
mov dword [ebp - 0x2ac], 0x50
mov dword [ebp - 0x2a8], ecx
mov dword [ebp - 0x2a4], esi
mov dword [ebp - 0x2a0], 0x80
mov dword [ebp - 0x29c], 0x90
mov dword [ebp - 0x298], eax
mov dword [ebp - 0x294], 0xb0
mov dword [ebp - 0x290], 0xc0
mov dword [ebp - 0x28c], 0xe0
mov dword [ebp - 0x288], 0x100
mov dword [ebp - 0x284], ebx
mov dword [ebp - 0x280], ebx
mov dword [ebp - 0x27c], 8
mov dword [ebp - 0x278], 0x10
mov dword [ebp - 0x274], 0x18
mov dword [ebp - 0x270], edi
mov dword [ebp - 0x26c], 0x28
mov dword [ebp - 0x268], 0x30
mov dword [ebp - 0x264], 0x38
mov dword [ebp - 0x260], edx
mov dword [ebp - 0x25c], 0x50
mov dword [ebp - 0x258], ecx
mov dword [ebp - 0x254], esi
mov dword [ebp - 0x250], 0x80
mov dword [ebp - 0x24c], 0x90
mov dword [ebp - 0x248], eax
mov dword [ebp - 0x244], ebx
mov dword [ebp - 0x240], ebx
mov dword [ebp - 0x23c], 8
mov dword [ebp - 0x238], 0x10
mov dword [ebp - 0x234], 0x18
mov dword [ebp - 0x230], edi
mov dword [ebp - 0x22c], 0x28
mov dword [ebp - 0x228], 0x30
mov dword [ebp - 0x224], 0x38
mov dword [ebp - 0x220], edx
mov dword [ebp - 0x21c], 0x50
mov dword [ebp - 0x218], ecx
mov dword [ebp - 0x214], esi
mov dword [ebp - 0x210], 0x80
mov dword [ebp - 0x20c], 0x90
mov dword [ebp - 0x208], eax
mov dword [ebp - 0x204], ebx
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
test al, 2
je 0x407bfb
mov ecx, dword [ebp - 0x120]
lea edx, [ecx + 0xa]
jmp 0x407bfd
xor edx, edx
and eax, 1
shl eax, 7
mov ecx, dword [ebp - 0x1c0]
sub ecx, eax
sub ecx, edx
mov dword [ebp - 0x1dc], ecx
mov dword [ebp - 0x200], ebx
push ebx
lea edx, [ebp - 0x124]
push edx
push 4
lea eax, [ebp - 0x384]
push eax
mov esi, dword [ebp - 0x1b8]
push esi
mov edi, dword [0x1002f06c]
call edi
test eax, eax
je 0x407f53
cmp dword [ebp - 0x124], 4
jne 0x407f53
cmp byte [ebp - 0x384], 0xff
jne 0x407c60
cmp byte [ebp - 0x383], 0xe0
jae 0x407cdf
mov dword [ebp - 0x3a4], ebx
push ebx
lea ecx, [ebp - 0x124]
push ecx
push 4
lea edx, [ebp - 0x384]
push edx
push esi
call edi
inc dword [ebp - 0x3a4]
cmp eax, ebx
je 0x407c94
cmp dword [ebp - 0x124], 4
jne 0x407c94
mov ecx, 1
jmp 0x407c96
xor ecx, ecx
cmp ecx, ebx
je 0x407cba
cmp byte [ebp - 0x384], 0xff
jne 0x407cac
cmp byte [ebp - 0x383], 0xe0
jae 0x407cba
push 1
push ebx
push 0xfffffffffffffffd
push esi
call dword [0x1002f054]
jmp 0x407c66
cmp eax, ebx
je 0x407f53
cmp dword [ebp - 0x124], 4
jne 0x407f53
cmp dword [ebp - 0x3a4], 0x80
jge 0x407f53
mov eax, dword [ebp - 0x383]
and eax, 0xff
mov ecx, eax
shr ecx, 3
and ecx, 3
mov ecx, dword [ebp + ecx*4 - 0x1fc]
mov dword [ebp - 0x38c], ecx
cmp ecx, 3
je 0x407f53
shr eax, 1
and eax, 3
mov edx, 3
sub edx, eax
mov dword [ebp - 0x398], edx
cmp edx, 3
je 0x407f53
cmp ecx, 2
jne 0x407d30
cmp edx, ecx
jne 0x407f53
mov edx, dword [ebp - 0x382]
and edx, 0xff
mov edi, edx
shr edi, 1
and edi, 1
mov dword [ebp - 0x1d8], edi
mov eax, dword [ebp - 0x381]
and eax, 0xff
shr eax, 6
mov esi, edx
shr esi, 2
and esi, 3
mov esi, dword [ebp + esi*4 - 0x1ec]
sar esi, cl
mov dword [ebp - 0x1d0], esi
cmp esi, ebx
je 0x407f2f
xor ecx, ecx
cmp dword [ebp - 0x38c], ebx
setne cl
mov esi, dword [ebp - 0x398]
lea esi, [esi + ecx*2]
add ecx, esi
shl ecx, 4
shr edx, 4
add ecx, edx
mov ecx, dword [ebp + ecx*4 - 0x380]
lea ecx, [ecx + ecx*4]
lea ecx, [ecx + ecx*4]
lea esi, [ecx + ecx*4]
shl esi, 3
je 0x407f41
add dword [ebp - 0x390], esi
cmp dword [ebp - 0x200], ebx
jne 0x407ea4
cmp dword [ebp - 0x38c], ebx
je 0x407dd6
sub eax, 3
neg eax
sbb eax, eax
and eax, 8
add eax, 9
jmp 0x407de3
sub eax, 3
neg eax
sbb eax, eax
and eax, 0xf
add eax, 0x11
mov edi, eax
push 1
push ebx
push edi
mov edx, dword [ebp - 0x1b8]
push edx
call dword [0x1002f054]
push ebx
lea eax, [ebp - 0x124]
push eax
push 0x10
lea ecx, [ebp - 0x3b8]
push ecx
mov edx, dword [ebp - 0x1b8]
push edx
call dword [0x1002f06c]
test eax, eax
je 0x407e86
cmp dword [ebp - 0x124], 0x10
jne 0x407e86
cmp dword [ebp - 0x3b8], 0x676e6958
jne 0x407e86
test byte [ebp - 0x3b1], 1
je 0x407e86
mov eax, dword [ebp - 0x3b0]
and eax, 0xff
shl eax, 8
mov ecx, dword [ebp - 0x3af]
and ecx, 0xff
or eax, ecx
shl eax, 8
mov edx, dword [ebp - 0x3ae]
and edx, 0xff
or eax, edx
shl eax, 8
mov ecx, dword [ebp - 0x3ad]
and ecx, 0xff
or eax, ecx
mov dword [ebp - 0x388], eax
je 0x407e86
mov dword [ebp - 0x1c4], 1
push 1
push ebx
mov edx, 0xfffffff0
sub edx, edi
push edx
mov eax, dword [ebp - 0x1b8]
push eax
call dword [0x1002f054]
mov edi, dword [ebp - 0x1d8]
mov eax, dword [ebp - 0x398]
cmp eax, ebx
jne 0x407ec2
lea eax, [esi + esi*2]
shl eax, 2
cdq
idiv dword [ebp - 0x1d0]
add eax, edi
shl eax, 2
jmp 0x407ee5
cmp dword [ebp - 0x38c], ebx
je 0x407ed4
cmp eax, 2
mov eax, 0x48
je 0x407ed9
mov eax, 0x90
imul eax, esi
cdq
idiv dword [ebp - 0x1d0]
add eax, edi
push 1
push ebx
add eax, 0xfffffffc
push eax
mov ecx, dword [ebp - 0x1b8]
push ecx
call dword [0x1002f054]
mov eax, dword [ebp - 0x200]
inc eax
mov dword [ebp - 0x200], eax
cmp eax, 8
jb 0x407c19
mov eax, dword [ebp - 0x390]
xor edx, edx
div dword [ebp - 0x200]
mov edx, dword [ebp - 0x398]
cmp edx, ebx
jne 0x407f5f
lea ecx, [eax + eax*2]
shl ecx, 4
jmp 0x407f79
mov edx, dword [ebp - 0x1b8]
push edx
call dword [0x1002f040]
jmp 0x408062
mov eax, dword [ebp - 0x1b8]
push eax
call dword [0x1002f040]
jmp 0x408062
push esi
call dword [0x1002f040]
jmp 0x408062
cmp dword [ebp - 0x38c], ebx
je 0x407f71
cmp edx, 2
mov ecx, 0x48
je 0x407f76
mov ecx, 0x90
imul ecx, eax
mov dword [ebp - 0x3c0], ecx
fild dword [ebp - 0x3c0]
cmp dword [ebp - 0x1c4], ebx
je 0x407fcf
fstp st(0)
cmp edx, ebx
je 0x407fae
xor edx, edx
cmp eax, 0x7d00
setge dl
dec edx
and edx, 0xfffffdc0
add edx, 0x480
mov eax, edx
jmp 0x407fb3
mov eax, 0x180
imul eax, dword [ebp - 0x388]
cdq
idiv dword [ebp - 0x1d0]
mov dword [ebp - 0x3c4], eax
fild dword [ebp - 0x3c4]
jmp 0x408008
cmp edx, ebx
je 0x407ff2
xor ecx, ecx
cmp eax, 0x7d00
setge cl
dec ecx
and ecx, 0xfffffdc0
add ecx, 0x480
mov dword [ebp - 0x3c8], ecx
jmp 0x407ffc
mov dword [ebp - 0x3c8], 0x180
fidivr dword [ebp - 0x1dc]
fimul dword [ebp - 0x3c8]
fmul dword [0x1002f598]
call fcn.0041fcbc
mov edx, dword [ebp + 0xc]
mov dword [edx + 4], eax
push ebx
push ebx
push ebx
mov esi, dword [ebp - 0x1b8]
push esi
call dword [0x1002f054]
push esi
call dword [0x1002f040]
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
call dword [0x1002f040]
jmp 0x408062
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8