Function at 0x421c80
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 0x421cc0
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.00442210
add esp, 0x10
xor edi, edi
xor ecx, ecx
test ebx, ebx
je 0x421d41
cmp ebx, 8
jb 0x421d41
cmp dword [0x4ed0fc], 2
jl 0x421d41
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 0x421cf0
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 0x421d66
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 0x421d50
inc edi
mov dword [esp + 0x18], edi
cmp edi, 0x64
jle 0x421d8f
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.00442210
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 0x421dcd
mov cl, 0xf
movsx eax, cl
imul eax, eax, 0xd8
cmp dword [eax + edx + 0xf8], 0
jne 0x421dc8
add cl, 0xff
jns 0x421db0
cmp cl, 0xff
jg 0x421dd5
inc esi
cmp si, bx
jle 0x421da0
jmp 0x421deb
push 0
push str.Warning:_Song_has_more_than_31_instruments_
push str.System_message
push 0
call fcn.00442210
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 0x421e24
mov edx, dword [edx + 0x104]
cmp edx, 0x1fffe
jle 0x421e18
mov bl, 1
jmp 0x421e24
cmp edx, 0xfffe
movzx eax, al
cmovg eax, ebp
add ecx, 4
sub esi, ebp
jne 0x421e00
test bl, bl
je 0x421e37
push esi
push str.Warning:_Song_has_sample_lengths_that_are_too_long_for_the_MOD_format_
jmp 0x421e42
test al, al
je 0x421e51
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.00442210
add esp, 0x10
mov esi, ebp
movsx eax, si
mov ecx, dword [eax*4 + 0x54ed40]
test ecx, ecx
je 0x421ebc
mov dl, 0xf
movsx eax, dl
imul eax, eax, 0xd8
cmp dword [eax + ecx + 0xf8], 0
jne 0x421e7b
add dl, 0xff
jns 0x421e63
movsx ax, dl
movzx eax, ax
test ax, ax
jg 0x421ec5
jne 0x421ebc
cmp word [ecx + 0x72], 0
jne 0x421ec5
cmp byte [ecx + 0x6b], 0
jne 0x421ec5
cmp byte [ecx + 0x6c], 0
jne 0x421ec5
cmp byte [ecx + 0x70], 0
ja 0x421ec5
mov al, byte [ecx + 0x101]
and al, 3
cmp al, 2
je 0x421ec5
cmp byte [ecx + 0xf5], 0
jne 0x421ec5
cmp byte [ecx], 0
jne 0x421ec5
inc esi
cmp si, 0x1f
jle 0x421e53
jmp 0x421edb
push 0
push str.Warning:_Song_is_using_XM_instrument_features_
push str.System_message
push 0
call fcn.00442210
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 0x42203c
xor eax, eax
mov edi, dword [eax*4 + 0x54e940]
test edi, edi
je 0x421fa2
movzx eax, word [eax*2 + 0x54e740]
cmp ax, 0x40
jl 0x4220fa
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 0x421f8b
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 0x421f66
cmp byte [ecx + 2], 0
je 0x421f6b
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 0x421f50
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], edx
add edi, 0xa0
sub eax, 1
mov dword [esp + 0x14], eax
jne 0x421f40
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 0x421f01
test cl, cl
je 0x421fd6
push 0
push str.Warning:_Song_has_pattern_lengths_above_64_
push str.System_message
push 0
call fcn.00442210
mov ebp, dword [0x54fc2c]
add esp, 0x10
test bl, bl
je 0x421ff6
push 0
push str.Warning:_Patterns_have_instrument_numbers_above_31_
push str.System_message
push 0
call fcn.00442210
mov ebp, dword [0x54fc2c]
add esp, 0x10
cmp byte [esp + 0x13], 0
je 0x422019
push 0
push str.Warning:_Patterns_have_incompatible_effects_
push str.System_message
push 0
call fcn.00442210
mov ebp, dword [0x54fc2c]
add esp, 0x10
cmp byte [esp + 0x1c], 0
je 0x42203c
push 0
push str.Warning:_Patterns_have_notes_below_A_0_
push str.System_message
push 0
call fcn.00442210
mov ebp, dword [0x54fc2c]
add esp, 0x10
push 0x3a2
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.00484500
push 0x81
lea eax, [esp + 0x3fb]
push 0
push eax
call fcn.00484500
mov ecx, 0x54ef63
add esp, 0x18
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x422070
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 0x4220aa
push ecx
lea eax, [esp + 0x38]
push 0x54ef63
push eax
call fcn.00484660
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.00484660
add esp, 0xc
cmp ebp, 4
jne 0x42211d
cmp edi, 0x40
mov eax, 0x2e4b2e4d
mov ecx, 0x214b214d
cmovg eax, ecx
jmp 0x422124
push 0
push str.Error:_Pattern_lengths_cant_be_below_64__Module_wasnt_saved.
push str.System_message
push 0
call fcn.00442210
add esp, 0x10
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x460
ret
mov eax, dword [ebp + ebp*4 + 0x4bddd3]
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 0x422155
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 0x422186
push ecx
push ebp
push esi
call fcn.00484660
add esp, 0xc
mov edx, dword [ebx]
test edx, edx
je 0x42222e
mov cl, 0xf
movsx eax, cl
imul eax, eax, 0xd8
cmp dword [eax + edx + 0xf8], 0
jne 0x4221aa
add cl, 0xff
jns 0x422192
cmp cl, 0xff
je 0x42222e
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 0x4221f4
test eax, eax
cmovne ecx, eax
lea eax, [ecx + edi]
cmp eax, ebx
jle 0x4221f6
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 0x422150
push 0x4ddcbc
push dword [esp + 0x30]
call fcn.004893d7
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x422280
push eax
push str.Error_opening_file_for_saving__is_it_in_use_
push str.System_message
push eax
call fcn.00442210
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.0048a20c
add esp, 0x10
cmp eax, 0x43c
jne 0x422646
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 0x422415
xor edx, edx
mov dword [esp + 0x28], edx
nop word [eax + eax]
cmp dword [edx*4 + 0x54e940], 0
jne 0x4222ef
push ebx
push 0
push 0x50aed0
call fcn.00484500
add esp, 0xc
jmp 0x4223db
xor esi, esi
xor ecx, ecx
mov dword [esp + 0x20], ecx
nop word [eax + eax]
xor edi, edi
test eax, eax
jle 0x4223b9
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 0x422348
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 0x422365
movzx eax, cl
movzx ecx, word [eax*2 + 0x4bf29e]
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 0x42238a
mov byte [esi + 0x50aed2], bl
xor al, al
jmp 0x422398
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 0x422317
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
add ecx, 0xa0
mov dword [esp + 0x20], ecx
cmp ecx, 0x2800
jl 0x422300
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.0048a20c
add esp, 0x10
cmp eax, ebx
jne 0x422646
inc ebp
movsx edx, bp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x28], edx
cmp edx, esi
jge 0x422415
mov eax, dword [0x54fc2c]
mov dword [esp + 0x24], eax
jmp 0x4222d0
mov edi, 1
mov dword [esp + 0x18], edi
nop
movsx esi, di
mov edx, dword [esi*4 + 0x54ed40]
test edx, edx
je 0x4225de
mov cl, 0xf
movsx eax, cl
imul eax, eax, 0xd8
cmp dword [eax + edx + 0xf8], 0
jne 0x42244c
add cl, 0xff
jns 0x422434
cmp cl, 0xff
je 0x4225de
cmp dword [edx + 0xf8], 0
lea ebp, [edx + 0xdc]
mov dword [esp + 0x24], ebp
je 0x4225de
cmp dword [ebp + 0x28], 0
jle 0x4225de
mov ecx, ebp
call fcn.00437970
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 0x422629
xor edi, edi
test ebx, ebx
je 0x4225d3
nop word [eax + eax]
lea eax, [edi + 0x400]
mov esi, 0x400
cmp eax, ebx
jle 0x4224c3
mov esi, ebx
sub esi, edi
mov eax, dword [ebp + 0x1c]
lea edx, [eax + edi*2]
xor eax, eax
test esi, esi
jle 0x4225b1
cmp esi, 0x20
jb 0x42259e
lea ecx, [esi - 1]
lea ecx, [edx + ecx*2]
lea ebp, [esi + 0x51cecf]
cmp ecx, 0x51ced0
jb 0x4224f8
cmp ebp, edx
jae 0x42259a
mov ecx, esi
and ecx, 0x8000001f
jns 0x422507
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 [0x4e2d00]
packuswb xmm0, xmm0
movq qword [eax + 0x51ced0], xmm0
movups xmm0, xmmword [ecx - 0x50]
psraw xmm0, xmm1
pand xmm0, xmmword [0x4e2d00]
packuswb xmm0, xmm0
movq qword [eax + 0x51ced8], xmm0
movups xmm0, xmmword [ecx - 0x40]
psraw xmm0, xmm1
pand xmm0, xmmword [0x4e2d00]
packuswb xmm0, xmm0
movq qword [eax + 0x51cee0], xmm0
movups xmm0, xmmword [ecx - 0x30]
psraw xmm0, xmm1
pand xmm0, xmmword [0x4e2d00]
packuswb xmm0, xmm0
movq qword [eax + 0x51cee8], xmm0
add eax, 0x20
cmp eax, ebp
jl 0x422520
mov ebp, dword [esp + 0x24]
cmp eax, esi
jge 0x4225b1
mov cl, byte [edx + eax*2 + 1]
mov byte [eax + 0x51ced0], cl
inc eax
cmp eax, esi
jl 0x4225a2
push dword [esp + 0x14]
push esi
push 1
push 0x51ced0
call fcn.0048a20c
add esp, 0x10
cmp eax, esi
jne 0x42263f
add edi, esi
cmp edi, ebx
jl 0x4224b0
mov edi, dword [esp + 0x18]
mov ecx, ebp
call fcn.004372e0
inc edi
mov dword [esp + 0x18], edi
cmp di, 0x1f
jle 0x422420
push dword [esp + 0x14]
call fcn.00489118
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.0048a20c
add esp, 0x10
cmp eax, ebx
je 0x4225d7
mov ecx, ebp
call fcn.004372e0
push 0
push str.Error_saving_module:_general_I_O_error_
push str.System_message
push 0
call fcn.00442210
push dword [esp + 0x24]
call fcn.00489118
add esp, 0x14
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x460
ret