Function at 0x421dc0
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 0x421e00
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.004422b0
add esp, 0x10
xor edi, edi
xor ecx, ecx
test ebx, ebx
je 0x421e81
cmp ebx, 8
jb 0x421e81
cmp dword [0x4ed0fc], 2
jl 0x421e81
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 0x421e30
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 0x421ea6
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 0x421e90
inc edi
mov dword [esp + 0x18], edi
cmp edi, 0x64
jle 0x421ecf
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.004422b0
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 0x421f0d
mov cl, 0xf
movsx eax, cl
imul eax, eax, 0xd8
cmp dword [eax + edx + 0xf8], 0
jne 0x421f08
add cl, 0xff
jns 0x421ef0
cmp cl, 0xff
jg 0x421f15
inc esi
cmp si, bx
jle 0x421ee0
jmp 0x421f2b
push 0
push str.Warning:_Song_has_more_than_31_instruments_
push str.System_message
push 0
call fcn.004422b0
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 0x421f64
mov edx, dword [edx + 0x104]
cmp edx, 0x1fffe
jle 0x421f58
mov bl, 1
jmp 0x421f64
cmp edx, 0xfffe
movzx eax, al
cmovg eax, ebp
add ecx, 4
sub esi, ebp
jne 0x421f40
test bl, bl
je 0x421f77
push esi
push str.Warning:_Song_has_sample_lengths_that_are_too_long_for_the_MOD_format_
jmp 0x421f82
test al, al
je 0x421f91
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.004422b0
add esp, 0x10
mov esi, ebp
movsx eax, si
mov ecx, dword [eax*4 + 0x54ed40]
test ecx, ecx
je 0x421ffc
mov dl, 0xf
movsx eax, dl
imul eax, eax, 0xd8
cmp dword [eax + ecx + 0xf8], 0
jne 0x421fbb
add dl, 0xff
jns 0x421fa3
movsx ax, dl
movzx eax, ax
test ax, ax
jg 0x422005
jne 0x421ffc
cmp word [ecx + 0x72], 0
jne 0x422005
cmp byte [ecx + 0x6b], 0
jne 0x422005
cmp byte [ecx + 0x6c], 0
jne 0x422005
cmp byte [ecx + 0x70], 0
ja 0x422005
mov al, byte [ecx + 0x101]
and al, 3
cmp al, 2
je 0x422005
cmp byte [ecx + 0xf5], 0
jne 0x422005
cmp byte [ecx], 0
jne 0x422005
inc esi
cmp si, 0x1f
jle 0x421f93
jmp 0x42201b
push 0
push str.Warning:_Song_is_using_XM_instrument_features_
push str.System_message
push 0
call fcn.004422b0
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 0x42217c
xor eax, eax
mov edi, dword [eax*4 + 0x54e940]
test edi, edi
je 0x4220e2
movzx eax, word [eax*2 + 0x54e740]
cmp ax, 0x40
jl 0x42223a
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 0x4220cb
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 0x4220a6
cmp byte [ecx + 2], 0
je 0x4220ab
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 0x422090
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], edx
add edi, 0xa0
sub eax, 1
mov dword [esp + 0x14], eax
jne 0x422080
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 0x422041
test cl, cl
je 0x422116
push 0
push str.Warning:_Song_has_pattern_lengths_above_64_
push str.System_message
push 0
call fcn.004422b0
mov ebp, dword [0x54fc2c]
add esp, 0x10
test bl, bl
je 0x422136
push 0
push str.Warning:_Patterns_have_instrument_numbers_above_31_
push str.System_message
push 0
call fcn.004422b0
mov ebp, dword [0x54fc2c]
add esp, 0x10
cmp byte [esp + 0x13], 0
je 0x422159
push 0
push str.Warning:_Patterns_have_incompatible_effects_
push str.System_message
push 0
call fcn.004422b0
mov ebp, dword [0x54fc2c]
add esp, 0x10
cmp byte [esp + 0x1c], 0
je 0x42217c
push 0
push str.Warning:_Patterns_have_notes_below_A_0_
push str.System_message
push 0
call fcn.004422b0
mov ebp, dword [0x54fc2c]
add esp, 0x10
push 0x3a2
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.00484630
push 0x81
lea eax, [esp + 0x3fb]
push 0
push eax
call fcn.00484630
mov ecx, 0x54ef63
add esp, 0x18
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4221b0
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 0x4221ea
push ecx
lea eax, [esp + 0x38]
push 0x54ef63
push eax
call fcn.00484790
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.00484790
add esp, 0xc
cmp ebp, 4
jne 0x42225d
cmp edi, 0x40
mov eax, 0x2e4b2e4d
mov ecx, 0x214b214d
cmovg eax, ecx
jmp 0x422264
push 0
push str.Error:_Pattern_lengths_cant_be_below_64__Module_wasnt_saved.
push str.System_message
push 0
call fcn.004422b0
add esp, 0x10
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x460
ret
mov eax, dword [ebp + ebp*4 + 0x4bdd43]
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 0x422295
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 0x4222c6
push ecx
push ebp
push esi
call fcn.00484790
add esp, 0xc
mov edx, dword [ebx]
test edx, edx
je 0x42236e
mov cl, 0xf
movsx eax, cl
imul eax, eax, 0xd8
cmp dword [eax + edx + 0xf8], 0
jne 0x4222ea
add cl, 0xff
jns 0x4222d2
cmp cl, 0xff
je 0x42236e
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 0x422334
test eax, eax
cmovne ecx, eax
lea eax, [ecx + edi]
cmp eax, ebx
jle 0x422336
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 0x422290
push 0x4ddc2c
push dword [esp + 0x30]
call fcn.00489507
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4223c0
push eax
push str.Error_opening_file_for_saving__is_it_in_use_
push str.System_message
push eax
call fcn.004422b0
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.0048a33c
add esp, 0x10
cmp eax, 0x43c
jne 0x422786
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 0x422555
xor edx, edx
mov dword [esp + 0x28], edx
nop word [eax + eax]
cmp dword [edx*4 + 0x54e940], 0
jne 0x42242f
push ebx
push 0
push 0x50aed0
call fcn.00484630
add esp, 0xc
jmp 0x42251b
xor esi, esi
xor ecx, ecx
mov dword [esp + 0x20], ecx
nop word [eax + eax]
xor edi, edi
test eax, eax
jle 0x4224f9
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 0x422488
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 0x4224a5
movzx eax, cl
movzx ecx, word [eax*2 + 0x4bf20e]
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 0x4224ca
mov byte [esi + 0x50aed2], bl
xor al, al
jmp 0x4224d8
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 0x422457
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
add ecx, 0xa0
mov dword [esp + 0x20], ecx
cmp ecx, 0x2800
jl 0x422440
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.0048a33c
add esp, 0x10
cmp eax, ebx
jne 0x422786
inc ebp
movsx edx, bp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x28], edx
cmp edx, esi
jge 0x422555
mov eax, dword [0x54fc2c]
mov dword [esp + 0x24], eax
jmp 0x422410
mov edi, 1
mov dword [esp + 0x18], edi
nop
movsx esi, di
mov edx, dword [esi*4 + 0x54ed40]
test edx, edx
je 0x42271e
mov cl, 0xf
movsx eax, cl
imul eax, eax, 0xd8
cmp dword [eax + edx + 0xf8], 0
jne 0x42258c
add cl, 0xff
jns 0x422574
cmp cl, 0xff
je 0x42271e
cmp dword [edx + 0xf8], 0
lea ebp, [edx + 0xdc]
mov dword [esp + 0x24], ebp
je 0x42271e
cmp dword [ebp + 0x28], 0
jle 0x42271e
mov ecx, ebp
call fcn.00437a20
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 0x422769
xor edi, edi
test ebx, ebx
je 0x422713
nop word [eax + eax]
lea eax, [edi + 0x400]
mov esi, 0x400
cmp eax, ebx
jle 0x422603
mov esi, ebx
sub esi, edi
mov eax, dword [ebp + 0x1c]
lea edx, [eax + edi*2]
xor eax, eax
test esi, esi
jle 0x4226f1
cmp esi, 0x20
jb 0x4226de
lea ecx, [esi - 1]
lea ecx, [edx + ecx*2]
lea ebp, [esi + 0x51cecf]
cmp ecx, 0x51ced0
jb 0x422638
cmp ebp, edx
jae 0x4226da
mov ecx, esi
and ecx, 0x8000001f
jns 0x422647
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 [0x4e2ca0]
packuswb xmm0, xmm0
movq qword [eax + 0x51ced0], xmm0
movups xmm0, xmmword [ecx - 0x50]
psraw xmm0, xmm1
pand xmm0, xmmword [0x4e2ca0]
packuswb xmm0, xmm0
movq qword [eax + 0x51ced8], xmm0
movups xmm0, xmmword [ecx - 0x40]
psraw xmm0, xmm1
pand xmm0, xmmword [0x4e2ca0]
packuswb xmm0, xmm0
movq qword [eax + 0x51cee0], xmm0
movups xmm0, xmmword [ecx - 0x30]
psraw xmm0, xmm1
pand xmm0, xmmword [0x4e2ca0]
packuswb xmm0, xmm0
movq qword [eax + 0x51cee8], xmm0
add eax, 0x20
cmp eax, ebp
jl 0x422660
mov ebp, dword [esp + 0x24]
cmp eax, esi
jge 0x4226f1
mov cl, byte [edx + eax*2 + 1]
mov byte [eax + 0x51ced0], cl
inc eax
cmp eax, esi
jl 0x4226e2
push dword [esp + 0x14]
push esi
push 1
push 0x51ced0
call fcn.0048a33c
add esp, 0x10
cmp eax, esi
jne 0x42277f
add edi, esi
cmp edi, ebx
jl 0x4225f0
mov edi, dword [esp + 0x18]
mov ecx, ebp
call fcn.00437390
inc edi
mov dword [esp + 0x18], edi
cmp di, 0x1f
jle 0x422560
push dword [esp + 0x14]
call fcn.00489248
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.0048a33c
add esp, 0x10
cmp eax, ebx
je 0x422717
mov ecx, ebp
call fcn.00437390
push 0
push str.Error_saving_module:_general_I_O_error_
push str.System_message
push 0
call fcn.004422b0
push dword [esp + 0x24]
call fcn.00489248
add esp, 0x14
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x460
ret