Function at 0x473970
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 0x473cc7
push edi
push 0x150
lea eax, [esp + 0x18]
push 1
push eax
call fcn.0048a645
add esp, 0x10
cmp eax, 0x150
jne 0x473cc7
mov ecx, dword [esp + 0x4a]
lea eax, [ecx - 0x102]
cmp ax, 2
ja 0x473c9e
mov eax, 0x100
cmp word [esp + 0x50], ax
jbe 0x4739d4
push str.Error_loading_XM:_The_song_has_more_than_256_orders_
jmp 0x473ccc
cmp word [esp + 0x56], ax
jbe 0x4739e5
push str.Error_loading_XM:_The_song_has_more_than_256_patterns_
jmp 0x473ccc
cmp word [esp + 0x54], 0
je 0x473c97
cmp word [esp + 0x58], ax
ja 0x473c97
mov eax, dword [esp + 0x4c]
push 0
add eax, 0x3c
push eax
push edi
call fcn.00489f05
add esp, 0xc
cmp esi, 0x150
je 0x473a2e
push edi
call fcn.00490094
add esp, 4
test eax, eax
je 0x473a2e
push str.Error_loading_XM:_The_module_is_empty_
jmp 0x473ccc
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 0x473aa3
mov dx, bp
mov word [0x551e9e], dx
jmp 0x473ac0
movzx eax, cx
push eax
lea eax, [esp + 0x64]
push eax
push 0x551d96
call fcn.00484660
mov dx, word [0x551e9e]
add esp, 0xc
mov esi, 0xff
nop word [eax + eax]
movsx ebx, si
cmp byte [ebx + 0x551d96], 0xff
jne 0x473af7
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 0x473ad0
mov eax, 0xff
cmp dx, ax
jbe 0x473b07
mov word [0x551e9e], ax
mov eax, dword [esp + 0x4a]
mov ecx, 0x104
cmp ax, cx
jae 0x473b7e
mov esi, ebp
cmp bp, word [esp + 0x58]
ja 0x473b3d
nop
mov edx, esi
mov ecx, edi
call fcn.00473cf0
test al, al
je 0x473cd5
inc esi
cmp si, word [esp + 0x58]
jbe 0x473b20
mov eax, dword [esp + 0x4a]
mov edx, dword [esp + 0x56]
mov ecx, edi
push eax
call fcn.00474360
add esp, 4
test al, al
je 0x473cd5
mov cx, word [esp + 0x58]
mov esi, ebp
cmp bp, cx
ja 0x473bce
mov edx, esi
mov ecx, edi
call fcn.004740d0
test al, al
je 0x473cd5
mov cx, word [esp + 0x58]
inc esi
cmp si, cx
jbe 0x473b60
jmp 0x473bce
mov edx, dword [esp + 0x56]
mov ecx, edi
push eax
call fcn.00474360
add esp, 4
test al, al
je 0x473cd5
mov cx, word [esp + 0x58]
mov esi, ebp
cmp bp, cx
ja 0x473bce
mov edx, esi
mov ecx, edi
call fcn.00473cf0
test al, al
je 0x473cd5
mov edx, esi
mov ecx, edi
call fcn.004740d0
test al, al
je 0x473cd5
mov cx, word [esp + 0x58]
inc esi
cmp si, cx
jbe 0x473ba1
mov edi, 0x80
cmp cx, di
jbe 0x473c10
mov esi, 0x81
mov eax, esi
cmp ax, cx
ja 0x473c10
mov eax, dword [esi*4 + 0x550bc0]
test eax, eax
je 0x473c08
push eax
call fcn.00488f53
mov cx, word [esp + 0x5c]
add esp, 4
mov dword [esi*4 + 0x550bc0], 0
inc esi
movzx eax, cx
cmp esi, eax
jle 0x473be4
xor bl, bl
mov eax, 0x550bc4
mov edx, 0x10
nop dword [eax]
mov ecx, dword [eax]
test ecx, ecx
je 0x473c38
cmp word [ecx + 0xd8], dx
jle 0x473c38
mov bl, 1
mov word [ecx + 0xd8], dx
add eax, 4
cmp eax, 0x550dc0
jle 0x473c20
cmp dword [0x551eac], 0x20
jle 0x473c63
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 0x473c78
push str.Warning:_Module_contains__128_instruments._The_extra_instruments_will_be_discarded_
call dword [0x54e480]
add esp, 4
test bl, bl
je 0x473c8a
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 0x473ccc
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