Function at 0x473a00
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x154
push ebx
push ebp
push esi
mov esi, edx
push edi
mov edi, ecx
cmp esi, 0x150
jb 0x473d57
push edi
push 0x150
lea eax, [esp + 0x18]
push 1
push eax
call fcn.0048a775
add esp, 0x10
cmp eax, 0x150
jne 0x473d57
mov ecx, dword [esp + 0x4a]
lea eax, [ecx - 0x102]
cmp ax, 2
ja 0x473d2e
mov eax, 0x100
cmp word [esp + 0x50], ax
jbe 0x473a64
push str.Error_loading_XM:_The_song_has_more_than_256_orders_
jmp 0x473d5c
cmp word [esp + 0x56], ax
jbe 0x473a75
push str.Error_loading_XM:_The_song_has_more_than_256_patterns_
jmp 0x473d5c
cmp word [esp + 0x54], 0
je 0x473d27
cmp word [esp + 0x58], ax
ja 0x473d27
mov eax, dword [esp + 0x4c]
push 0
add eax, 0x3c
push eax
push edi
call fcn.0048a035
add esp, 0xc
cmp esi, 0x150
je 0x473abe
push edi
call fcn.004901c4
add esp, 4
test eax, eax
je 0x473abe
push str.Error_loading_XM:_The_module_is_empty_
jmp 0x473d5c
mov eax, dword [esp + 0x31]
mov ebp, 1
movups xmm0, xmmword [esp + 0x21]
mov cx, word [esp + 0x50]
mov dword [0x5511f3], eax
movzx eax, word [esp + 0x52]
mov word [0x551ea0], ax
movzx eax, byte [esp + 0x54]
mov dword [0x551eac], eax
movzx eax, word [esp + 0x5e]
mov word [0x551ea2], ax
movzx eax, word [esp + 0x5c]
mov word [0x551ea4], ax
mov eax, dword [esp + 0x5a]
and eax, 1
mov byte [0x5511f7], 0
mov word [0x551e9e], cx
movups xmmword [0x5511e3], xmm0
mov byte [0x551ec0], al
test cx, cx
jne 0x473b33
mov dx, bp
mov word [0x551e9e], dx
jmp 0x473b50
movzx eax, cx
push eax
lea eax, [esp + 0x64]
push eax
push 0x551d96
call fcn.00484790
mov dx, word [0x551e9e]
add esp, 0xc
mov esi, 0xff
nop word [eax + eax]
movsx ebx, si
cmp byte [ebx + 0x551d96], 0xff
jne 0x473b87
movzx ecx, dx
cmp ecx, ebx
movzx eax, si
movzx edx, dx
cmovg edx, eax
dec esi
mov word [0x551e9e], dx
test si, si
jns 0x473b60
mov eax, 0xff
cmp dx, ax
jbe 0x473b97
mov word [0x551e9e], ax
mov eax, dword [esp + 0x4a]
mov ecx, 0x104
cmp ax, cx
jae 0x473c0e
mov esi, ebp
cmp bp, word [esp + 0x58]
ja 0x473bcd
nop
mov edx, esi
mov ecx, edi
call fcn.00473d80
test al, al
je 0x473d65
inc esi
cmp si, word [esp + 0x58]
jbe 0x473bb0
mov eax, dword [esp + 0x4a]
mov edx, dword [esp + 0x56]
mov ecx, edi
push eax
call fcn.004743f0
add esp, 4
test al, al
je 0x473d65
mov cx, word [esp + 0x58]
mov esi, ebp
cmp bp, cx
ja 0x473c5e
mov edx, esi
mov ecx, edi
call fcn.00474160
test al, al
je 0x473d65
mov cx, word [esp + 0x58]
inc esi
cmp si, cx
jbe 0x473bf0
jmp 0x473c5e
mov edx, dword [esp + 0x56]
mov ecx, edi
push eax
call fcn.004743f0
add esp, 4
test al, al
je 0x473d65
mov cx, word [esp + 0x58]
mov esi, ebp
cmp bp, cx
ja 0x473c5e
mov edx, esi
mov ecx, edi
call fcn.00473d80
test al, al
je 0x473d65
mov edx, esi
mov ecx, edi
call fcn.00474160
test al, al
je 0x473d65
mov cx, word [esp + 0x58]
inc esi
cmp si, cx
jbe 0x473c31
mov edi, 0x80
cmp cx, di
jbe 0x473ca0
mov esi, 0x81
mov eax, esi
cmp ax, cx
ja 0x473ca0
mov eax, dword [esi*4 + 0x550bc0]
test eax, eax
je 0x473c98
push eax
call fcn.00489083
mov cx, word [esp + 0x5c]
add esp, 4
mov dword [esi*4 + 0x550bc0], 0
inc esi
movzx eax, cx
cmp esi, eax
jle 0x473c74
xor bl, bl
mov eax, 0x550bc4
mov edx, 0x10
nop dword [eax]
mov ecx, dword [eax]
test ecx, ecx
je 0x473cc8
cmp word [ecx + 0xd8], dx
jle 0x473cc8
mov bl, 1
mov word [ecx + 0xd8], dx
add eax, 4
cmp eax, 0x550dc0
jle 0x473cb0
cmp dword [0x551eac], 0x20
jle 0x473cf3
push str.Warning:_Module_contains__32_channels._The_extra_channels_will_be_discarded_
mov dword [0x551eac], 0x20
call dword [0x54e480]
add esp, 4
cmp word [esp + 0x58], di
jbe 0x473d08
push str.Warning:_Module_contains__128_instruments._The_extra_instruments_will_be_discarded_
call dword [0x54e480]
add esp, 4
test bl, bl
je 0x473d1a
push str.Warning:_Module_contains_instrument_s__with__16_samples._The_extra_samples_will_be_discarded_
call dword [0x54e480]
add esp, 4
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x154
ret
push str.Error_loading_XM:_This_file_is_corrupt.
jmp 0x473d5c
movzx ecx, cx
movzx eax, cl
shr ecx, 8
push eax
and ecx, 0xf
push ecx
push str.Error_loading_XM:_Unsupported_file_version__v_01X._02X_.
call dword [0x54e480]
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x154
ret
push str.Error:_This_file_is_either_not_a_module__or_is_not_supported.
call dword [0x54e480]
add esp, 4
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x154
ret