Function at 0x421bd0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x460
push ebx
movzx ebx, word [0x54fc1e]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x14], ebx
push ebp
push esi
push edi
cmp ebx, 0x80
jbe 0x421c10
push 0
push str.Warning:_Song_length_is_above_128_
push str.System_message
mov ebx, 0x80
push 0
mov dword [esp + 0x30], ebx
call fcn.00442040
add esp, 0x10
xor edi, edi
xor ecx, ecx
test ebx, ebx
je 0x421c91
cmp ebx, 8
jb 0x421c91
cmp dword [0x4ed0fc], 2
jl 0x421c91
mov edx, ebx
xorps xmm1, xmm1
and edx, 0xfffffff8
xorps xmm2, xmm2
xor eax, eax
nop dword [eax]
nop word [eax + eax]
movd xmm0, dword [eax + 0x54fb16]
add ecx, 8
pmovzxbd xmm0, xmm0
pmaxsd xmm1, xmm0
movd xmm0, dword [eax + 0x54fb1a]
movsx eax, cx
pmovzxbd xmm0, xmm0
pmaxsd xmm2, xmm0
cmp eax, edx
jl 0x421c40
pmaxsd xmm1, xmm2
movaps xmm0, xmm1
psrldq xmm0, 8
pmaxsd xmm1, xmm0
movups xmm0, xmm1
psrldq xmm0, 4
pmaxsd xmm1, xmm0
movd edi, xmm1
movsx edx, cx
cmp edx, ebx
jge 0x421cb6
nop dword [eax + eax]
mov eax, edi
movzx edi, byte [edx + 0x54fb16]
cmp edi, eax
cmovle edi, eax
inc ecx
movsx edx, cx
cmp edx, ebx
jl 0x421ca0
inc edi
mov dword [esp + 0x18], edi
cmp edi, 0x64
jle 0x421cdf
push 0
push str.Warning:_Song_has_more_than_100_patterns_
push str.System_message
mov edi, 0x64
push 0
mov dword [esp + 0x28], edi
call fcn.00442040
add esp, 0x10
mov esi, 0x20
lea ebx, [esi + 0x60]
nop word [eax + eax]
movsx eax, si
mov edx, dword [eax*4 + 0x54ed40]
test edx, edx
je 0x421d1d
mov cl, 0xf
movsx eax, cl
imul eax, eax, 0xd8
cmp dword [eax + edx + 0xf8], 0
jne 0x421d18
add cl, 0xff
jns 0x421d00
cmp cl, 0xff
jg 0x421d25
inc esi
cmp si, bx
jle 0x421cf0
jmp 0x421d3b
push 0
push str.Warning:_Song_has_more_than_31_instruments_
push str.System_message
push 0
call fcn.00442040
add esp, 0x10
mov esi, 0x1f
xor bl, bl
xor al, al
mov ecx, 0x54ed44
lea ebp, [esi - 0x1e]
nop dword [eax]
mov edx, dword [ecx]
test edx, edx
je 0x421d74
mov edx, dword [edx + 0x104]
cmp edx, 0x1fffe
jle 0x421d68
mov bl, 1
jmp 0x421d74
cmp edx, 0xfffe
movzx eax, al
cmovg eax, ebp
add ecx, 4
sub esi, ebp
jne 0x421d50
test bl, bl
je 0x421d87
push esi
push str.Warning:_Song_has_sample_lengths_that_are_too_long_for_the_MOD_format_
jmp 0x421d92
test al, al
je 0x421da1
push 0
push str.Warning:_Song_has_sample_lengths_above_65534__Not_all_MOD_players_support_this.
push str.System_message
push 0
call fcn.00442040
add esp, 0x10
mov esi, ebp
movsx eax, si
mov ecx, dword [eax*4 + 0x54ed40]
test ecx, ecx
je 0x421e0c
mov dl, 0xf
movsx eax, dl
imul eax, eax, 0xd8
cmp dword [eax + ecx + 0xf8], 0
jne 0x421dcb
add dl, 0xff
jns 0x421db3
movsx ax, dl
movzx eax, ax
test ax, ax
jg 0x421e15
jne 0x421e0c
cmp word [ecx + 0x72], 0
jne 0x421e15
cmp byte [ecx + 0x6b], 0
jne 0x421e15
cmp byte [ecx + 0x6c], 0
jne 0x421e15
cmp byte [ecx + 0x70], 0
ja 0x421e15
mov al, byte [ecx + 0x101]
and al, 3
cmp al, 2
je 0x421e15
cmp byte [ecx + 0xf5], 0
jne 0x421e15
cmp byte [ecx], 0
jne 0x421e15
inc esi
cmp si, 0x1f
jle 0x421da3
jmp 0x421e2b
push 0
push str.Warning:_Song_is_using_XM_instrument_features_
push str.System_message
push 0
call fcn.00442040
add esp, 0x10
mov ebp, dword [0x54fc2c]
xor al, al
xor dl, dl
mov byte [esp + 0x13], al
xor esi, esi
mov dword [esp + 0x1c], edx
xor cl, cl
mov dword [esp + 0x28], esi
xor bl, bl
test edi, edi
jle 0x421f8c
xor eax, eax
mov edi, dword [eax*4 + 0x54e940]
test edi, edi
je 0x421ef2
movzx eax, word [eax*2 + 0x54e740]
cmp ax, 0x40
jl 0x42204a
mov eax, 1
movzx ecx, cl
cmovg ecx, eax
mov eax, 0x40
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], eax
nop word [eax + eax]
test ebp, ebp
jle 0x421edb
mov ecx, edi
mov esi, ebp
mov eax, 1
nop dword [eax]
cmp byte [ecx + 1], 0x1f
movzx ebx, bl
cmova ebx, eax
cmp byte [ecx + 3], 0xf
ja 0x421eb6
cmp byte [ecx + 2], 0
je 0x421ebb
mov byte [esp + 0x13], 1
mov al, byte [ecx]
dec al
movzx edx, dl
cmp al, 8
mov eax, 1
cmovbe edx, eax
add ecx, 5
sub esi, eax
jne 0x421ea0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], edx
add edi, 0xa0
sub eax, 1
mov dword [esp + 0x14], eax
jne 0x421e90
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x18]
inc esi
movsx eax, si
mov dword [esp + 0x28], esi
cmp eax, edi
jl 0x421e51
test cl, cl
je 0x421f26
push 0
push str.Warning:_Song_has_pattern_lengths_above_64_
push str.System_message
push 0
call fcn.00442040
mov ebp, dword [0x54fc2c]
add esp, 0x10
test bl, bl
je 0x421f46
push 0
push str.Warning:_Patterns_have_instrument_numbers_above_31_
push str.System_message
push 0
call fcn.00442040
mov ebp, dword [0x54fc2c]
add esp, 0x10
cmp byte [esp + 0x13], 0
je 0x421f69
push 0
push str.Warning:_Patterns_have_incompatible_effects_
push str.System_message
push 0
call fcn.00442040
mov ebp, dword [0x54fc2c]
add esp, 0x10
cmp byte [esp + 0x1c], 0
je 0x421f8c
push 0
push str.Warning:_Patterns_have_notes_below_A_0_
push str.System_message
push 0
call fcn.00442040
mov ebp, dword [0x54fc2c]
add esp, 0x10
push 0x3a2
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.00484320
push 0x81
lea eax, [esp + 0x3fb]
push 0
push eax
call fcn.00484320
mov ecx, 0x54ef63
add esp, 0x18
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x421fc0
sub ecx, edx
mov dword [esp + 0x44], 0
mov eax, 0x14
xorps xmm0, xmm0
cmp ecx, eax
movups xmmword [esp + 0x34], xmm0
cmovg ecx, eax
test ecx, ecx
jle 0x421ffa
push ecx
lea eax, [esp + 0x38]
push 0x54ef63
push eax
call fcn.00484480
add esp, 0xc
mov edx, dword [esp + 0x20]
cmp byte [0x54fc20], dl
mov byte [esp + 0x3ea], dl
sbb al, al
and al, byte [0x54fc20]
mov byte [esp + 0x3eb], al
movzx eax, dl
push eax
lea eax, [esp + 0x3f0]
push 0x54fb16
push eax
call fcn.00484480
add esp, 0xc
cmp ebp, 4
jne 0x42206d
cmp edi, 0x40
mov eax, 0x2e4b2e4d
mov ecx, 0x214b214d
cmovg eax, ecx
jmp 0x422074
push 0
push str.Error:_Pattern_lengths_cant_be_below_64__Module_wasnt_saved.
push str.System_message
push 0
call fcn.00442040
add esp, 0x10
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x460
ret
mov eax, dword [ebp + ebp*4 + 0x4bdd33]
mov ebx, 0x54ed44
mov dword [esp + 0x46c], eax
mov dword [esp + 0x20], ebx
lea esi, [esp + 0x48]
mov ebp, 0x54ef8f
mov dword [esp + 0x1c], 0x1f
mov edi, 0x16
nop word [eax + eax]
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4220a5
sub ecx, edx
xorps xmm0, xmm0
cmp ecx, 0x16
movups xmmword [esi], xmm0
cmovg ecx, edi
mov dword [esi + 0x10], 0
mov word [esi + 0x14], 0
test ecx, ecx
jle 0x4220d6
push ecx
push ebp
push esi
call fcn.00484480
add esp, 0xc
mov edx, dword [ebx]
test edx, edx
je 0x42217e
mov cl, 0xf
movsx eax, cl
imul eax, eax, 0xd8
cmp dword [eax + edx + 0xf8], 0
jne 0x4220fa
add cl, 0xff
jns 0x4220e2
cmp cl, 0xff
je 0x42217e
mov ebx, dword [edx + 0x104]
mov ecx, 0xffff
mov edi, dword [edx + 0x108]
mov eax, dword [edx + 0x10c]
sar ebx, 1
sar edi, 1
sar eax, 1
cmp ebx, 0xffff
cmovg ebx, ecx
test byte [edx + 0x101], 3
mov ecx, 1
je 0x422144
test eax, eax
cmovne ecx, eax
lea eax, [ecx + edi]
cmp eax, ebx
jle 0x422146
mov ecx, 1
xor edi, edi
rol bx, 8
mov word [esi + 0x16], bx
movzx eax, byte [edx + 0xf4]
mov ebx, dword [esp + 0x20]
shr al, 4
rol di, 8
mov byte [esi + 0x18], al
movzx eax, byte [edx + 0x100]
rol cx, 8
mov word [esi + 0x1a], di
mov edi, 0x16
mov byte [esi + 0x19], al
mov word [esi + 0x1c], cx
add ebx, 4
add esi, 0x1e
add ebp, 0x17
mov dword [esp + 0x20], ebx
sub dword [esp + 0x1c], 1
jne 0x4220a0
push 0x4ddc1c
push dword [esp + 0x30]
call fcn.004891f7
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4221d0
push eax
push str.Error_opening_file_for_saving__is_it_in_use_
push str.System_message
push eax
call fcn.00442040
add esp, 0x10
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x460
ret
push eax
push 0x43c
lea eax, [esp + 0x3c]
push 1
push eax
call fcn.0048a02c
add esp, 0x10
cmp eax, 0x43c
jne 0x422596
mov eax, dword [0x54fc2c]
xor ebp, ebp
mov esi, dword [esp + 0x18]
mov ebx, eax
shl ebx, 8
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x1c], ebp
test esi, esi
jle 0x422365
xor edx, edx
mov dword [esp + 0x28], edx
nop word [eax + eax]
cmp dword [edx*4 + 0x54e940], 0
jne 0x42223f
push ebx
push 0
push 0x50aed0
call fcn.00484320
add esp, 0xc
jmp 0x42232b
xor esi, esi
xor ecx, ecx
mov dword [esp + 0x20], ecx
nop word [eax + eax]
xor edi, edi
test eax, eax
jle 0x422309
mov edx, dword [edx*4 + 0x54e940]
mov ebp, ecx
mov dword [esp + 0x2c], edx
mov cl, byte [edx + ebp + 1]
xor ebx, ebx
mov dl, byte [edx + ebp]
cmp cl, 0x1f
movzx eax, cl
cmovbe ebx, eax
xor ecx, ecx
cmp dl, 0x61
movzx eax, dl
cmovne ecx, eax
test cl, cl
je 0x422298
movzx eax, cl
cmp cl, 0xa
mov ecx, 0xa
cmovb eax, ecx
mov cl, al
mov dl, bl
and dl, 0xf0
test cl, cl
je 0x4222b5
movzx eax, cl
movzx ecx, word [eax*2 + 0x4bf1fe]
mov eax, ecx
shr eax, 8
and al, 0xf
or dl, al
mov byte [esi + 0x50aed1], cl
mov byte [esi + 0x50aed0], dl
mov edx, dword [esp + 0x2c]
shl bl, 4
mov al, byte [edx + ebp + 3]
cmp al, 0xf
jbe 0x4222da
mov byte [esi + 0x50aed2], bl
xor al, al
jmp 0x4222e8
and al, 0xf
or al, bl
mov byte [esi + 0x50aed2], al
mov al, byte [edx + ebp + 4]
mov byte [esi + 0x50aed3], al
inc edi
mov eax, dword [esp + 0x24]
add esi, 4
add ebp, 5
cmp edi, eax
jl 0x422267
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
add ecx, 0xa0
mov dword [esp + 0x20], ecx
cmp ecx, 0x2800
jl 0x422250
mov ebx, dword [esp + 0x30]
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
push dword [esp + 0x14]
push ebx
push 1
push 0x50aed0
call fcn.0048a02c
add esp, 0x10
cmp eax, ebx
jne 0x422596
inc ebp
movsx edx, bp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x28], edx
cmp edx, esi
jge 0x422365
mov eax, dword [0x54fc2c]
mov dword [esp + 0x24], eax
jmp 0x422220
mov edi, 1
mov dword [esp + 0x18], edi
nop
movsx esi, di
mov edx, dword [esi*4 + 0x54ed40]
test edx, edx
je 0x42252e
mov cl, 0xf
movsx eax, cl
imul eax, eax, 0xd8
cmp dword [eax + edx + 0xf8], 0
jne 0x42239c
add cl, 0xff
jns 0x422384
cmp cl, 0xff
je 0x42252e
cmp dword [edx + 0xf8], 0
lea ebp, [edx + 0xdc]
mov dword [esp + 0x24], ebp
je 0x42252e
cmp dword [ebp + 0x28], 0
jle 0x42252e
mov ecx, ebp
call fcn.004377f0
mov eax, esi
shl eax, 4
sub eax, esi
movzx eax, word [esp + eax*2 + 0x40]
movzx ebx, al
shl ebx, 8
shr eax, 8
or ebx, eax
add ebx, ebx
test byte [ebp + 0x25], 0x10
je 0x422579
xor edi, edi
test ebx, ebx
je 0x422523
nop word [eax + eax]
lea eax, [edi + 0x400]
mov esi, 0x400
cmp eax, ebx
jle 0x422413
mov esi, ebx
sub esi, edi
mov eax, dword [ebp + 0x1c]
lea edx, [eax + edi*2]
xor eax, eax
test esi, esi
jle 0x422501
cmp esi, 0x20
jb 0x4224ee
lea ecx, [esi - 1]
lea ecx, [edx + ecx*2]
lea ebp, [esi + 0x51cecf]
cmp ecx, 0x51ced0
jb 0x422448
cmp ebp, edx
jae 0x4224ea
mov ecx, esi
and ecx, 0x8000001f
jns 0x422457
dec ecx
or ecx, 0xffffffe0
inc ecx
mov ebp, esi
sub ebp, ecx
mov ecx, 8
movd xmm1, ecx
lea ecx, [edx + 0x20]
nop word [eax + eax]
movups xmm0, xmmword [ecx - 0x20]
lea ecx, [ecx + 0x40]
psraw xmm0, xmm1
pand xmm0, xmmword [0x4e2c60]
packuswb xmm0, xmm0
movq qword [eax + 0x51ced0], xmm0
movups xmm0, xmmword [ecx - 0x50]
psraw xmm0, xmm1
pand xmm0, xmmword [0x4e2c60]
packuswb xmm0, xmm0
movq qword [eax + 0x51ced8], xmm0
movups xmm0, xmmword [ecx - 0x40]
psraw xmm0, xmm1
pand xmm0, xmmword [0x4e2c60]
packuswb xmm0, xmm0
movq qword [eax + 0x51cee0], xmm0
movups xmm0, xmmword [ecx - 0x30]
psraw xmm0, xmm1
pand xmm0, xmmword [0x4e2c60]
packuswb xmm0, xmm0
movq qword [eax + 0x51cee8], xmm0
add eax, 0x20
cmp eax, ebp
jl 0x422470
mov ebp, dword [esp + 0x24]
cmp eax, esi
jge 0x422501
mov cl, byte [edx + eax*2 + 1]
mov byte [eax + 0x51ced0], cl
inc eax
cmp eax, esi
jl 0x4224f2
push dword [esp + 0x14]
push esi
push 1
push 0x51ced0
call fcn.0048a02c
add esp, 0x10
cmp eax, esi
jne 0x42258f
add edi, esi
cmp edi, ebx
jl 0x422400
mov edi, dword [esp + 0x18]
mov ecx, ebp
call fcn.00437160
inc edi
mov dword [esp + 0x18], edi
cmp di, 0x1f
jle 0x422370
push dword [esp + 0x14]
call fcn.00488f38
add esp, 4
mov byte [0x54ef62], 0
mov byte [0x54e4e2], 1
mov al, 1
mov byte [0x54e4e0], 1
mov byte [0x54e620], 0
pop edi
pop esi
pop ebp
mov byte [0x54e621], 1
pop ebx
add esp, 0x460
ret
push dword [esp + 0x14]
push ebx
push 1
push dword [ebp + 0x1c]
call fcn.0048a02c
add esp, 0x10
cmp eax, ebx
je 0x422527
mov ecx, ebp
call fcn.00437160
push 0
push str.Error_saving_module:_general_I_O_error_
push str.System_message
push 0
call fcn.00442040
push dword [esp + 0x24]
call fcn.00488f38
add esp, 0x14
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x460
ret