Function at 0x629d4200
Capabilities:
Inspect section memory permissions
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xfc
mov dword [esp + 0x18], ecx
call method.OpenMPT::SymVirtualHeader.IsValid___const
mov ebx, dword [esp + 0x110]
mov ebp, dword [esp + 0x114]
test al, al
jne 0x629d426e
mov esi, dword [esp + 0x18]
lea edi, [esp + 0x70]
mov ecx, 0x20
lea eax, [esp + 0x70]
rep movsd dword es:[edi], dword [esi]
lea esi, [esp + 0x58]
mov dword [esp + 0xc], pe_nt_image_headers32
mov dword [esp + 8], eax
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_
lea ecx, [ebx + 0x1ec]
mov dword [esp], esi
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 [ebp + 0x22], 0xffd1
mov ecx, dword [esp + 0x18]
mov dword [esp], ebp
call method.OpenMPT::SymInstrument.GetSampleLoop_OpenMPT::ModSample_const__const
test edx, edx
push ecx
setne byte [esp + 0x4b]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], edx
cmp byte [eax + 0x80], 4
jne 0x629d42b4
cmp byte [esp + 0x4b], 0
je 0x629d42b4
mov eax, dword [esp + 0x20]
or word [ebp + 0x22], 2
mov dword [ebp + 4], eax
add eax, edx
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x18]
mov dl, byte [eax + 0x86]
mov al, pe_nt_image_headers32
lea ecx, [edx - 1]
cmp cl, 0xc6
ja 0x629d42de
cmp dl, 0x64
jbe 0x629d42cf
mov dl, 0x64
movzx eax, dl
shl eax, 7
mov ecx, 0x64
xor edx, edx
div ecx
mov dl, al
cmp al, 0x40
jae 0x629d42e6
mov dl, 0x40
shr dl, 1
cmp al, 0x40
movzx edx, dl
mov word [ebp + 0x20], dx
jbe 0x629d42f5
mov al, 0x40
mov edi, dword [esp + 0x18]
mov ecx, ebp
movzx eax, al
mov dword [ebx + 4], eax
mov dword [ebp + 0x18], 0x9e0c
movsx dx, byte [edi + 0x8b]
fld dword [0x62b1eb6c]
mov word [esp + 0x24], dx
mov eax, dword [esp + 0x18]
fidivr word [esp + 0x24]
movzx eax, byte [eax + 0x8f]
neg eax
mov dword [esp + 0x24], eax
movsx ax, byte [edi + 0x8a]
fiadd dword [esp + 0x24]
mov word [esp + 0x24], ax
fld dword [0x62b1eb70]
fidivr word [esp + 0x24]
faddp st(1)
fstp qword [esp]
call method.OpenMPT::ModSample.Transpose_double_
push edx
push edx
mov eax, dword [esp + 0x18]
test byte [eax + 0x8e], 2
setne al
inc eax
mov byte [ebx + 0x22], al
mov eax, dword [esp + 0x18]
test byte [eax + 0x8e], 2
je 0x629d437c
mov word [ebx + 0x15], 0x80ff
mov ecx, ebp
call method.OpenMPT::ModSample.HasSampleData___const
test al, al
je 0x629d4b75
mov eax, dword [esp + 0x18]
test byte [eax + 0x8c], 1
je 0x629d43bb
mov eax, dword [esp + 0x118]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov dword [esp], ebp
call method.OpenMPT::ctrlSmp.ReverseSample_OpenMPT::ModSample__unsigned_int__unsigned_int__OpenMPT::CSoundFile_
mov eax, dword [esp + 0x18]
test byte [eax + 0x8c], 4
je 0x629d43eb
mov eax, dword [esp + 0x118]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov dword [esp], ebp
call method.OpenMPT::ctrlSmp.InvertSample_OpenMPT::ModSample__unsigned_int__unsigned_int__OpenMPT::CSoundFile_
mov eax, dword [esp + 0x18]
mov byte [esp + 0x30], 0
cmp byte [eax + 0xaa], 2
jne 0x629d4412
cmp byte [eax + 0xab], 0x64
ja 0x629d4412
cmp byte [eax + 0xac], 0x64
setbe byte [esp + 0x30]
test byte [ebp + 0x22], 1
jne 0x629d44c8
mov eax, dword [esp + 0x18]
cmp byte [eax + 0xa0], 0
jne 0x629d443d
cmp byte [esp + 0x30], 0
jne 0x629d443d
cmp byte [eax + 0x8d], 0
je 0x629d452b
mov ecx, ebp
call method.OpenMPT::ModSample.GetNumChannels___const
movzx eax, al
add eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebp]
mov dword [esp], eax
call method.OpenMPT::ModSample.AllocateSample_unsigned_int__unsigned_int_
mov ebx, eax
test eax, eax
je 0x629d4b75
mov ecx, ebp
mov esi, dword [ebp]
call method.OpenMPT::ModSample.GetNumChannels___const
mov ecx, dword [ebp + 0x14]
movzx edx, al
mov ax, word [ebp + 0x22]
and eax, 1
lea edi, [eax + 1]
mov eax, edi
imul eax, edx
movzx eax, al
imul edx, esi
imul eax, esi
cmp eax, edx
jbe 0x629d4490
mov eax, edx
add eax, ecx
mov edx, ebx
cmp ecx, eax
je 0x629d44a8
movsx edi, byte [ecx]
shl edi, 8
add edx, 2
mov word [edx - 2], di
inc ecx
jmp 0x629d4494
or word [ebp + 0x22], 1
mov eax, dword [esp + 0x118]
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov dword [esp + 4], ebx
mov dword [esp], ebp
call method.OpenMPT::ctrlSmp.ReplaceSample_OpenMPT::ModSample__void__unsigned_int__OpenMPT::CSoundFile_
mov eax, dword [esp + 0x18]
cmp byte [eax + 0x8d], 0
jns 0x629d452b
mov ecx, ebp
call method.OpenMPT::ModSample.GetNumChannels___const
mov ebx, dword [ebp + 0x14]
movzx edi, al
imul edi, dword [ebp]
add edi, edi
xor ecx, ecx
add edi, ebx
mov eax, dword [esp + 0x18]
movsx eax, byte [eax + 0x8d]
neg eax
cmp eax, ecx
jle 0x629d452b
movsx eax, word [ebx]
mov edx, ebx
cmp edi, edx
je 0x629d4528
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 0x629d4502
inc ecx
jmp 0x629d44ec
mov eax, dword [ebp]
cmp byte [esp + 0x30], 0
mov dword [esp + 0x24], eax
je 0x629d460e
mov ecx, ebp
call method.OpenMPT::ModSample.GetNumChannels___const
mov edi, dword [ebp + 0x14]
movzx esi, al
mov eax, dword [esp + 0x18]
imul esi, dword [esp + 0x24]
movzx eax, byte [eax + 0xab]
mov ebx, eax
shl ebx, 0x18
mov dword [esp + 0x30], ebx
mov ebx, dword [esp + 0x18]
movzx ecx, byte [ebx + 0xac]
sub ecx, eax
mov eax, esi
mov ebx, ecx
mov dword [esp + 8], esi
sar ebx, 0x1f
shld ebx, ecx, 0x18
shl ecx, 0x18
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ecx
mov ebx, 2
cdq
idiv ebx
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
cdq
add ecx, eax
mov eax, esi
adc ebx, edx
mov dword [esp], ecx
sar eax, 0x1f
mov dword [esp + 4], ebx
mov dword [esp + 0xc], eax
add esi, esi
call dbg.__divdi3
add esi, edi
mov dword [esp], eax
mov dword [esp + 4], edx
call method.int_mpt::mpt_libopenmpt.saturate_cast_int__long_long__long_long_
mov ebx, eax
cmp edi, esi
je 0x629d460e
movsx eax, word [edi]
imul dword [esp + 0x30]
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
add edi, 2
mov dword [esp], eax
mov dword [esp + 4], edx
call method.int_mpt::mpt_libopenmpt.saturate_cast_int__long_long__long_long_
add dword [esp + 0x30], ebx
mov word [edi - 2], ax
jmp 0x629d45c6
mov eax, dword [esp + 0x18]
mov al, byte [eax + 0xa0]
mov byte [esp + 0x34], al
test al, al
je 0x629d4823
mov ecx, ebp
call method.OpenMPT::ModSample.GetNumChannels___const
movzx eax, al
imul eax, dword [esp + 0x24]
mov ebx, eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x18]
movzx ecx, byte [eax + 0xa2]
mov eax, ecx
shl eax, 0x17
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x18]
movzx eax, byte [eax + 0xa3]
mov dword [esp + 0x38], eax
shl eax, 0x17
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x18]
cmp byte [eax + 0xa1], 1
jbe 0x629d4715
mov eax, ebx
mov esi, 2
cdq
idiv esi
mov dword [esp + 0x40], eax
mov edi, ebx
sar eax, 0x1f
sar edi, 0x1f
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x18]
movzx eax, byte [eax + 0xa4]
sub eax, ecx
mov dword [esp + 8], ebx
cdq
shld edx, eax, 0x17
shl eax, 0x17
mov dword [esp + 0xc], edi
add eax, dword [esp + 0x40]
adc edx, dword [esp + 0x44]
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 [esp + 0x4c], eax
mov eax, dword [esp + 0x18]
movzx eax, byte [eax + 0xa5]
sub eax, dword [esp + 0x38]
mov dword [esp + 8], ebx
cdq
shld edx, eax, 0x17
shl eax, 0x17
mov dword [esp + 0xc], edi
add eax, dword [esp + 0x40]
adc edx, dword [esp + 0x44]
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 0x629d471f
mov dword [esp + 0x4c], 0
xor esi, esi
xor eax, eax
lea edi, [esp + 0x70]
mov ecx, 3
mov dl, byte [esp + 0x34]
rep stosd dword es:[edi], eax
lea eax, [ebx + ebx]
and edx, 2
add eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x38], eax
movzx edi, dl
cmp dword [esp + 0x38], ecx
je 0x629d4823
mov eax, dword [esp + 0x30]
mov ebx, 0x800000
cdq
idiv ebx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
cdq
idiv ebx
mov edx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x74]
add dword [esp + 0x30], edx
movsx edx, word [ecx]
add edx, 0x80000000
add dword [esp + 0x28], esi
shr edx, 1
mov dword [esp + 0x58], 0x7fff
sub edx, 0x40000000
sub edx, dword [esp + 0x70]
mov dword [esp + 0x78], edx
imul edx, dword [esp + 0x34]
add edx, 0x80000000
shr edx, 8
lea edx, [edx + ebx - 0x800000]
mov ebx, dword [esp + 0x34]
imul ebx, edx
add ebx, 0x80000000
mov dword [esp + 0x74], edx
shr ebx, 6
mov edx, dword [esp + 0x70]
lea edx, [edx + ebx - 0x2000000]
imul eax, edx
add eax, 0x80000000
shr eax, 6
lea eax, [edx + eax + 0x7e000000]
shr eax, 2
sub eax, 0x20000000
mov dword [esp + 0x70], eax
lea eax, [esp + 0x50]
mov edx, dword [esp + edi*4 + 0x70]
mov dword [esp + 0x50], edx
cmp edx, 0x7fff
jle 0x629d4801
lea eax, [esp + 0x58]
cmp dword [eax], 0xffff8001
mov dword [esp + 0x54], 0xffff8000
jge 0x629d4815
lea eax, [esp + 0x54]
mov eax, dword [eax]
add ecx, 2
mov word [ecx - 2], ax
jmp 0x629d4745
mov eax, dword [esp + 0x18]
cmp byte [eax + 0x8d], 0
jle 0x629d4881
mov ecx, ebp
xor ebx, ebx
call method.OpenMPT::ModSample.GetNumChannels___const
mov esi, dword [ebp + 0x14]
movzx eax, al
imul eax, dword [esp + 0x24]
add eax, eax
mov edi, 3
add eax, esi
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x18]
movsx eax, byte [eax + 0x8d]
cmp ebx, eax
jge 0x629d4881
movsx eax, word [esi]
mov ecx, esi
cmp dword [esp + 0x30], ecx
je 0x629d487e
movsx edx, word [ecx]
add edx, edx
add ecx, 2
add eax, edx
cdq
idiv edi
mov word [ecx - 2], ax
jmp 0x629d4865
inc ebx
jmp 0x629d4851
mov ecx, ebp
call method.OpenMPT::ModSample.GetNumChannels___const
mov edx, dword [ebp + 0x14]
movzx eax, al
imul eax, dword [esp + 0x24]
lea ecx, [esp + 0x50]
test byte [ebp + 0x22], 1
mov dword [esp], edx
mov dword [esp + 4], eax
je 0x629d48ab
call fcn.62a8d960
jmp 0x629d48b0
call sym.__ZZNK7OpenMPT13SymInstrument12ConvertToMPTERNS_13ModInstrumentERNS_9ModSampleERNS_10CSoundFileEENKUlT_E_clIN3mpt14mpt_libopen
push eax
push eax
mov eax, dword [esp + 0x18]
mov dl, byte [eax + 0x86]
lea eax, [edx - 0x65]
cmp al, 0x62
ja 0x629d4a05
mov ecx, ebp
mov byte [esp + 0x24], dl
call method.OpenMPT::ModSample.GetNumChannels___const
mov edx, 0xc8
movzx esi, al
movzx eax, byte [esp + 0x24]
sub edx, eax
mov edi, 0x64
shl edx, 0xe
mov ebx, dword [ebp + 0x14]
mov eax, edx
cdq
idiv edi
mov edi, 0x8000
mov ecx, eax
imul esi, dword [ebp]
sub edi, eax
test byte [ebp + 0x22], 1
je 0x629d497b
add esi, esi
neg eax
add esi, ebx
mov dword [esp + 0x24], eax
cmp esi, ebx
je 0x629d4a05
movsx eax, word [ebx]
cmp eax, ecx
jle 0x629d4929
sub eax, ecx
imul eax, ecx
cdq
idiv edi
add eax, edi
jmp 0x629d4941
cmp eax, dword [esp + 0x24]
jge 0x629d493b
add eax, ecx
imul eax, ecx
cdq
idiv edi
sub eax, edi
jmp 0x629d4941
imul eax, edi
cdq
idiv ecx
mov dword [esp + 0x54], eax
mov dword [esp + 0x70], 0x7fff
lea edx, [esp + 0x54]
cmp eax, 0x7fff
jle 0x629d495c
lea edx, [esp + 0x70]
cmp dword [edx], 0xffff8001
mov dword [esp + 0x58], 0xffff8000
jge 0x629d4970
lea edx, [esp + 0x58]
mov eax, dword [edx]
add ebx, 2
mov word [ebx - 2], ax
jmp 0x629d490e
lea eax, [ebx + esi]
mov dword [esp + 0x30], eax
mov eax, ecx
neg eax
mov dword [esp + 0x28], eax
cmp dword [esp + 0x30], ebx
je 0x629d4a05
movsx eax, byte [ebx]
shl eax, 8
cmp ecx, eax
jge 0x629d49a6
sub eax, ecx
imul eax, ecx
cdq
idiv edi
add eax, edi
jmp 0x629d49be
cmp eax, dword [esp + 0x28]
jge 0x629d49b8
add eax, ecx
imul eax, ecx
cdq
idiv edi
sub eax, edi
jmp 0x629d49be
imul eax, edi
cdq
idiv ecx
mov dword [esp + 0x24], eax
mov esi, 0x100
mov eax, dword [esp + 0x24]
mov dword [esp + 0x70], 0x7f
cdq
idiv esi
mov dword [esp + 0x54], eax
lea eax, [esp + 0x54]
cmp dword [esp + 0x24], 0x7fff
jle 0x629d49ec
lea eax, [esp + 0x70]
cmp dword [eax], 0xffffff81
mov dword [esp + 0x58], 0xffffff80
jge 0x629d49fd
lea eax, [esp + 0x58]
mov eax, dword [eax]
inc ebx
mov byte [ebx - 1], al
jmp 0x629d498a
mov ecx, ebp
call method.OpenMPT::ModSample.RemoveAllCuePoints__
mov eax, dword [esp + 0x18]
cmp byte [eax + 0x80], 8
jne 0x629d4b75
movzx eax, byte [eax + 0x83]
test al, al
je 0x629d4b75
cmp byte [esp + 0x4b], 0
je 0x629d4b75
inc eax
mov esi, dword [esp + 0x1c]
imul eax, dword [esp + 0x1c]
add eax, dword [esp + 0x20]
mov ebx, 0x10000000
mov dword [ebp + 0x44], eax
mov eax, dword [esp + 0x20]
add esi, eax
mov dword [ebp + 0xc], eax
mov eax, dword [esp + 0x18]
mov dword [ebp + 0x10], esi
xor edx, edx
movzx ecx, byte [eax + 0x83]
mov eax, ebx
mov byte [esp + 0x34], cl
div ecx
cmp eax, dword [esp + 0x1c]
jb 0x629d4b75
imul ecx, dword [esp + 0x1c]
mov edi, dword [ebp]
sub ebx, ecx
mov dword [esp + 0x24], ecx
cmp ebx, edi
jb 0x629d4b75
mov ecx, ebp
call method.OpenMPT::ModSample.GetNumChannels___const
mov cx, word [ebp + 0x22]
and ecx, 1
mov edx, dword [esp + 0x24]
inc ecx
add edi, edx
imul eax, ecx
movzx ebx, al
mov dword [esp + 4], ebx
mov dword [esp], edi
mov dword [esp + 0x30], edi
call method.OpenMPT::ModSample.AllocateSample_unsigned_int__unsigned_int_
mov dword [esp + 0x24], eax
test eax, eax
je 0x629d4b75
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0x24]
imul esi, ebx
mov dword [ebp], eax
mov eax, dword [esp + 0x1c]
imul eax, ebx
mov dword [esp + 0x28], esi
mov dword [esp + 0x38], eax
mov esi, dword [ebp + 0x14]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
xor edx, edx
imul eax, ebx
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x18]
mov esi, dword [ebp + 0x14]
cmp dl, byte [eax + 0x83]
jae 0x629d4b2a
movzx eax, dl
inc eax
add esi, dword [esp + 0x3c]
imul eax, dword [esp + 0x1c]
add eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x38]
imul eax, ebx
add eax, dword [esp + 0x24]
inc edx
mov edi, eax
rep movsb byte es:[edi], byte [esi]
jmp 0x629d4af8
movzx eax, byte [esp + 0x34]
inc eax
mov edx, ebx
imul eax, dword [esp + 0x1c]
add eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
imul edx, eax
sub ecx, eax
add edx, dword [esp + 0x24]
imul ecx, ebx
add esi, dword [esp + 0x28]
mov edi, edx
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x118]
mov dword [esp + 0xc], eax
mov eax, dword [ebp]
mov dword [esp], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 4], eax
call method.OpenMPT::ctrlSmp.ReplaceSample_OpenMPT::ModSample__void__unsigned_int__OpenMPT::CSoundFile_
add esp, 0xfc
pop ebx
pop esi
pop edi
pop ebp
ret 0xc