Function at 0x629d313c
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xfc
mov dword [ebp - 0xbc], ecx
call method.OpenMPT::SymVirtualHeader.IsValid___const
mov ebx, dword [ebp + 0xc]
test al, al
jne 0x629d31ae
mov esi, dword [ebp - 0xbc]
lea edi, [ebp - 0x98]
mov ecx, 0x20
lea eax, [ebp - 0x98]
rep movsd dword es:[edi], dword [esi]
lea esi, [ebp - 0xb0]
mov dword [esp + 8], eax
mov dword [esp + 0xc], pe_nt_image_headers32
mov dword [esp + 4], 2
mov dword [esp], esi
call method.OpenMPT::mpt::String::detail.ReadStringBuffer_abi:cxx11__OpenMPT::mpt::String::ReadWriteMode__char_const__unsigned_int_
mov eax, dword [ebp + 8]
mov dword [esp], esi
lea ecx, [eax + 0x1ec]
call method.mpt::mpt_libopenmpt::charbuf_32u_.operator_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
mov ecx, esi
push edi
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_dispose__
and word [ebx + 0x22], 0xffd1
mov ecx, dword [ebp - 0xbc]
mov dword [esp], ebx
call method.OpenMPT::SymInstrument.GetSampleLoop_OpenMPT::ModSample_const__const
mov dword [ebp - 0xc4], eax
mov eax, dword [ebp - 0xbc]
push ecx
test edx, edx
mov dword [ebp - 0xc0], edx
setne byte [ebp - 0xe9]
cmp byte [eax + 0x80], 4
jne 0x629d3202
cmp byte [ebp - 0xe9], 0
je 0x629d3202
mov eax, dword [ebp - 0xc4]
or word [ebx + 0x22], 2
mov dword [ebx + 4], eax
add eax, edx
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0xbc]
mov dl, byte [eax + 0x86]
mov al, pe_nt_image_headers32
lea ecx, [edx - 1]
cmp cl, 0xc6
ja 0x629d322e
cmp dl, 0x64
jbe 0x629d321f
mov dl, 0x64
movzx eax, dl
shl eax, 7
mov ecx, 0x64
xor edx, edx
div ecx
mov dl, al
cmp al, 0x40
jae 0x629d3236
mov dl, 0x40
shr dl, 1
cmp al, 0x40
movzx edx, dl
mov word [ebx + 0x20], dx
jbe 0x629d3245
mov al, 0x40
mov edi, dword [ebp + 8]
mov ecx, ebx
movzx eax, al
mov dword [edi + 4], eax
mov edi, dword [ebp - 0xbc]
mov dword [ebx + 0x18], 0x9e0c
mov eax, dword [ebp - 0xbc]
movsx dx, byte [edi + 0x8b]
fld dword [0x62b1c98c]
mov word [ebp - 0xc8], dx
fidivr word [ebp - 0xc8]
movzx eax, byte [eax + 0x8f]
neg eax
mov dword [ebp - 0xc8], eax
movsx ax, byte [edi + 0x8a]
fiadd dword [ebp - 0xc8]
mov word [ebp - 0xc8], ax
fld dword [0x62b1c990]
fidivr word [ebp - 0xc8]
faddp st(1)
fstp qword [esp]
call method.OpenMPT::ModSample.Transpose_double_
mov eax, dword [ebp - 0xbc]
mov edi, dword [ebp + 8]
push edx
push edx
test byte [eax + 0x8e], 2
setne al
inc eax
mov byte [edi + 0x22], al
mov eax, dword [ebp - 0xbc]
test byte [eax + 0x8e], 2
je 0x629d32e6
mov word [edi + 0x15], 0x80ff
mov ecx, ebx
call method.OpenMPT::ModSample.HasSampleData___const
test al, al
je 0x629d3cad
mov eax, dword [ebp - 0xbc]
test byte [eax + 0x8c], 1
je 0x629d3323
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov dword [esp], ebx
call method.OpenMPT::ctrlSmp.ReverseSample_OpenMPT::ModSample__unsigned_int__unsigned_int__OpenMPT::CSoundFile_
mov eax, dword [ebp - 0xbc]
test byte [eax + 0x8c], 4
je 0x629d3351
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov dword [esp], ebx
call method.OpenMPT::ctrlSmp.InvertSample_OpenMPT::ModSample__unsigned_int__unsigned_int__OpenMPT::CSoundFile_
mov eax, dword [ebp - 0xbc]
mov byte [ebp - 0xc8], 0
cmp byte [eax + 0xaa], 2
jne 0x629d337e
cmp byte [eax + 0xab], 0x64
ja 0x629d337e
cmp byte [eax + 0xac], 0x64
setbe byte [ebp - 0xc8]
test byte [ebx + 0x22], 1
jne 0x629d3449
mov eax, dword [ebp - 0xbc]
cmp byte [eax + 0xa0], 0
jne 0x629d33ad
cmp byte [ebp - 0xc8], 0
jne 0x629d33ad
cmp byte [eax + 0x8d], 0
je 0x629d34c0
mov ecx, ebx
call method.OpenMPT::ModSample.GetNumChannels___const
movzx eax, al
add eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call method.OpenMPT::ModSample.AllocateSample_unsigned_int__unsigned_int_
mov edi, eax
test eax, eax
je 0x629d3cad
mov eax, dword [ebx]
mov ecx, ebx
mov dword [ebp - 0xcc], eax
call method.OpenMPT::ModSample.GetNumChannels___const
movzx edx, al
mov ax, word [ebx + 0x22]
mov ecx, dword [ebx + 0x14]
and eax, 1
lea esi, [eax + 1]
mov eax, esi
imul eax, edx
movzx esi, al
mov eax, dword [ebp - 0xcc]
imul edx, dword [ebp - 0xcc]
imul eax, esi
cmp eax, edx
jbe 0x629d340e
mov eax, edx
lea esi, [ecx + eax]
mov eax, edi
cmp ecx, esi
je 0x629d3427
movsx edx, byte [ecx]
shl edx, 8
add eax, 2
mov word [eax - 2], dx
inc ecx
jmp 0x629d3413
or word [ebx + 0x22], 1
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0xcc]
mov dword [esp + 8], eax
mov dword [esp], ebx
call method.OpenMPT::ctrlSmp.ReplaceSample_OpenMPT::ModSample__void__unsigned_int__OpenMPT::CSoundFile_
mov eax, dword [ebp - 0xbc]
cmp byte [eax + 0x8d], 0
jns 0x629d34c0
mov ecx, ebx
call method.OpenMPT::ModSample.GetNumChannels___const
mov ecx, dword [ebx + 0x14]
movzx edi, al
imul edi, dword [ebx]
add edi, edi
mov dword [ebp - 0xcc], 0
add edi, ecx
mov eax, dword [ebp - 0xbc]
movsx eax, byte [eax + 0x8d]
neg eax
cmp eax, dword [ebp - 0xcc]
jle 0x629d34c0
movsx eax, word [ecx]
mov edx, ecx
cmp edi, edx
je 0x629d34b8
movsx esi, word [edx]
add eax, 0x80000000
add edx, 2
shr eax, 1
sub esi, eax
lea eax, [esi - 0x40000000]
shr eax, 1
sub eax, 0x40000000
mov word [edx - 2], ax
jmp 0x629d3492
inc dword [ebp - 0xcc]
jmp 0x629d3476
mov eax, dword [ebx]
cmp byte [ebp - 0xc8], 0
mov dword [ebp - 0xcc], eax
je 0x629d35d5
mov ecx, ebx
call method.OpenMPT::ModSample.GetNumChannels___const
mov ecx, 2
movzx eax, al
imul eax, dword [ebp - 0xcc]
mov dword [ebp - 0xd0], eax
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0xc8], eax
mov eax, dword [ebp - 0xbc]
movzx eax, byte [eax + 0xab]
mov edi, eax
shl edi, 0x18
mov dword [ebp - 0xd4], edi
mov edi, dword [ebp - 0xbc]
movzx esi, byte [edi + 0xac]
sub esi, eax
mov eax, dword [ebp - 0xd0]
mov edi, esi
sar edi, 0x1f
cdq
idiv ecx
shld edi, esi, 0x18
shl esi, 0x18
cdq
add esi, eax
mov eax, dword [ebp - 0xd0]
adc edi, edx
mov dword [esp + 8], eax
sar eax, 0x1f
mov dword [esp], esi
mov dword [esp + 4], edi
mov dword [esp + 0xc], eax
call dbg.__divdi3
mov dword [esp], eax
mov dword [esp + 4], edx
call method.int_mpt::mpt_libopenmpt.saturate_cast_int__long_long__long_long_
mov edi, dword [ebp - 0xc8]
mov esi, eax
mov eax, dword [ebp - 0xd0]
add eax, eax
add edi, eax
cmp dword [ebp - 0xc8], edi
je 0x629d35d5
mov eax, dword [ebp - 0xc8]
movsx eax, word [eax]
imul dword [ebp - 0xd4]
add eax, 0x32000000
mov dword [esp + 8], 0x64000000
adc edx, 0
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov dword [esp + 4], edx
call dbg.__divdi3
mov dword [esp], eax
mov dword [esp + 4], edx
call method.int_mpt::mpt_libopenmpt.saturate_cast_int__long_long__long_long_
mov ecx, dword [ebp - 0xc8]
add dword [ebp - 0xd4], esi
add dword [ebp - 0xc8], 2
mov word [ecx], ax
jmp 0x629d3576
mov eax, dword [ebp - 0xbc]
mov al, byte [eax + 0xa0]
mov byte [ebp - 0xd8], al
test al, al
je 0x629d3868
mov ecx, ebx
call method.OpenMPT::ModSample.GetNumChannels___const
movzx eax, al
imul eax, dword [ebp - 0xcc]
mov dword [ebp - 0xc8], eax
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0xe0], eax
mov eax, dword [ebp - 0xbc]
movzx ecx, byte [eax + 0xa2]
mov eax, ecx
shl eax, 0x17
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp - 0xbc]
movzx eax, byte [eax + 0xa3]
mov dword [ebp - 0xdc], eax
shl eax, 0x17
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp - 0xbc]
cmp byte [eax + 0xa1], 1
jbe 0x629d3712
mov eax, dword [ebp - 0xc8]
mov esi, 2
cdq
idiv esi
mov dword [ebp - 0xe8], eax
mov esi, dword [ebp - 0xc8]
sar eax, 0x1f
mov edi, esi
sar edi, 0x1f
mov dword [ebp - 0xe4], eax
mov eax, dword [ebp - 0xbc]
movzx eax, byte [eax + 0xa4]
sub eax, ecx
mov dword [esp + 8], esi
cdq
shld edx, eax, 0x17
shl eax, 0x17
mov dword [esp + 0xc], edi
add eax, dword [ebp - 0xe8]
adc edx, dword [ebp - 0xe4]
mov dword [esp], eax
mov dword [esp + 4], edx
call dbg.__divdi3
mov dword [esp + 4], edx
mov dword [esp], eax
call method.int_mpt::mpt_libopenmpt.saturate_cast_int__long_long__long_long_
mov dword [ebp - 0xf0], eax
mov eax, dword [ebp - 0xbc]
movzx eax, byte [eax + 0xa5]
sub eax, dword [ebp - 0xdc]
mov dword [esp + 8], esi
cdq
shld edx, eax, 0x17
shl eax, 0x17
mov dword [esp + 0xc], edi
add eax, dword [ebp - 0xe8]
adc edx, dword [ebp - 0xe4]
mov dword [esp], eax
mov dword [esp + 4], edx
call dbg.__divdi3
mov dword [esp], eax
mov dword [esp + 4], edx
call method.int_mpt::mpt_libopenmpt.saturate_cast_int__long_long__long_long_
mov esi, eax
jmp 0x629d371e
mov dword [ebp - 0xf0], 0
xor esi, esi
xor eax, eax
lea edi, [ebp - 0x98]
mov ecx, 3
mov dl, byte [ebp - 0xd8]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0xc8]
and edx, 2
add eax, eax
mov ecx, dword [ebp - 0xe0]
add eax, dword [ebp - 0xe0]
mov dword [ebp - 0xd8], eax
movzx eax, dl
mov dword [ebp - 0xdc], eax
cmp dword [ebp - 0xd8], ecx
je 0x629d3868
mov eax, dword [ebp - 0xd0]
mov edi, 0x800000
cdq
idiv edi
mov dword [ebp - 0xc8], eax
mov eax, dword [ebp - 0xd4]
cdq
idiv edi
mov edx, dword [ebp - 0xf0]
mov edi, dword [ebp - 0x94]
add dword [ebp - 0xd0], edx
movsx edx, word [ecx]
add edx, 0x80000000
add dword [ebp - 0xd4], esi
shr edx, 1
mov dword [ebp - 0xb0], 0x7fff
sub edx, 0x40000000
sub edx, dword [ebp - 0x98]
mov dword [ebp - 0x90], edx
imul edx, dword [ebp - 0xc8]
add edx, 0x80000000
shr edx, 8
lea edx, [edx + edi - 0x800000]
mov edi, dword [ebp - 0x98]
mov dword [ebp - 0x94], edx
imul edx, dword [ebp - 0xc8]
add edx, 0x80000000
shr edx, 6
lea edx, [edi + edx - 0x2000000]
imul eax, edx
add eax, 0x80000000
shr eax, 6
lea eax, [edx + eax + 0x7e000000]
shr eax, 2
sub eax, 0x20000000
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0xdc]
mov edx, dword [ebp + eax*4 - 0x98]
lea eax, [ebp - 0xb8]
mov dword [ebp - 0xb8], edx
cmp edx, 0x7fff
jle 0x629d3842
lea eax, [ebp - 0xb0]
cmp dword [eax], 0xffff8001
mov dword [ebp - 0xb4], 0xffff8000
jge 0x629d385a
lea eax, [ebp - 0xb4]
mov eax, dword [eax]
add ecx, 2
mov word [ecx - 2], ax
jmp 0x629d3759
mov eax, dword [ebp - 0xbc]
cmp byte [eax + 0x8d], 0
jle 0x629d38e1
mov ecx, ebx
call method.OpenMPT::ModSample.GetNumChannels___const
mov esi, dword [ebx + 0x14]
movzx eax, al
imul eax, dword [ebp - 0xcc]
add eax, eax
mov dword [ebp - 0xc8], 0
add eax, esi
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp - 0xbc]
movsx eax, byte [eax + 0x8d]
cmp dword [ebp - 0xc8], eax
jge 0x629d38e1
movsx eax, word [esi]
mov ecx, esi
cmp dword [ebp - 0xd0], ecx
je 0x629d38d9
movsx edx, word [ecx]
add edx, edx
mov edi, 3
add eax, edx
add ecx, 2
cdq
idiv edi
mov word [ecx - 2], ax
jmp 0x629d38b9
inc dword [ebp - 0xc8]
jmp 0x629d389f
mov ecx, ebx
call method.OpenMPT::ModSample.GetNumChannels___const
mov edx, dword [ebx + 0x14]
movzx eax, al
imul eax, dword [ebp - 0xcc]
lea ecx, [ebp - 0xb8]
test byte [ebx + 0x22], 1
mov dword [esp], edx
mov dword [esp + 4], eax
je 0x629d390f
call fcn.62a8c21c
jmp 0x629d3914
call sym.__ZZNK7OpenMPT13SymInstrument12ConvertToMPTERNS_13ModInstrumentERNS_9ModSampleERNS_10CSoundFileEENKUlT_E_clIN3mpt14mpt_libopen
push eax
push eax
mov eax, dword [ebp - 0xbc]
mov dl, byte [eax + 0x86]
lea eax, [edx - 0x65]
cmp al, 0x62
ja 0x629d3ad6
mov ecx, ebx
mov byte [ebp - 0xc8], dl
call method.OpenMPT::ModSample.GetNumChannels___const
mov edx, 0xc8
movzx eax, al
imul eax, dword [ebx]
mov dword [ebp - 0xcc], eax
mov edi, 0x64
movzx eax, byte [ebp - 0xc8]
sub edx, eax
mov ecx, dword [ebx + 0x14]
shl edx, 0xe
mov eax, edx
cdq
idiv edi
mov edi, 0x8000
mov esi, eax
sub edi, eax
test byte [ebx + 0x22], 1
je 0x629d3a10
mov eax, dword [ebp - 0xcc]
add eax, eax
add eax, ecx
mov dword [ebp - 0xc8], eax
mov eax, esi
neg eax
mov dword [ebp - 0xcc], eax
cmp dword [ebp - 0xc8], ecx
je 0x629d3ad6
movsx eax, word [ecx]
cmp eax, esi
jle 0x629d39b0
sub eax, esi
imul eax, esi
cdq
idiv edi
add eax, edi
jmp 0x629d39ca
cmp eax, dword [ebp - 0xcc]
jge 0x629d39c4
add eax, esi
imul eax, esi
cdq
idiv edi
sub eax, edi
jmp 0x629d39ca
imul eax, edi
cdq
idiv esi
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0x98], 0x7fff
lea edx, [ebp - 0xb4]
cmp eax, 0x7fff
jle 0x629d39ed
lea edx, [ebp - 0x98]
cmp dword [edx], 0xffff8001
mov dword [ebp - 0xb0], 0xffff8000
jge 0x629d3a05
lea edx, [ebp - 0xb0]
mov eax, dword [edx]
add ecx, 2
mov word [ecx - 2], ax
jmp 0x629d3991
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0xc8], ecx
add eax, ecx
mov dword [ebp - 0xd0], eax
mov eax, esi
neg eax
mov dword [ebp - 0xd4], eax
mov ecx, dword [ebp - 0xc8]
cmp dword [ebp - 0xd0], ecx
je 0x629d3ad6
movsx eax, byte [ecx]
shl eax, 8
cmp esi, eax
jge 0x629d3a56
sub eax, esi
imul eax, esi
cdq
idiv edi
add eax, edi
jmp 0x629d3a70
cmp eax, dword [ebp - 0xd4]
jge 0x629d3a6a
add eax, esi
imul eax, esi
cdq
idiv edi
sub eax, edi
jmp 0x629d3a70
imul eax, edi
cdq
idiv esi
mov dword [ebp - 0xcc], eax
mov ecx, 0x100
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0x98], 0x7f
cdq
idiv ecx
mov dword [ebp - 0xb4], eax
lea eax, [ebp - 0xb4]
cmp dword [ebp - 0xcc], 0x7fff
jle 0x629d3aac
lea eax, [ebp - 0x98]
cmp dword [eax], 0xffffff81
mov dword [ebp - 0xb0], 0xffffff80
jge 0x629d3ac1
lea eax, [ebp - 0xb0]
mov ecx, dword [ebp - 0xc8]
mov eax, dword [eax]
inc dword [ebp - 0xc8]
mov byte [ecx], al
jmp 0x629d3a2e
mov ecx, ebx
call method.OpenMPT::ModSample.RemoveAllCuePoints__
mov eax, dword [ebp - 0xbc]
cmp byte [eax + 0x80], 8
jne 0x629d3cad
movzx eax, byte [eax + 0x83]
test al, al
je 0x629d3cad
cmp byte [ebp - 0xe9], 0
je 0x629d3cad
inc eax
mov edi, dword [ebp - 0xc0]
imul eax, dword [ebp - 0xc0]
add eax, dword [ebp - 0xc4]
mov esi, 0x10000000
mov dword [ebx + 0x44], eax
mov eax, dword [ebp - 0xc4]
add edi, eax
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0xbc]
mov dword [ebx + 0x10], edi
xor edx, edx
movzx ecx, byte [eax + 0x83]
mov eax, esi
mov byte [ebp - 0xd8], cl
div ecx
cmp eax, dword [ebp - 0xc0]
jb 0x629d3cad
imul ecx, dword [ebp - 0xc0]
mov edx, dword [ebx]
sub esi, ecx
mov dword [ebp - 0xc8], ecx
cmp esi, edx
mov dword [ebp - 0xcc], edx
jb 0x629d3cad
mov ecx, ebx
call method.OpenMPT::ModSample.GetNumChannels___const
mov cx, word [ebx + 0x22]
and ecx, 1
mov edx, dword [ebp - 0xcc]
inc ecx
add edx, dword [ebp - 0xc8]
imul eax, ecx
movzx eax, al
mov dword [esp + 4], eax
mov dword [esp], edx
mov dword [ebp - 0xd0], edx
mov dword [ebp - 0xc8], eax
call method.OpenMPT::ModSample.AllocateSample_unsigned_int__unsigned_int_
mov dword [ebp - 0xcc], eax
test eax, eax
je 0x629d3cad
mov eax, dword [ebp - 0xd0]
mov esi, dword [ebx + 0x14]
imul edi, dword [ebp - 0xc8]
mov dword [ebx], eax
mov eax, dword [ebp - 0xc8]
imul eax, dword [ebp - 0xc0]
mov dword [ebp - 0xd4], edi
mov dword [ebp - 0xdc], eax
mov edi, dword [ebp - 0xcc]
mov ecx, dword [ebp - 0xd4]
mov eax, dword [ebp - 0xc4]
xor edx, edx
imul eax, dword [ebp - 0xc8]
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 0xe0], eax
mov eax, dword [ebp - 0xbc]
mov esi, dword [ebx + 0x14]
cmp dl, byte [eax + 0x83]
jae 0x629d3c51
movzx eax, dl
inc eax
add esi, dword [ebp - 0xe0]
imul eax, dword [ebp - 0xc0]
add eax, dword [ebp - 0xc4]
mov ecx, dword [ebp - 0xdc]
imul eax, dword [ebp - 0xc8]
add eax, dword [ebp - 0xcc]
inc edx
mov edi, eax
rep movsb byte es:[edi], byte [esi]
jmp 0x629d3c0f
movzx eax, byte [ebp - 0xd8]
inc eax
mov edx, dword [ebp - 0xc8]
imul eax, dword [ebp - 0xc0]
add eax, dword [ebp - 0xc4]
mov ecx, dword [ebp - 0xd0]
imul edx, eax
sub ecx, eax
add edx, dword [ebp - 0xcc]
imul ecx, dword [ebp - 0xc8]
add esi, dword [ebp - 0xd4]
mov edi, edx
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebx]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xcc]
mov dword [esp + 4], eax
call method.OpenMPT::ctrlSmp.ReplaceSample_OpenMPT::ModSample__void__unsigned_int__OpenMPT::CSoundFile_
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0xc