Function at 0x471730
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 0x472354
push 0x60
lea eax, [esp + 0x9c]
push 0
push eax
call fcn.00484320
push ebx
push 0x60
lea eax, [esp + 0xac]
push 1
push eax
call fcn.0048a465
add esp, 0x1c
cmp eax, 0x60
jne 0x472354
mov eax, 0x80
cmp word [esp + 0xba], ax
jg 0x47234d
mov si, word [esp + 0xb8]
mov eax, 0x100
cmp si, ax
jg 0x47234d
cmp word [esp + 0xbc], ax
jg 0x47234d
cmp byte [esp + 0xb5], 0x10
jne 0x47234d
mov eax, dword [esp + 0xc2]
dec eax
cmp ax, 1
ja 0x47234d
push 0x100
push 0xff
push 0x551d96
call fcn.00484320
push ebx
push 1
movsx eax, si
push eax
push 0x551d96
call fcn.0048a465
add esp, 0x1c
cmp eax, 1
jne 0x471a9b
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 0x471857
nop dword [eax + eax]
mov al, byte [esi + 0x551d96]
cmp al, 0xfe
je 0x47184a
mov byte [edx + 0x551d96], al
inc edx
mov cx, word [0x551e9e]
jmp 0x47184b
inc edi
inc esi
movzx eax, cx
cmp esi, eax
jl 0x471830
mov dword [esp + 0x2c], edx
movzx eax, cx
cmp edi, eax
jg 0x471863
sub cx, di
jmp 0x471868
mov ecx, 1
mov eax, 1
movzx edx, cx
mov word [0x551e9e], cx
cmp edx, eax
jbe 0x47189a
nop dword [eax + eax]
cmp byte [eax + 0x551d96], 0xff
je 0x471890
inc eax
cmp eax, edx
jl 0x471880
jmp 0x47189a
mov cx, ax
mov word [0x551e9e], cx
mov edx, 0xff
cmp cx, dx
jae 0x4718bb
movzx eax, cx
sub edx, eax
push edx
push 0
lea eax, [eax + 0x551d96]
push eax
call fcn.00484320
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 0x471937
push ebx
push 1
lea eax, [esp + 0x40]
push 2
push eax
call fcn.0048a465
add esp, 0x10
cmp eax, 1
jne 0x471a9b
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 0x471900
xor eax, eax
xor esi, esi
cmp ax, word [esp + 0xbc]
jge 0x47197c
push ebx
push 1
lea eax, [esp + 0x44]
push 2
push eax
call fcn.0048a465
add esp, 0x10
cmp eax, 1
jne 0x471a9b
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 0x471945
xor edi, edi
xor eax, eax
mov dword [esp + 0x30], edi
cmp ax, word [esp + 0xbc]
jge 0x471fdc
lea ebp, [edi + 0x40]
nop word [eax + eax]
mov eax, dword [esp + edi*4 + 0x178]
test eax, eax
je 0x471fc7
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.00489d25
push ebx
call fcn.0048feb4
add esp, 0x10
test eax, eax
jne 0x471fc7
push ebx
push 1
lea eax, [esp + 0x34]
push 2
push eax
call fcn.0048a465
add esp, 0x10
cmp eax, 1
jne 0x471a9b
mov eax, dword [esp + 0x2c]
dec eax
cmp eax, 0x2fff
ja 0x471fc7
push 1
push 0xa010
call fcn.00488d68
add esp, 8
mov dword [edi*4 + 0x551ee0], eax
test eax, eax
je 0x472346
push ebx
push 1
push dword [esp + 0x34]
mov word [edi*2 + 0x550fe0], bp
push 0x53a740
call fcn.0048a465
mov eax, dword [esp + 0x3c]
add esp, 0x10
xor esi, esi
xor ebp, ebp
test eax, eax
jle 0x471f98
nop dword [eax]
cmp bp, 0x40
jge 0x471f94
mov cl, byte [esi + 0x53a740]
inc esi
test cl, cl
jne 0x471aa5
inc ebp
jmp 0x471f8c
push str.General_I_O_error_during_loading__Is_the_file_in_use_
jmp 0x472359
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 0x471b2e
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 0x471af9
mov ch, 0x61
mov byte [esp + 0x18], ch
jmp 0x471b3a
cmp dl, 0xff
jne 0x471b06
xor ch, ch
mov byte [esp + 0x18], ch
jmp 0x471b3a
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 0x471b3a
xor ch, ch
mov esi, edi
mov byte [esp + 0x18], ch
jmp 0x471b3a
mov al, byte [esp + 0x19]
mov ch, byte [esp + 0x18]
mov dword [esp + 0x24], eax
test cl, 0x40
je 0x471b5a
mov al, byte [esi + 0x53a740]
inc esi
cmp al, 0x40
ja 0x471b52
add al, 0x10
mov byte [esp + 0x1a], al
jmp 0x471b5e
xor al, al
mov byte [esp + 0x1a], al
jmp 0x471b5e
mov al, byte [esp + 0x1a]
mov byte [esp + 0x17], al
test cl, cl
jns 0x471f47
mov al, byte [esi + 0x53a741]
mov cl, byte [esi + 0x53a740]
mov bl, al
add esi, 2
test al, al
je 0x471ba6
movzx edx, dh
mov byte [esp + edx + 0xf8], bl
cmp cl, 8
je 0x471b93
cmp cl, 0x15
jne 0x471b9a
mov byte [esp + edx + 0x118], bl
mov dh, byte [esp + 0x22]
test al, al
jne 0x471c48
cmp cl, 7
je 0x471c48
cmp cl, 8
je 0x471bd7
cmp cl, 0x15
je 0x471bd7
cmp cl, 4
jb 0x471bc3
cmp cl, 0xc
jbe 0x471bcb
mov al, cl
sub al, 0x11
cmp al, 2
ja 0x471be1
movzx eax, dh
mov bl, byte [esp + eax + 0xf8]
jmp 0x471be1
movzx eax, dh
mov bl, byte [esp + eax + 0x118]
movzx eax, dh
cmp cl, byte [esp + eax + 0x138]
jne 0x471c48
cmp cl, 0xa
je 0x471c48
cmp cl, 0x13
je 0x471c48
cmp cl, 5
je 0x471c27
cmp cl, 6
je 0x471c27
mov dl, bl
and dl, 0xf0
xor ah, ah
cmp cl, 4
je 0x471c12
cmp cl, 0xb
jne 0x471c23
cmp bl, 0xf0
ja 0x471c35
mov al, bl
and al, 0xf
cmp al, 0xf
jne 0x471c23
test dl, dl
jne 0x471c35
xor edx, edx
jmp 0x471c3a
mov dl, bl
and dl, 0xf0
cmp dl, 0xe0
jne 0x471c06
mov ah, 1
jmp 0x471c08
mov edx, 1
test ah, ah
jne 0x471c48
xor edi, edi
movzx ebx, bl
test edx, edx
cmove ebx, edi
movzx edi, byte [esp + 0x22]
test cl, cl
je 0x471c58
mov byte [esp + edi + 0x138], cl
movzx eax, cl
dec eax
cmp eax, 0x15
ja case.0x471c65.13
jmp dword [eax*4 + 0x472370]
mov al, 0xf
mov dword [esp + 0x28], eax
mov byte [esp + 0x1b], al
test bl, bl
jne 0x471c8b
xor al, al
mov dword [esp + 0x28], eax
mov edx, eax
mov byte [esp + 0x1b], al
jmp 0x471f4b
mov edx, dword [esp + 0x28]
cmp bl, 0x1f
movzx eax, bl
mov ecx, 0x1f
cmova eax, ecx
mov bl, al
jmp 0x471f4b
mov dl, 0xb
mov byte [esp + 0x1b], dl
jmp 0x471f4b
mov dl, 0xd
mov byte [esp + 0x1b], dl
jmp 0x471f4b
cmp bl, 0xf0
jbe 0x471cd0
mov dl, 0xe
and bl, 0xf
or bl, 0xb0
mov byte [esp + 0x1b], dl
jmp 0x471f4b
mov al, bl
and al, 0xf
mov byte [esp + 0x17], al
cmp al, 0xf
jne 0x471cf2
test bl, 0xf0
jbe 0x471cf2
mov dl, 0xe
shr bl, 4
or bl, 0xa0
mov byte [esp + 0x1b], dl
jmp 0x471f4b
cmp byte [esp + 0x17], 0
mov dl, 0xa
movzx ebx, bl
movzx eax, al
cmovne ebx, eax
mov byte [esp + 0x1b], dl
jmp 0x471f4b
mov al, bl
and al, 0xf0
cmp al, 0xe0
jb 0x471d4f
and bl, 0xf
cmp cl, 5
jne 0x471d20
or bl, 0x20
jmp 0x471d23
or bl, 0x10
cmp al, 0xe0
mov edx, 0x21
mov ecx, 0xe
cmovne edx, ecx
mov byte [esp + 0x1b], dl
jne 0x471f4b
test bl, bl
jne 0x471f4b
xor dl, dl
mov byte [esp + 0x1b], dl
jmp 0x471f4b
mov al, 7
sub al, cl
mov dl, al
mov byte [esp + 0x1b], dl
jmp 0x471f4b
mov eax, dword [esp + 0x24]
mov dl, 3
mov dword [esp + 0x28], edx
mov byte [esp + 0x1b], dl
test al, al
je 0x471f4b
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 0x471f4b
cmp bl, 0xf0
jbe 0x471dc1
and bl, 0xf
mov dl, 0xe
or bl, 0xb0
mov byte [esp + 0x1b], dl
cmp byte [esp + 0x17], 0
jne 0x471f4b
mov byte [esp + 0x1a], 0xb0
jmp 0x471f4b
mov al, bl
and al, 0xf
mov byte [esp + 0x23], al
cmp al, 0xf
jne 0x471df3
test bl, 0xf0
jbe 0x471df3
shr bl, 4
mov dl, 0xe
or bl, 0xa0
mov byte [esp + 0x1b], dl
cmp byte [esp + 0x17], 0
jne 0x471f4b
mov byte [esp + 0x1a], 0xb0
jmp 0x471f4b
cmp byte [esp + 0x23], 0
mov dl, 6
movzx ebx, bl
movzx eax, al
mov byte [esp + 0x1b], dl
cmovne ebx, eax
jmp 0x471f4b
mov dl, 4
mov byte [esp + 0x1b], dl
jmp 0x471f4b
mov dl, 0x1d
mov byte [esp + 0x1b], dl
jmp 0x471f4b
xor dl, dl
mov byte [esp + 0x1b], dl
jmp 0x471f4b
mov dl, 5
mov byte [esp + 0x1b], dl
jmp 0x471f4b
mov dl, 9
mov byte [esp + 0x1b], dl
jmp 0x471f4b
mov dl, 0x1b
mov byte [esp + 0x1b], dl
jmp 0x471f4b
mov dl, 7
mov byte [esp + 0x1b], dl
jmp 0x471f4b
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 0x471e7e
or ah, 0x30
mov bl, ah
jmp 0x471f4b
cmp cl, 2
jne 0x471e8c
or al, 0x50
mov bl, al
jmp 0x471f4b
cmp cl, 3
jne 0x471e9a
or al, 0x40
mov bl, al
jmp 0x471f4b
cmp cl, 4
jne 0x471ea8
or al, 0x70
mov bl, al
jmp 0x471f4b
cmp cl, 0xb
jne 0x471eb6
or al, 0x60
mov bl, al
jmp 0x471f4b
cmp cl, 0xc
jne 0x471ed4
or bl, 0xc0
cmp bl, 0xc0
jne 0x471f4b
xor dl, dl
xor bl, bl
mov byte [esp + 0x1b], dl
jmp 0x471f4b
cmp cl, 0xd
jne 0x471f07
or bl, 0xd0
mov al, bl
test ch, ch
je case.0x471c65.13
cmp ch, 0x61
je case.0x471c65.13
cmp al, 0xd0
jne 0x471f4b
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 0x471f4b
cmp cl, 0xe
jne 0x471f11
or bl, 0xe0
jmp 0x471f4b
cmp byte [esp + 0x40], 0xf
jne case.0x471c65.13
or bl, 0xf0
jmp 0x471f4b
mov dl, 0xf
mov byte [esp + 0x1b], dl
cmp bl, 0x21
jae 0x471f4b
xor dl, dl
xor bl, bl
mov byte [esp + 0x1b], dl
jmp 0x471f4b
mov dl, 0x10
mov byte [esp + 0x1b], dl
cmp bl, 0x40
jbe 0x471f4b
xor dl, dl
xor bl, bl
mov byte [esp + 0x1b], dl
jmp 0x471f4b
mov dl, byte [esp + 0x1b]
mov ecx, dword [esp + 0x24]
test cl, cl
je 0x471f64
cmp dl, 3
je 0x471f64
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 0x471a80
mov ebx, dword [esp + 0x34]
mov ecx, edi
call fcn.00420770
test al, al
je 0x471fc2
mov eax, dword [edi*4 + 0x551ee0]
test eax, eax
je 0x471fc2
push eax
call fcn.00488d73
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 0x4719a0
xor eax, eax
mov byte [esp + 0x17], 0
xor ebp, ebp
cmp ax, word [esp + 0xba]
jge 0x47229e
mov esi, 0x55120f
mov edi, 0xffff
mov dword [esp + 0x28], esi
mov eax, dword [esp + ebp*4 + 0x578]
test eax, eax
je 0x472286
push 0
push eax
push ebx
call fcn.00489d25
push ebx
push 0x50
lea eax, [esp + 0x5c]
push 1
push eax
call fcn.0048a465
add esp, 0x1c
cmp eax, 0x50
jne 0x472346
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 0x472064
mov byte [esp + 0x17], 1
jmp 0x472286
cmp al, 1
jne 0x472286
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 0x47234d
cmp byte [esp + 0x66], 0
jne 0x47234d
test ebx, ebx
je 0x472282
cmp dword [esp + 0x58], 0
jle 0x472282
lea ecx, [ebp + 1]
call fcn.00420710
test al, al
je 0x472346
mov ecx, dword [ebp*4 + 0x550bc4]
call fcn.00435580
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 0x472115
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 0x472140
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.00432690
mov dl, byte [esp + 0x34]
add esp, 4
test dl, dl
je 0x472180
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.004893b5
add esp, 4
mov dword [esi + 0x20], eax
test eax, eax
jne 0x4721a2
xor cl, cl
jmp 0x4721a7
mov cl, 1
add eax, 0xf
mov dword [esi + 0x1c], eax
test cl, cl
je 0x472346
mov ecx, dword [esi + 0x30]
cmp ecx, 1
jle 0x4721d5
mov eax, dword [esi + 0x2c]
add eax, ecx
cmp eax, dword [esi + 0x28]
jg 0x4721d5
test ecx, ecx
je 0x4721d5
cmp byte [esp + 0x23], 0
je 0x4721e3
or byte [esi + 0x25], 1
jmp 0x4721e3
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
push 0
push ebx
mov ebx, dword [esp + 0x3c]
push ebx
call fcn.00489d25
add esp, 0xc
cmp word [esp + 0xc2], 1
jne 0x472215
push 1
push edi
push ebx
call fcn.00489d25
add esp, 0xc
mov esi, dword [esp + 0x28]
mov edi, 0xffff
jmp 0x472286
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.0048a465
add esp, 0x10
cmp eax, 1
jne 0x471a9b
cmp byte [esp + 0x30], 0
mov edx, dword [esi + 0x28]
mov ecx, dword [esi + 0x1c]
push dword [esp + 0x24]
je 0x472254
call fcn.00435ad0
jmp 0x472259
call fcn.00435840
add esp, 4
cmp byte [esp + 0x24], 0
je 0x47220a
sar dword [esi + 0x28], 1
mov ecx, esi
push dword [esp + 0x30]
mov edx, dword [esi + 0x28]
call fcn.00436f20
mov esi, dword [esp + 0x2c]
add esp, 4
mov edi, 0xffff
jmp 0x472286
mov ebx, dword [esp + 0x34]
movsx eax, word [esp + 0xba]
inc ebp
add esi, 0x17
mov dword [esp + 0x28], esi
cmp ebp, eax
jl 0x472001
movzx ebx, word [esp + 0xbc]
xor edx, edx
xor edi, edi
test ebx, ebx
je 0x4722f7
nop
mov eax, dword [edi*4 + 0x551ee0]
test eax, eax
je 0x4722f2
mov esi, 0x40
xor ecx, ecx
cmp byte [eax], 0
jne 0x4722df
cmp byte [eax + 1], 0
jne 0x4722df
cmp byte [eax + 2], 0
jne 0x4722df
cmp byte [eax + 3], 0
jne 0x4722df
cmp byte [eax + 4], 0
je 0x4722e4
cmp ecx, edx
cmovg edx, ecx
inc ecx
add eax, 5
cmp ecx, 0x20
jl 0x4722c2
sub esi, 1
jne 0x4722c0
inc edi
cmp edi, ebx
jl 0x4722b0
inc dl
cmp byte [esp + 0x17], 0
movsx eax, dl
mov dword [0x551eac], eax
je 0x472316
push str.Warning:_The_module_contains_unsupported_AdLib_instruments_
call dword [0x54e480]
add esp, 4
test byte [0x5524f5], 0x40
jne 0x472339
push 0x4082c0
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 0x472359
push str.Error_loading_.s3m:_Incompatible_module_
jmp 0x472359
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