Function at 0x21126810
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x98
test eax, eax
jne 0x21126825
mov dword [0x21159158], eax
jmp 0x2112683a
push eax
push str.Output_file_types
push str.ASI_codec
call sym.mss32.dll_RIB_find_file_provider
mov dword [0x21159158], eax
push esi
mov esi, dword [esp + 0xa0]
cmp dword [esi + 8], 0x20534c44
je 0x21126861
push str.Not_a_DLS_file.
call sym.mss32.dll__AIL_set_error_4
xor eax, eax
pop esi
add esp, 0x98
ret 0x14
push ebx
push ebp
push edi
mov edi, dword [esi + 4]
add edi, 8
push edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x78], edi
call sym.mss32.dll__AIL_mem_alloc_lock_4
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x1c], ebp
je 0x211268f4
mov eax, dword [esp + 0xbc]
test eax, eax
je 0x2112689b
push 0
push 0
call eax
test eax, eax
je 0x21126e1b
mov ecx, edi
mov eax, ecx
shr ecx, 2
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov ecx, eax
and ecx, 1
add ecx, eax
lea edx, [ecx + ebp + 8]
lea eax, [ebp + 0xc]
cmp eax, edx
mov dword [ebp + 8], 0x20534c4d
mov dword [esp + 0x18], edx
jae 0x211268ea
lea ecx, [ecx]
cmp dword [eax], 0x6c627470
je 0x21126903
mov ecx, dword [eax + 4]
mov esi, ecx
and esi, 1
add esi, ecx
lea eax, [eax + esi + 8]
cmp eax, edx
jb 0x211268d0
push str.No_PTBL_chunk_found.
call sym.mss32.dll__AIL_set_error_4
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x98
ret 0x14
mov edi, dword [eax + 8]
mov ebx, dword [eax + 0xc]
add eax, 8
add edi, eax
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x18]
lea esi, [ebp + 0xc]
xor ecx, ecx
and ebx, 0xffffff
cmp esi, eax
mov dword [esp + 0x6c], edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x28], ebx
jae 0x211269cb
cmp dword [esi], 0x5453494c
jne 0x211269b1
cmp dword [esi + 8], 0x6c707677
jne 0x211269b1
mov eax, dword [esi + 4]
mov edx, eax
and edx, 1
add edx, eax
lea eax, [edx + esi + 8]
lea edx, [esi + 0xc]
cmp edx, eax
mov dword [esp + 0x14], eax
jae 0x211269b1
nop
cmp dword [edx], 0x5453494c
jne 0x21126999
cmp dword [edx + 8], 0x65766177
jne 0x21126999
mov eax, edx
sub eax, esi
sub eax, 0xc
xor ecx, ecx
test ebx, ebx
jbe 0x21126995
mov edi, edi
cmp dword [edi + ecx*4], eax
jne 0x21126990
mov ebx, dword [esp + 0x10]
mov dword [edi + ecx*4], ebx
mov ebx, dword [esp + 0x28]
inc ecx
cmp ecx, ebx
jb 0x21126980
inc dword [esp + 0x10]
mov eax, dword [edx + 4]
mov ecx, eax
and ecx, 1
add ecx, eax
mov eax, dword [esp + 0x14]
lea edx, [edx + ecx + 8]
cmp edx, eax
jb 0x21126960
xor ecx, ecx
mov eax, dword [esi + 4]
mov edx, eax
and edx, 1
add edx, eax
mov eax, dword [esp + 0x18]
lea esi, [esi + edx + 8]
cmp esi, eax
jb 0x21126935
mov dword [esp + 0x30], ecx
nop
mov eax, dword [ebp + 4]
mov edx, eax
and edx, 1
add edx, eax
lea esi, [edx + ebp + 8]
lea eax, [ebp + 0xc]
mov edx, eax
xor ebx, ebx
cmp edx, esi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x34], edx
mov dword [esp + 0x20], ecx
jae 0x21126e72
cmp dword [edx], 0x5453494c
jne 0x21126b00
cmp dword [edx + 8], 0x6c707677
jne 0x21126b00
mov eax, dword [edx + 4]
mov ecx, eax
and ecx, 1
add ecx, eax
lea eax, [ecx + edx + 8]
lea ecx, [edx + 0xc]
cmp ecx, eax
mov dword [esp + 0x70], eax
jae 0x21126b00
jmp 0x21126a40
cmp dword [ecx], 0x5453494c
jne 0x21126ade
cmp dword [ecx + 8], 0x65766177
jne 0x21126ade
mov eax, dword [ecx + 4]
mov esi, eax
and esi, 1
add esi, eax
lea eax, [ecx + 0xc]
xor edi, edi
lea esi, [esi + ecx + 8]
xor ebx, ebx
cmp eax, esi
mov dword [esp + 0x14], edi
mov dword [esp + 0x64], eax
jae 0x21126aca
lea ebx, [ebx]
mov edx, dword [eax]
cmp edx, 0x61746164
jne 0x21126a8e
mov ebx, eax
jmp 0x21126aa6
cmp edx, 0x20746d66
jne 0x21126a9a
mov edi, eax
jmp 0x21126aa6
cmp edx, 0x206d6370
jne 0x21126aa6
mov dword [esp + 0x14], eax
mov edx, dword [eax + 4]
mov ebp, edx
and ebp, 1
add ebp, edx
lea eax, [eax + ebp + 8]
cmp eax, esi
jb 0x21126a80
mov eax, dword [esp + 0x14]
test eax, eax
mov edx, dword [esp + 0x34]
mov ebp, dword [esp + 0x1c]
jne 0x21126ade
jmp 0x21126ace
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x64]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], eax
mov eax, dword [ecx + 4]
mov esi, eax
and esi, 1
add esi, eax
mov eax, dword [esp + 0x70]
lea ecx, [ecx + esi + 8]
cmp ecx, eax
jb 0x21126a40
mov esi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x2c]
mov eax, dword [edx + 4]
mov ecx, eax
and ecx, 1
add ecx, eax
lea edx, [edx + ecx + 8]
cmp edx, esi
mov dword [esp + 0x34], edx
jb 0x21126a01
mov esi, dword [esp + 0x18]
test esi, esi
je 0x21126e72
test ebx, ebx
je 0x21126e72
mov eax, dword [esp + 0x20]
test eax, eax
je 0x21126e72
mov ecx, dword [esi + 4]
add ecx, 8
mov edx, ecx
shr ecx, 2
lea edi, [esp + 0x78]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movzx esi, word [esp + 0x8c]
mov edi, dword [esp + 0xbc]
mov edx, dword [esp + 0x84]
lea eax, [ebx + 8]
mov dword [esp + 0x44], eax
movzx eax, word [esp + 0x8e]
mov dword [esp + 0x40], 1
mov ecx, dword [ebx + 4]
mov dword [esp + 0x48], ecx
movzx ecx, word [esp + 0x82]
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x30]
add ecx, 0x64
test edi, edi
mov dword [esp + 0x78], 0x206d6370
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], eax
mov dword [esp + 0x5c], esi
mov dword [esp + 0x30], ecx
je 0x21126c03
fild dword [esp + 0x30]
mov edx, ecx
test edx, edx
jge 0x21126bc5
fadd dword [0x2114bd78]
mov eax, dword [esp + 0x28]
fild dword [esp + 0x28]
test eax, eax
jge 0x21126bd7
fadd dword [0x2114bd78]
fdivp st(1)
fst dword [esp + 0x14]
fcomp dword [0x2114be0c]
fnstsw ax
test ah, 0x41
jne 0x21126bf2
mov dword [esp + 0x14], 0x42c80000
mov ecx, dword [esp + 0x14]
push ecx
push 2
call edi
test eax, eax
je 0x21126e1b
mov eax, dword [0x21159158]
test eax, eax
je 0x21126d28
mov eax, dword [esp + 0x48]
xor edx, edx
div esi
cmp eax, dword [0x211566ac]
jb 0x21126d28
push edi
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x4c]
call fcn.21125ec0
test eax, eax
je 0x21126e3a
mov ebp, dword [esp + 0x38]
lea ecx, [ebp + 0x44]
push ecx
call sym.mss32.dll__AIL_mem_alloc_lock_4
mov ebx, eax
test ebx, ebx
je 0x21126e59
mov esi, dword [esp + 0x10]
mov ecx, ebp
mov edx, ecx
shr ecx, 2
lea edi, [ebx + 0x40]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x10]
push eax
call sym.mss32.dll__AIL_mem_free_lock_4
mov dword [ebx + 4], 0x38
mov dword [ebx], 0x46464952
mov dword [ebx + 8], 0x45564157
mov dword [ebx + 0xc], 0x20746d66
mov dword [ebx + 0x10], 0x16
xor ecx, ecx
mov word [ebx + 0x14], cx
mov dx, word [esp + 0x54]
mov word [ebx + 0x16], dx
mov eax, dword [esp + 0x4c]
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0x50]
cdq
and edx, 7
add eax, edx
sar eax, 3
imul eax, dword [esp + 0x54]
imul eax, dword [esp + 0x4c]
mov dword [ebx + 0x1c], eax
mov word [ebx + 0x22], cx
mov eax, 4
mov word [ebx + 0x24], ax
mov dword [ebx + 0x30], eax
mov word [ebx + 0x20], 1
mov dword [ebx + 0x2c], 0x74636166
mov eax, dword [esp + 0x50]
cdq
and edx, 7
add eax, edx
mov ecx, eax
mov eax, dword [esp + 0x48]
xor edx, edx
sar ecx, 3
div ecx
xor edx, edx
div dword [esp + 0x54]
mov dword [ebx + 0x3c], ebp
add ebp, 0x38
mov dword [ebx + 4], ebp
mov ebp, dword [esp + 0x1c]
mov dword [ebx + 0x38], 0x61746164
mov dword [ebx + 0x26], 0x33504d
mov dword [ebx + 0x34], eax
mov dword [esp + 0x10], ebx
jmp 0x21126d41
push 0
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x48]
push eax
call sym.mss32.dll__AIL_compress_ADPCM_12
test eax, eax
je 0x21126e44
mov esi, dword [esp + 0x10]
mov ecx, dword [esi + 0x10]
add esi, 0xc
mov edx, dword [ecx + esi + 0xc]
lea edi, [ecx + esi + 8]
lea eax, [edx + edi + 8]
mov edx, dword [esp + 0x2c]
push eax
mov eax, ebp
call fcn.21126700
mov ebx, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
add ebx, eax
mov eax, ebp
call fcn.21126530
sub ebx, eax
mov eax, dword [esp + 0x24]
push eax
mov eax, edi
mov ecx, ebp
call fcn.21126600
mov ecx, dword [esp + 0x28]
add ebx, eax
push ecx
mov eax, esi
mov ecx, ebp
call fcn.21126600
mov esi, dword [esp + 0x1c]
add esp, 0xc
add ebx, eax
inc word [0x2115929c]
cmp word [0x21159294], 0
je 0x21126de9
cmp word [0x2115929c], 1
je 0x21126dc2
cmp word [0x21159298], 0
je 0x21126de9
mov eax, dword [0x21159308]
test eax, eax
jne 0x21126de9
call fcn.21112300
test eax, eax
je 0x21126de9
mov edx, dword [0x2115c0bc]
push esi
push str.AIL_mem_free_lock_0x_lX__r_n
push edx
call fcn.211306e2
add esp, 0xc
test esi, esi
je 0x21126df4
push esi
call dword [0x21155834]
mov eax, dword [esp + 0x20]
dec word [0x2115929c]
push eax
lea eax, [esp + 0x7c]
mov ecx, ebp
call fcn.21126600
add ebx, eax
add esp, 4
mov dword [esp + 0x24], ebx
xor ecx, ecx
jmp 0x211269d0
push ebp
call sym.mss32.dll__AIL_mem_free_lock_4
push str.Compression_cancelled.
call sym.mss32.dll__AIL_set_error_4
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x98
ret 0x14
mov ecx, dword [esp + 0x44]
push ecx
call sym.mss32.dll__AIL_mem_free_lock_4
push ebp
call sym.mss32.dll__AIL_mem_free_lock_4
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x98
ret 0x14
mov edx, dword [esp + 0x1c]
push edx
call sym.mss32.dll__AIL_mem_free_lock_4
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x98
ret 0x14
mov eax, dword [ebp + 4]
mov ecx, eax
and ecx, 1
add ecx, eax
lea ecx, [ecx + ebp + 8]
lea esi, [ebp + 0xc]
cmp esi, ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x10], 0
jae 0x21126f37
mov ebx, dword [esp + 0x6c]
jmp 0x21126ea0
cmp dword [esi], 0x5453494c
jne 0x21126f21
cmp dword [esi + 8], 0x6c707677
jne 0x21126f21
mov eax, dword [esi + 4]
mov edx, eax
and edx, 1
add edx, eax
lea edi, [edx + esi + 8]
lea edx, [esi + 0xc]
cmp edx, edi
jae 0x21126f21
mov edi, edi
cmp dword [edx], 0x5453494c
jne 0x21126f0b
cmp dword [edx + 8], 0x65766177
jne 0x21126f0b
mov eax, edx
sub eax, esi
xor ecx, ecx
sub eax, 0xc
cmp dword [esp + 0x28], ecx
jbe 0x21126f07
mov ebp, dword [esp + 0x10]
cmp dword [ebx + ecx*4], ebp
jne 0x21126efc
mov dword [ebx + ecx*4], eax
inc ecx
cmp ecx, dword [esp + 0x28]
jb 0x21126ef4
mov ebp, dword [esp + 0x1c]
inc dword [esp + 0x10]
mov eax, dword [edx + 4]
mov ecx, eax
and ecx, 1
add ecx, eax
lea edx, [edx + ecx + 8]
cmp edx, edi
jb 0x21126ed0
mov ecx, dword [esp + 0x38]
mov eax, dword [esi + 4]
mov edx, eax
and edx, 1
add edx, eax
lea esi, [esi + edx + 8]
cmp esi, ecx
jb 0x21126ea0
mov eax, dword [esp + 0xb8]
test eax, eax
mov ecx, dword [esp + 0x24]
je 0x21126f48
mov dword [eax], ecx
mov eax, dword [0x21159158]
test eax, eax
je 0x21126f77
mov edx, dword [esp + 0x74]
mov eax, ecx
shr eax, 1
add eax, edx
xor edx, edx
div ecx
inc eax
shl eax, 0x18
mov ecx, eax
mov eax, dword [esp + 0x68]
mov edx, dword [eax + 4]
and edx, 0xffffff
or ecx, edx
mov dword [eax + 4], ecx
mov eax, dword [esp + 0xb4]
test eax, eax
je 0x21126f86
mov dword [eax], ebp
jmp 0x21126f8c
push ebp
call sym.mss32.dll__AIL_mem_free_lock_4
mov eax, dword [esp + 0xbc]
test eax, eax
je 0x21126f9d
push 0
push 3
call eax
pop edi
pop ebp
pop ebx
mov eax, 1
pop esi
add esp, 0x98
ret 0x14