Function at 0x471980
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x96c
mov dword [esp + 0x34], edx
mov byte [0x551ec0], 0
push ebx
mov ebx, ecx
mov dword [esp + 0x28], ebx
push ebp
push esi
push edi
cmp edx, 0x60
jb 0x4725a4
push 0x60
lea eax, [esp + 0x9c]
push 0
push eax
call fcn.00484630
push ebx
push 0x60
lea eax, [esp + 0xac]
push 1
push eax
call fcn.0048a775
add esp, 0x1c
cmp eax, 0x60
jne 0x4725a4
mov eax, 0x80
cmp word [esp + 0xba], ax
jg 0x47259d
mov si, word [esp + 0xb8]
mov eax, 0x100
cmp si, ax
jg 0x47259d
cmp word [esp + 0xbc], ax
jg 0x47259d
cmp byte [esp + 0xb5], 0x10
jne 0x47259d
mov eax, dword [esp + 0xc2]
dec eax
cmp ax, 1
ja 0x47259d
push 0x100
push 0xff
push 0x551d96
call fcn.00484630
push ebx
push 1
movsx eax, si
push eax
push 0x551d96
call fcn.0048a775
add esp, 0x1c
cmp eax, 1
jne 0x471ceb
mov cx, word [esp + 0xb8]
xor edx, edx
xor eax, eax
mov word [0x551e9e], cx
xor edi, edi
mov dword [esp + 0x2c], edx
xor esi, esi
cmp ax, cx
jae 0x471aa7
nop dword [eax + eax]
mov al, byte [esi + 0x551d96]
cmp al, 0xfe
je 0x471a9a
mov byte [edx + 0x551d96], al
inc edx
mov cx, word [0x551e9e]
jmp 0x471a9b
inc edi
inc esi
movzx eax, cx
cmp esi, eax
jl 0x471a80
mov dword [esp + 0x2c], edx
movzx eax, cx
cmp edi, eax
jg 0x471ab3
sub cx, di
jmp 0x471ab8
mov ecx, 1
mov eax, 1
movzx edx, cx
mov word [0x551e9e], cx
cmp edx, eax
jbe 0x471aea
nop dword [eax + eax]
cmp byte [eax + 0x551d96], 0xff
je 0x471ae0
inc eax
cmp eax, edx
jl 0x471ad0
jmp 0x471aea
mov cx, ax
mov word [0x551e9e], cx
mov edx, 0xff
cmp cx, dx
jae 0x471b0b
movzx eax, cx
sub edx, eax
push edx
push 0
lea eax, [eax + 0x551d96]
push eax
call fcn.00484630
add esp, 0xc
mov eax, dword [esp + 0xa8]
xor esi, esi
movups xmm0, xmmword [esp + 0x98]
mov dword [0x5511f3], eax
movzx eax, byte [esp + 0xca]
mov word [0x551ea2], ax
movzx eax, byte [esp + 0xc9]
mov word [0x551ea4], ax
xor eax, eax
movups xmmword [0x5511e3], xmm0
cmp ax, word [esp + 0xba]
jge 0x471b87
push ebx
push 1
lea eax, [esp + 0x40]
push 2
push eax
call fcn.0048a775
add esp, 0x10
cmp eax, 1
jne 0x471ceb
movzx eax, word [esp + 0x38]
shl eax, 4
mov dword [esp + esi*4 + 0x578], eax
inc esi
movsx eax, word [esp + 0xba]
cmp esi, eax
jl 0x471b50
xor eax, eax
xor esi, esi
cmp ax, word [esp + 0xbc]
jge 0x471bcc
push ebx
push 1
lea eax, [esp + 0x44]
push 2
push eax
call fcn.0048a775
add esp, 0x10
cmp eax, 1
jne 0x471ceb
movzx eax, word [esp + 0x3c]
shl eax, 4
mov dword [esp + esi*4 + 0x178], eax
inc esi
movsx eax, word [esp + 0xbc]
cmp esi, eax
jl 0x471b95
xor edi, edi
xor eax, eax
mov dword [esp + 0x30], edi
cmp ax, word [esp + 0xbc]
jge 0x47222c
lea ebp, [edi + 0x40]
nop word [eax + eax]
mov eax, dword [esp + edi*4 + 0x178]
test eax, eax
je 0x472217
xorps xmm0, xmm0
push 0
push eax
push ebx
movups xmmword [esp + 0x104], xmm0
movups xmmword [esp + 0x114], xmm0
movups xmmword [esp + 0x144], xmm0
movups xmmword [esp + 0x154], xmm0
movups xmmword [esp + 0x124], xmm0
movups xmmword [esp + 0x134], xmm0
movups xmmword [esp + 0x164], xmm0
movups xmmword [esp + 0x174], xmm0
call fcn.0048a035
push ebx
call fcn.004901c4
add esp, 0x10
test eax, eax
jne 0x472217
push ebx
push 1
lea eax, [esp + 0x34]
push 2
push eax
call fcn.0048a775
add esp, 0x10
cmp eax, 1
jne 0x471ceb
mov eax, dword [esp + 0x2c]
dec eax
cmp eax, 0x2fff
ja 0x472217
push 1
push 0xa010
call fcn.00489078
add esp, 8
mov dword [edi*4 + 0x551ee0], eax
test eax, eax
je 0x472596
push ebx
push 1
push dword [esp + 0x34]
mov word [edi*2 + 0x550fe0], bp
push 0x53a740
call fcn.0048a775
mov eax, dword [esp + 0x3c]
add esp, 0x10
xor esi, esi
xor ebp, ebp
test eax, eax
jle 0x4721e8
nop dword [eax]
cmp bp, 0x40
jge 0x4721e4
mov cl, byte [esi + 0x53a740]
inc esi
test cl, cl
jne 0x471cf5
inc ebp
jmp 0x4721dc
push str.General_I_O_error_during_loading__Is_the_file_in_use_
jmp 0x4725a9
mov dh, cl
xor ebx, ebx
and dh, 0x1f
mov dword [esp + 0x28], ebx
mov byte [esp + 0x22], dh
mov dword [esp + 0x18], ebx
test cl, 0x20
je 0x471d7e
mov al, byte [esi + 0x53a741]
mov dl, byte [esi + 0x53a740]
add esi, 2
movzx ebx, al
mov edi, esi
mov dword [esp + 0x24], ebx
xor ebx, ebx
cmp al, 0x80
mov eax, dword [esp + 0x24]
cmova eax, ebx
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x24], eax
mov byte [esp + 0x19], al
cmp dl, 0xfe
jne 0x471d49
mov ch, 0x61
mov byte [esp + 0x18], ch
jmp 0x471d8a
cmp dl, 0xff
jne 0x471d56
xor ch, ch
mov byte [esp + 0x18], ch
jmp 0x471d8a
mov ch, dl
and dl, 0xf
shr ch, 4
mov al, ch
add al, al
add ch, al
shl ch, 2
inc ch
add ch, dl
mov byte [esp + 0x18], ch
cmp ch, 0x60
jbe 0x471d8a
xor ch, ch
mov esi, edi
mov byte [esp + 0x18], ch
jmp 0x471d8a
mov al, byte [esp + 0x19]
mov ch, byte [esp + 0x18]
mov dword [esp + 0x24], eax
test cl, 0x40
je 0x471daa
mov al, byte [esi + 0x53a740]
inc esi
cmp al, 0x40
ja 0x471da2
add al, 0x10
mov byte [esp + 0x1a], al
jmp 0x471dae
xor al, al
mov byte [esp + 0x1a], al
jmp 0x471dae
mov al, byte [esp + 0x1a]
mov byte [esp + 0x17], al
test cl, cl
jns 0x472197
mov al, byte [esi + 0x53a741]
mov cl, byte [esi + 0x53a740]
mov bl, al
add esi, 2
test al, al
je 0x471df6
movzx edx, dh
mov byte [esp + edx + 0xf8], bl
cmp cl, 8
je 0x471de3
cmp cl, 0x15
jne 0x471dea
mov byte [esp + edx + 0x118], bl
mov dh, byte [esp + 0x22]
test al, al
jne 0x471e98
cmp cl, 7
je 0x471e98
cmp cl, 8
je 0x471e27
cmp cl, 0x15
je 0x471e27
cmp cl, 4
jb 0x471e13
cmp cl, 0xc
jbe 0x471e1b
mov al, cl
sub al, 0x11
cmp al, 2
ja 0x471e31
movzx eax, dh
mov bl, byte [esp + eax + 0xf8]
jmp 0x471e31
movzx eax, dh
mov bl, byte [esp + eax + 0x118]
movzx eax, dh
cmp cl, byte [esp + eax + 0x138]
jne 0x471e98
cmp cl, 0xa
je 0x471e98
cmp cl, 0x13
je 0x471e98
cmp cl, 5
je 0x471e77
cmp cl, 6
je 0x471e77
mov dl, bl
and dl, 0xf0
xor ah, ah
cmp cl, 4
je 0x471e62
cmp cl, 0xb
jne 0x471e73
cmp bl, 0xf0
ja 0x471e85
mov al, bl
and al, 0xf
cmp al, 0xf
jne 0x471e73
test dl, dl
jne 0x471e85
xor edx, edx
jmp 0x471e8a
mov dl, bl
and dl, 0xf0
cmp dl, 0xe0
jne 0x471e56
mov ah, 1
jmp 0x471e58
mov edx, 1
test ah, ah
jne 0x471e98
xor edi, edi
movzx ebx, bl
test edx, edx
cmove ebx, edi
movzx edi, byte [esp + 0x22]
test cl, cl
je 0x471ea8
mov byte [esp + edi + 0x138], cl
movzx eax, cl
dec eax
cmp eax, 0x15
ja case.0x471eb5.13
jmp dword [eax*4 + 0x4725c0]
mov al, 0xf
mov dword [esp + 0x28], eax
mov byte [esp + 0x1b], al
test bl, bl
jne 0x471edb
xor al, al
mov dword [esp + 0x28], eax
mov edx, eax
mov byte [esp + 0x1b], al
jmp 0x47219b
mov edx, dword [esp + 0x28]
cmp bl, 0x1f
movzx eax, bl
mov ecx, 0x1f
cmova eax, ecx
mov bl, al
jmp 0x47219b
mov dl, 0xb
mov byte [esp + 0x1b], dl
jmp 0x47219b
mov dl, 0xd
mov byte [esp + 0x1b], dl
jmp 0x47219b
cmp bl, 0xf0
jbe 0x471f20
mov dl, 0xe
and bl, 0xf
or bl, 0xb0
mov byte [esp + 0x1b], dl
jmp 0x47219b
mov al, bl
and al, 0xf
mov byte [esp + 0x17], al
cmp al, 0xf
jne 0x471f42
test bl, 0xf0
jbe 0x471f42
mov dl, 0xe
shr bl, 4
or bl, 0xa0
mov byte [esp + 0x1b], dl
jmp 0x47219b
cmp byte [esp + 0x17], 0
mov dl, 0xa
movzx ebx, bl
movzx eax, al
cmovne ebx, eax
mov byte [esp + 0x1b], dl
jmp 0x47219b
mov al, bl
and al, 0xf0
cmp al, 0xe0
jb 0x471f9f
and bl, 0xf
cmp cl, 5
jne 0x471f70
or bl, 0x20
jmp 0x471f73
or bl, 0x10
cmp al, 0xe0
mov edx, 0x21
mov ecx, 0xe
cmovne edx, ecx
mov byte [esp + 0x1b], dl
jne 0x47219b
test bl, bl
jne 0x47219b
xor dl, dl
mov byte [esp + 0x1b], dl
jmp 0x47219b
mov al, 7
sub al, cl
mov dl, al
mov byte [esp + 0x1b], dl
jmp 0x47219b
mov eax, dword [esp + 0x24]
mov dl, 3
mov dword [esp + 0x28], edx
mov byte [esp + 0x1b], dl
test al, al
je 0x47219b
mov cl, byte [esp + edi + 0x158]
cmp byte [esp + 0x24], cl
movzx edx, al
movzx eax, cl
cmovne edx, eax
mov al, dl
mov edx, dword [esp + 0x28]
mov dword [esp + 0x24], eax
mov byte [esp + 0x19], al
jmp 0x47219b
cmp bl, 0xf0
jbe 0x472011
and bl, 0xf
mov dl, 0xe
or bl, 0xb0
mov byte [esp + 0x1b], dl
cmp byte [esp + 0x17], 0
jne 0x47219b
mov byte [esp + 0x1a], 0xb0
jmp 0x47219b
mov al, bl
and al, 0xf
mov byte [esp + 0x23], al
cmp al, 0xf
jne 0x472043
test bl, 0xf0
jbe 0x472043
shr bl, 4
mov dl, 0xe
or bl, 0xa0
mov byte [esp + 0x1b], dl
cmp byte [esp + 0x17], 0
jne 0x47219b
mov byte [esp + 0x1a], 0xb0
jmp 0x47219b
cmp byte [esp + 0x23], 0
mov dl, 6
movzx ebx, bl
movzx eax, al
mov byte [esp + 0x1b], dl
cmovne ebx, eax
jmp 0x47219b
mov dl, 4
mov byte [esp + 0x1b], dl
jmp 0x47219b
mov dl, 0x1d
mov byte [esp + 0x1b], dl
jmp 0x47219b
xor dl, dl
mov byte [esp + 0x1b], dl
jmp 0x47219b
mov dl, 5
mov byte [esp + 0x1b], dl
jmp 0x47219b
mov dl, 9
mov byte [esp + 0x1b], dl
jmp 0x47219b
mov dl, 0x1b
mov byte [esp + 0x1b], dl
jmp 0x47219b
mov dl, 7
mov byte [esp + 0x1b], dl
jmp 0x47219b
mov cl, bl
mov dl, 0xe
shr cl, 4
and bl, 0xf
mov byte [esp + 0x1b], dl
mov ah, bl
mov byte [esp + 0x40], cl
mov al, bl
cmp cl, 1
jne 0x4720ce
or ah, 0x30
mov bl, ah
jmp 0x47219b
cmp cl, 2
jne 0x4720dc
or al, 0x50
mov bl, al
jmp 0x47219b
cmp cl, 3
jne 0x4720ea
or al, 0x40
mov bl, al
jmp 0x47219b
cmp cl, 4
jne 0x4720f8
or al, 0x70
mov bl, al
jmp 0x47219b
cmp cl, 0xb
jne 0x472106
or al, 0x60
mov bl, al
jmp 0x47219b
cmp cl, 0xc
jne 0x472124
or bl, 0xc0
cmp bl, 0xc0
jne 0x47219b
xor dl, dl
xor bl, bl
mov byte [esp + 0x1b], dl
jmp 0x47219b
cmp cl, 0xd
jne 0x472157
or bl, 0xd0
mov al, bl
test ch, ch
je case.0x471eb5.13
cmp ch, 0x61
je case.0x471eb5.13
cmp al, 0xd0
jne 0x47219b
xor al, al
mov byte [esp + 0x18], 0
xor dl, dl
mov dword [esp + 0x24], eax
mov byte [esp + 0x19], al
xor bl, bl
mov word [esp + 0x1a], 0
jmp 0x47219b
cmp cl, 0xe
jne 0x472161
or bl, 0xe0
jmp 0x47219b
cmp byte [esp + 0x40], 0xf
jne case.0x471eb5.13
or bl, 0xf0
jmp 0x47219b
mov dl, 0xf
mov byte [esp + 0x1b], dl
cmp bl, 0x21
jae 0x47219b
xor dl, dl
xor bl, bl
mov byte [esp + 0x1b], dl
jmp 0x47219b
mov dl, 0x10
mov byte [esp + 0x1b], dl
cmp bl, 0x40
jbe 0x47219b
xor dl, dl
xor bl, bl
mov byte [esp + 0x1b], dl
jmp 0x47219b
mov dl, byte [esp + 0x1b]
mov ecx, dword [esp + 0x24]
test cl, cl
je 0x4721b4
cmp dl, 3
je 0x4721b4
movzx eax, byte [esp + 0x22]
mov byte [esp + eax + 0x158], cl
movzx eax, byte [esp + 0x22]
mov edi, dword [esp + 0x30]
movsx ecx, bp
shl ecx, 5
add ecx, eax
mov eax, dword [esp + 0x18]
lea ecx, [ecx + ecx*4]
add ecx, dword [edi*4 + 0x551ee0]
mov dword [ecx], eax
mov byte [ecx + 4], bl
mov eax, dword [esp + 0x2c]
cmp esi, eax
jl 0x471cd0
mov ebx, dword [esp + 0x34]
mov ecx, edi
call fcn.00420940
test al, al
je 0x472212
mov eax, dword [edi*4 + 0x551ee0]
test eax, eax
je 0x472212
push eax
call fcn.00489083
add esp, 4
mov dword [edi*4 + 0x551ee0], 0
mov ebp, 0x40
movsx eax, word [esp + 0xbc]
inc edi
mov dword [esp + 0x30], edi
cmp edi, eax
jl 0x471bf0
xor eax, eax
mov byte [esp + 0x17], 0
xor ebp, ebp
cmp ax, word [esp + 0xba]
jge 0x4724ee
mov esi, 0x55120f
mov edi, 0xffff
mov dword [esp + 0x28], esi
mov eax, dword [esp + ebp*4 + 0x578]
test eax, eax
je 0x4724d6
push 0
push eax
push ebx
call fcn.0048a035
push ebx
push 0x50
lea eax, [esp + 0x5c]
push 1
push eax
call fcn.0048a775
add esp, 0x1c
cmp eax, 0x50
jne 0x472596
movups xmm0, xmmword [esp + 0x78]
mov eax, dword [esp + 0x88]
movups xmmword [esi], xmm0
mov dword [esi + 0x10], eax
mov ax, word [esp + 0x8c]
mov word [esi + 0x14], ax
mov al, byte [esp + 0x48]
cmp al, 2
jne 0x4722b4
mov byte [esp + 0x17], 1
jmp 0x4724d6
cmp al, 1
jne 0x4724d6
movzx ebx, byte [esp + 0x55]
movzx eax, word [esp + 0x56]
shl ebx, 0x10
or ebx, eax
shl ebx, 4
test byte [esp + 0x67], 0xf8
jne 0x47259d
cmp byte [esp + 0x66], 0
jne 0x47259d
test ebx, ebx
je 0x4724d2
cmp dword [esp + 0x58], 0
jle 0x4724d2
lea ecx, [ebp + 1]
call fcn.004208e0
test al, al
je 0x472596
mov ecx, dword [ebp*4 + 0x550bc4]
call fcn.004357a0
mov esi, dword [ebp*4 + 0x550bc4]
mov eax, dword [esp + 0x68]
add esi, 0xdc
movups xmm0, xmmword [esp + 0x78]
mov ecx, dword [esp + 0x44]
cmp eax, 0xffff
cmovg eax, edi
mov dword [esp + 0x68], eax
movups xmmword [esi], xmm0
mov eax, dword [esp + 0x88]
mov dword [esi + 0x10], eax
mov ax, word [esp + 0x8c]
mov word [esi + 0x14], ax
mov edi, dword [esp + 0x58]
lea eax, [edi + ebx]
cmp eax, ecx
jle 0x472365
mov edi, ecx
sub edi, ebx
mov dword [esp + 0x58], edi
mov al, byte [esp + 0x67]
mov cl, al
and cl, 1
mov byte [esp + 0x23], cl
mov cl, al
shr cl, 1
shr al, 2
and cl, 1
and al, 1
mov byte [esp + 0x24], cl
mov byte [esp + 0x30], al
test cl, cl
je 0x472390
add edi, edi
mov dword [esp + 0x58], edi
mov dword [esi + 0x28], edi
mov ecx, esi
mov al, byte [esp + 0x64]
mov byte [esi + 0x24], al
mov eax, dword [esp + 0x5c]
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x60]
sub eax, dword [esp + 0x5c]
mov dword [esi + 0x30], eax
movzx eax, byte [0x551ec0]
mov edx, dword [esp + 0x68]
push eax
call fcn.00432870
mov dl, byte [esp + 0x34]
add esp, 4
test dl, dl
je 0x4723d0
or byte [esi + 0x25], 0x10
add edi, edi
mov eax, dword [esi + 0x28]
test dl, dl
lea ecx, [eax + eax]
cmove ecx, eax
add ecx, 0x1f
push ecx
call fcn.004896c5
add esp, 4
mov dword [esi + 0x20], eax
test eax, eax
jne 0x4723f2
xor cl, cl
jmp 0x4723f7
mov cl, 1
add eax, 0xf
mov dword [esi + 0x1c], eax
test cl, cl
je 0x472596
mov ecx, dword [esi + 0x30]
cmp ecx, 1
jle 0x472425
mov eax, dword [esi + 0x2c]
add eax, ecx
cmp eax, dword [esi + 0x28]
jg 0x472425
test ecx, ecx
je 0x472425
cmp byte [esp + 0x23], 0
je 0x472433
or byte [esi + 0x25], 1
jmp 0x472433
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
push 0
push ebx
mov ebx, dword [esp + 0x3c]
push ebx
call fcn.0048a035
add esp, 0xc
cmp word [esp + 0xc2], 1
jne 0x472465
push 1
push edi
push ebx
call fcn.0048a035
add esp, 0xc
mov esi, dword [esp + 0x28]
mov edi, 0xffff
jmp 0x4724d6
movzx ecx, byte [esi + 0x25]
mov eax, dword [esi + 0x28]
shr ecx, 4
push ebx
and ecx, 1
push 1
shl eax, cl
push eax
push dword [esi + 0x1c]
call fcn.0048a775
add esp, 0x10
cmp eax, 1
jne 0x471ceb
cmp byte [esp + 0x30], 0
mov edx, dword [esi + 0x28]
mov ecx, dword [esi + 0x1c]
push dword [esp + 0x24]
je 0x4724a4
call fcn.00435cf0
jmp 0x4724a9
call fcn.00435a60
add esp, 4
cmp byte [esp + 0x24], 0
je 0x47245a
sar dword [esi + 0x28], 1
mov ecx, esi
push dword [esp + 0x30]
mov edx, dword [esi + 0x28]
call fcn.00437150
mov esi, dword [esp + 0x2c]
add esp, 4
mov edi, 0xffff
jmp 0x4724d6
mov ebx, dword [esp + 0x34]
movsx eax, word [esp + 0xba]
inc ebp
add esi, 0x17
mov dword [esp + 0x28], esi
cmp ebp, eax
jl 0x472251
movzx ebx, word [esp + 0xbc]
xor edx, edx
xor edi, edi
test ebx, ebx
je 0x472547
nop
mov eax, dword [edi*4 + 0x551ee0]
test eax, eax
je 0x472542
mov esi, 0x40
xor ecx, ecx
cmp byte [eax], 0
jne 0x47252f
cmp byte [eax + 1], 0
jne 0x47252f
cmp byte [eax + 2], 0
jne 0x47252f
cmp byte [eax + 3], 0
jne 0x47252f
cmp byte [eax + 4], 0
je 0x472534
cmp ecx, edx
cmovg edx, ecx
inc ecx
add eax, 5
cmp ecx, 0x20
jl 0x472512
sub esi, 1
jne 0x472510
inc edi
cmp edi, ebx
jl 0x472500
inc dl
cmp byte [esp + 0x17], 0
movsx eax, dl
mov dword [0x551eac], eax
je 0x472566
push str.Warning:_The_module_contains_unsupported_AdLib_instruments_
call dword [0x54e480]
add esp, 4
test byte [0x5524f5], 0x40
jne 0x472589
push 0x408320
push str.Loading_of_this_format_is_not_fully_supported_and_can_have_issues.
push str.System_message
push 0
call dword [0x54e484]
add esp, 0x10
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x96c
ret
push str.Not_enough_memory_
jmp 0x4725a9
push str.Error_loading_.s3m:_Incompatible_module_
jmp 0x4725a9
push str.Error:_This_file_is_either_not_a_module__or_is_not_supported.
call dword [0x54e480]
add esp, 4
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x96c
ret