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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 0xc]
sub esp, 0x9c
test eax, eax
push ebx
push esi
push edi
jne 0x211249fd
mov dword [0x2118b1f0], eax
jmp 0x21124a0c
mov ecx, str.Output_file_types
call fcn.21123f50
mov dword [0x2118b1f0], eax
mov esi, dword [ebp + 8]
cmp dword [esi + 8], 0x20534c44
je 0x21124a2d
push str.Not_a_DLS_file.
call sym.mss32.dll__AIL_set_error_4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ebx, dword [esi + 4]
add ebx, 8
push ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x78], ebx
call sym.mss32.dll__AIL_mem_alloc_lock_4
mov edi, eax
test edi, edi
mov dword [esp + 0xc], edi
je 0x21124a22
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x21124a60
push 0
push 0
call eax
test eax, eax
je 0x21124fe2
push ebx
push esi
push edi
call fcn.2113c7c0
mov eax, dword [edi + 4]
mov ecx, eax
and ecx, 1
add ecx, eax
lea ebx, [ecx + edi + 8]
lea eax, [edi + 0xc]
add esp, 0xc
cmp eax, ebx
mov dword [edi + 8], 0x20534c4d
mov dword [esp + 0x24], ebx
jae 0x21124aaa
jmp 0x21124a90
cmp dword [eax], 0x6c627470
je 0x21124abf
mov ecx, dword [eax + 4]
mov edx, ecx
and edx, 1
add edx, ecx
lea eax, [eax + edx + 8]
cmp eax, ebx
jb 0x21124a90
push str.No_PTBL_chunk_found.
call sym.mss32.dll__AIL_set_error_4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [eax + 8]
add eax, 8
add ecx, eax
mov dword [esp + 0x44], eax
mov eax, dword [eax + 4]
mov esi, edi
add esi, 0xc
and eax, 0xffffff
xor edi, edi
cmp esi, ebx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x18], eax
jae 0x21124b88
lea ebx, [ebx]
cmp dword [esi], 0x5453494c
jne 0x21124b72
cmp dword [esi + 8], 0x6c707677
jne 0x21124b72
mov eax, dword [esi + 4]
mov ecx, eax
and ecx, 1
add ecx, eax
lea ecx, [ecx + esi + 8]
lea edx, [esi + 0xc]
cmp edx, ecx
mov dword [esp + 0x10], ecx
jae 0x21124b72
lea ebx, [ebx]
cmp dword [edx], 0x5453494c
mov ebx, dword [esp + 0x3c]
jne 0x21124b5c
cmp dword [edx + 8], 0x65766177
jne 0x21124b5c
mov ecx, edx
sub ecx, esi
xor eax, eax
sub ecx, 0xc
cmp dword [esp + 0x18], eax
jbe 0x21124b55
cmp dword [ebx + eax*4], ecx
jne 0x21124b4c
mov dword [ebx + eax*4], edi
add eax, 1
cmp eax, dword [esp + 0x18]
jb 0x21124b44
mov ecx, dword [esp + 0x10]
add edi, 1
mov eax, dword [edx + 4]
mov ebx, eax
and ebx, 1
add ebx, eax
lea edx, [edx + ebx + 8]
cmp edx, ecx
jb 0x21124b20
mov ebx, dword [esp + 0x24]
mov eax, dword [esi + 4]
mov edx, eax
and edx, 1
add edx, eax
lea esi, [esi + edx + 8]
cmp esi, ebx
jb 0x21124af0
xor esi, esi
mov dword [esp + 0x2c], esi
mov edi, edi
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx + 4]
mov edx, eax
and edx, 1
add edx, eax
lea edi, [edx + ecx + 8]
lea eax, [ecx + 0xc]
mov edx, eax
xor ebx, ebx
cmp edx, edi
mov dword [esp + 0x34], esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x38], edx
mov dword [esp + 0x20], esi
jae 0x2112504a
jmp 0x21124bd0
cmp dword [edx], 0x5453494c
jne 0x21124cc1
cmp dword [edx + 8], 0x6c707677
jne 0x21124cc1
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 0x21124cc1
jmp 0x21124c10
cmp dword [ecx], 0x5453494c
jne 0x21124ca1
cmp dword [ecx + 8], 0x65766177
jne 0x21124ca1
mov eax, dword [ecx + 4]
mov esi, eax
and esi, 1
add esi, eax
xor edi, edi
lea eax, [ecx + 0xc]
lea esi, [esi + ecx + 8]
cmp eax, esi
mov dword [esp + 0x40], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x6c], eax
jae 0x21124c8d
mov edx, dword [eax]
cmp edx, 0x61746164
jne 0x21124c58
mov dword [esp + 0x24], eax
jmp 0x21124c70
cmp edx, 0x20746d66
jne 0x21124c64
mov edi, eax
jmp 0x21124c70
cmp edx, 0x206d6370
jne 0x21124c70
mov dword [esp + 0x40], eax
mov edx, dword [eax + 4]
mov ebx, edx
and ebx, 1
add ebx, edx
lea eax, [eax + ebx + 8]
cmp eax, esi
jb 0x21124c48
cmp dword [esp + 0x40], 0
mov edx, dword [esp + 0x38]
jne 0x21124ca1
mov eax, dword [esp + 0x24]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x34], edi
mov dword [esp + 0x20], eax
mov eax, dword [ecx + 4]
mov esi, eax
and esi, 1
add esi, eax
lea ecx, [ecx + esi + 8]
cmp ecx, dword [esp + 0x70]
jb 0x21124c10
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x1c]
mov eax, dword [edx + 4]
mov ecx, eax
and ecx, 1
add ecx, eax
lea edx, [edx + ecx + 8]
cmp edx, edi
mov dword [esp + 0x38], edx
jb 0x21124bd0
mov eax, dword [esp + 0x34]
test eax, eax
je 0x2112504a
test ebx, ebx
je 0x2112504a
cmp dword [esp + 0x20], 0
je 0x2112504a
mov edx, dword [eax + 4]
add edx, 8
push edx
push eax
lea eax, [esp + 0x80]
push eax
call fcn.2113c7c0
movzx esi, word [esp + 0x98]
mov eax, dword [esp + 0x90]
add dword [esp + 0x38], 0x64
lea ecx, [ebx + 8]
mov dword [esp + 0x58], ecx
movzx ecx, word [esp + 0x9a]
mov dword [esp + 0x54], 1
mov edx, dword [ebx + 4]
mov dword [esp + 0x5c], edx
movzx edx, word [esp + 0x8e]
mov dword [esp + 0x64], ecx
mov ecx, dword [ebp + 0x18]
add esp, 0xc
test ecx, ecx
mov dword [esp + 0x78], 0x206d6370
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], edx
mov dword [esp + 0x64], esi
je 0x21124dc2
mov eax, dword [esp + 0x2c]
fild dword [esp + 0x2c]
test eax, eax
jge 0x21124d7d
fadd dword [0x21158450]
mov edx, dword [esp + 0x18]
fild dword [esp + 0x18]
test edx, edx
jge 0x21124d8f
fadd dword [0x21158450]
fdivp st(1)
fst dword [esp + 0x10]
fld dword [0x21158458]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0x21124dac
fstp dword [esp + 0x10]
jmp 0x21124dae
fstp st(0)
mov eax, dword [esp + 0x10]
push eax
push 2
call ecx
test eax, eax
je 0x21124fe2
mov ecx, dword [ebp + 0x18]
cmp dword [0x2118b1f0], 0
je 0x21124ede
mov eax, dword [esp + 0x50]
xor edx, edx
div esi
cmp eax, dword [0x211656fc]
jb 0x21124ede
push ecx
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x54]
call fcn.21124000
test eax, eax
je 0x21125001
mov edi, dword [esp + 0x30]
lea eax, [edi + 0x44]
push eax
call sym.mss32.dll__AIL_mem_alloc_lock_4
mov esi, eax
test esi, esi
je 0x21125020
mov ecx, dword [esp + 0x14]
push edi
push ecx
lea edx, [esi + 0x40]
push edx
call fcn.2113c7c0
mov eax, dword [esp + 0x20]
add esp, 0xc
push eax
call sym.mss32.dll__AIL_mem_free_lock_4
mov dword [esi + 4], 0x38
mov dword [esi], 0x46464952
mov dword [esi + 8], 0x45564157
mov dword [esi + 0xc], 0x20746d66
mov dword [esi + 0x10], 0x16
xor ecx, ecx
mov word [esi + 0x14], cx
mov dx, word [esp + 0x5c]
mov word [esi + 0x16], dx
mov eax, dword [esp + 0x54]
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x58]
cdq
and edx, 7
add eax, edx
sar eax, 3
imul eax, dword [esp + 0x5c]
imul eax, dword [esp + 0x54]
mov dword [esi + 0x1c], eax
mov word [esi + 0x22], cx
mov eax, 4
mov word [esi + 0x24], ax
mov dword [esi + 0x30], eax
mov word [esi + 0x20], 1
mov dword [esi + 0x2c], 0x74636166
mov eax, dword [esp + 0x58]
cdq
and edx, 7
add eax, edx
mov ecx, eax
mov eax, dword [esp + 0x50]
xor edx, edx
sar ecx, 3
div ecx
xor edx, edx
div dword [esp + 0x5c]
mov dword [esi + 0x3c], edi
add edi, 0x38
mov dword [esi + 0x38], 0x61746164
mov dword [esi + 4], edi
mov dword [esi + 0x26], 0x33504d
mov dword [esi + 0x34], eax
mov dword [esp + 0x14], esi
jmp 0x21124ef7
push 0
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x50]
push eax
call sym.mss32.dll__AIL_compress_ADPCM_12
test eax, eax
je 0x21125035
mov esi, dword [esp + 0x14]
mov ecx, dword [esi + 0x10]
add esi, 0xc
mov edx, dword [ecx + esi + 0xc]
lea edi, [ecx + esi + 8]
lea eax, [edx + edi + 8]
push eax
mov eax, dword [esp + 0x10]
mov edx, ebx
call fcn.211248f0
mov ebx, dword [esp + 0x2c]
add ebx, eax
mov eax, dword [esp + 0x38]
add esp, 4
push eax
mov eax, dword [esp + 0x10]
call fcn.21124730
add esp, 4
push edi
mov edi, dword [esp + 0x24]
sub ebx, eax
mov eax, dword [esp + 0x10]
mov ecx, edi
call fcn.21124800
add esp, 4
add ebx, eax
mov eax, dword [esp + 0xc]
push esi
mov ecx, edi
call fcn.21124800
add word [0x2118b278], 1
mov esi, dword [esp + 0x18]
add esp, 4
add ebx, eax
cmp word [0x2118b270], 0
je 0x21124fac
cmp word [0x2118b278], 1
je 0x21124f85
cmp word [0x2118b274], 0
je 0x21124fac
mov ecx, dword [0x2118b1f8]
test ecx, ecx
jne 0x21124fac
call fcn.211120b0
test eax, eax
je 0x21124fac
mov ecx, dword [0x2118eef8]
push esi
push str.AIL_mem_free_lock_0x_lX__n
call fcn.21111c20
add esp, 8
test esi, esi
je 0x21124fb7
push esi
call dword [0x21164164]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x20]
add word [0x2118b278], 0xffff
lea edx, [esp + 0x78]
push edx
call fcn.21124800
add ebx, eax
add esp, 4
mov dword [esp + 0x28], ebx
xor esi, esi
jmp 0x21124b90
mov eax, dword [esp + 0xc]
push eax
call sym.mss32.dll__AIL_mem_free_lock_4
push str.Compression_cancelled.
call sym.mss32.dll__AIL_set_error_4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [esp + 0x4c]
push ecx
call sym.mss32.dll__AIL_mem_free_lock_4
mov edx, dword [esp + 0xc]
push edx
call sym.mss32.dll__AIL_mem_free_lock_4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [esp + 0xc]
push eax
call sym.mss32.dll__AIL_mem_free_lock_4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [esp + 0xc]
push ecx
call sym.mss32.dll__AIL_mem_free_lock_4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov edi, dword [esp + 0xc]
mov eax, dword [edi + 4]
mov edx, eax
and edx, 1
add edx, eax
lea ecx, [edx + edi + 8]
lea esi, [edi + 0xc]
xor ebx, ebx
cmp esi, ecx
mov dword [esp + 0x1c], ecx
jae 0x21125108
lea ecx, [ecx]
cmp dword [esi], 0x5453494c
jne 0x211250ee
cmp dword [esi + 8], 0x6c707677
jne 0x211250ee
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
mov dword [esp + 0x30], edi
jae 0x211250ee
cmp dword [edx], 0x5453494c
jne 0x211250d8
cmp dword [edx + 8], 0x65766177
jne 0x211250d8
mov ecx, edx
sub ecx, esi
xor eax, eax
sub ecx, 0xc
cmp dword [esp + 0x18], eax
jbe 0x211250d5
mov edi, dword [esp + 0x3c]
mov edi, edi
cmp dword [edi + eax*4], ebx
jne 0x211250c8
mov dword [edi + eax*4], ecx
add eax, 1
cmp eax, dword [esp + 0x18]
jb 0x211250c0
mov edi, dword [esp + 0x30]
add ebx, 1
mov eax, dword [edx + 4]
mov ecx, eax
and ecx, 1
add ecx, eax
lea edx, [edx + ecx + 8]
cmp edx, edi
jb 0x2112509a
mov ecx, dword [esp + 0x1c]
mov eax, dword [esi + 4]
mov edx, eax
and edx, 1
add edx, eax
lea esi, [esi + edx + 8]
cmp esi, ecx
jb 0x21125070
mov edi, dword [esp + 0xc]
mov eax, dword [ebp + 0x14]
test eax, eax
mov ecx, dword [esp + 0x28]
je 0x21125115
mov dword [eax], ecx
cmp dword [0x2118b1f0], 0
je 0x21125144
mov eax, ecx
shr eax, 1
add eax, dword [esp + 0x74]
xor edx, edx
div ecx
mov ecx, eax
mov eax, dword [esp + 0x44]
mov edx, dword [eax + 4]
add ecx, 1
shl ecx, 0x18
and edx, 0xffffff
or ecx, edx
mov dword [eax + 4], ecx
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x2112514f
mov dword [eax], edi
jmp 0x21125155
push edi
call sym.mss32.dll__AIL_mem_free_lock_4
cmp dword [ebp + 0x18], 0
je 0x21125162
push 0
push 3
call dword [ebp + 0x18]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x14