Function at 0x4056e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push esi
push edi
push ebx
sub esp, 0x104
mov ebx, edx
mov dword [esp + 0xf0], 0
mov esi, eax
lea eax, [esp + 0xf0]
push ebx
push 4
push 1
push eax
call fcn.0049c145
movzx edi, byte [esp + 0x100]
movzx eax, byte [esp + 0x101]
shl edi, 0x18
shl eax, 0x10
movzx edx, byte [esp + 0x102]
or edi, eax
shl edx, 8
or edi, edx
movzx ecx, byte [esp + 0x103]
or edi, ecx
mov dword [esp + 0x110], 0
lea eax, [esp + 0x110]
push ebx
push 4
push 1
push eax
call fcn.0049c145
add esp, 0x20
movzx eax, byte [esp + 0x100]
movzx edx, byte [esp + 0x101]
shl eax, 0x18
shl edx, 0x10
movzx ecx, byte [esp + 0x102]
or eax, edx
shl ecx, 8
or eax, ecx
movzx edx, byte [esp + 0x103]
or eax, edx
cmp eax, 0x57415645
jne 0x4058a7
cmp edi, 1
jb 0x4058a7
xor eax, eax
xor edi, edi
mov dword [esp + 4], eax
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], esi
mov dword [esp + 0xe0], 0
push ebx
push 4
push 1
lea ecx, [esp + 0xec]
push ecx
call fcn.0049c145
add esp, 0x10
movzx eax, byte [esp + 0xe0]
movzx ecx, byte [esp + 0xe1]
shl eax, 0x18
shl ecx, 0x10
movzx esi, byte [esp + 0xe2]
or eax, ecx
shl esi, 8
or eax, esi
movzx ecx, byte [esp + 0xe3]
or eax, ecx
cmp eax, 0x666d7420
je 0x4058b9
cmp eax, 0x64617461
je 0x405b6c
mov dword [esp + 0xd0], 0
lea ecx, [esp + 0xd0]
push ebx
push 4
push 1
push ecx
call fcn.0049c145
add esp, 0x10
movzx esi, byte [esp + 0xd3]
movzx ecx, byte [esp + 0xd2]
shl esi, 0x18
shl ecx, 0x10
or esi, ecx
movzx ecx, byte [esp + 0xd1]
shl ecx, 8
or esi, ecx
movzx ecx, byte [esp + 0xd0]
or esi, ecx
mov ecx, esi
and ecx, 1
add esi, ecx
cmp esi, 0x7fffffff
jbe 0x405b66
push 1
push 0x7fffffff
push ebx
add esi, 0x80000001
call fcn.00406cd0
add esp, 0xc
cmp esi, 0x7fffffff
jbe 0x405b44
test eax, eax
je 0x405881
mov eax, 0xffffffff
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
mov dword [esp + 0x80], 0
lea ecx, [esp + 0x80]
push ebx
push 4
push 1
push ecx
call fcn.0049c145
add esp, 0x10
movzx esi, byte [esp + 0x83]
movzx ecx, byte [esp + 0x82]
shl esi, 0x18
shl ecx, 0x10
or esi, ecx
movzx ecx, byte [esp + 0x81]
shl ecx, 8
or esi, ecx
movzx ecx, byte [esp + 0x80]
or esi, ecx
mov ecx, esi
and ecx, 1
mov dword [esp], ecx
add ecx, esi
cmp ecx, 0x10
jb 0x4058a7
xor ecx, ecx
mov word [esp + 0x90], cx
lea ecx, [esp + 0x90]
push ebx
push 2
push 1
push ecx
call fcn.0049c145
movzx eax, byte [esp + 0xa1]
shl eax, 8
movzx ecx, byte [esp + 0xa0]
or eax, ecx
mov dword [esp + 0x28], eax
xor ecx, ecx
mov word [esp + 0xb0], cx
lea ecx, [esp + 0xb0]
push ebx
push 2
push 1
push ecx
call fcn.0049c145
movzx eax, byte [esp + 0xc1]
shl eax, 8
movzx ecx, byte [esp + 0xc0]
or eax, ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x80], 0
lea ecx, [esp + 0x80]
push ebx
push 4
push 1
push ecx
call fcn.0049c145
movzx eax, byte [esp + 0x93]
movzx ecx, byte [esp + 0x92]
shl eax, 0x18
shl ecx, 0x10
or eax, ecx
movzx ecx, byte [esp + 0x91]
shl ecx, 8
or eax, ecx
movzx ecx, byte [esp + 0x90]
or eax, ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0xa0], 0
lea ecx, [esp + 0xa0]
push ebx
push 4
push 1
push ecx
call fcn.0049c145
xor ecx, ecx
mov word [esp + 0xf0], cx
lea ecx, [esp + 0xf0]
push ebx
push 2
push 1
push ecx
call fcn.0049c145
xor ecx, ecx
mov word [esp + 0x110], cx
lea ecx, [esp + 0x110]
push ebx
push 2
push 1
push ecx
call fcn.0049c145
add esp, 0x60
movzx eax, byte [esp + 0xc1]
shl eax, 8
movzx ecx, byte [esp + 0xc0]
or eax, ecx
mov ecx, dword [esp]
mov dword [esp + 8], eax
lea esi, [esi + ecx - 0x10]
cmp esi, 9
jbe 0x405b10
cmp dword [esp + 0x18], 0xfffe
jne 0x405ad0
xor ecx, ecx
mov word [esp + 0x20], cx
lea ecx, [esp + 0x20]
push ebx
push 2
push 1
push ecx
call fcn.0049c145
xor ecx, ecx
mov word [esp + 0x40], cx
lea ecx, [esp + 0x40]
push ebx
push 2
push 1
push ecx
call fcn.0049c145
mov dword [esp + 0x30], 0
lea ecx, [esp + 0x30]
push ebx
push 4
push 1
push ecx
call fcn.0049c145
xor ecx, ecx
mov word [esp + 0x70], cx
lea ecx, [esp + 0x70]
push ebx
push 2
push 1
push ecx
call fcn.0049c145
add esp, 0x40
movzx eax, byte [esp + 0x41]
shl eax, 8
movzx ecx, byte [esp + 0x40]
or eax, ecx
mov dword [esp + 0x18], eax
add esi, 0xfffffff6
je 0x405b28
cmp esi, 0x7fffffff
jbe 0x405b14
push 1
push 0x7fffffff
push ebx
add esi, 0x80000001
call fcn.00406cd0
add esp, 0xc
cmp esi, 0x7fffffff
jbe 0x405d48
test eax, eax
je 0x405ad8
mov eax, 0xffffffff
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
test esi, esi
jbe 0x405b28
test esi, esi
jbe 0x405b28
push 1
push esi
push ebx
call fcn.00406ac0
add esp, 0xc
test eax, eax
jne 0x405afe
inc edi
cmp edi, 0x14
jl 0x4057ba
mov eax, 0xffffffff
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x405b5c
test eax, eax
jne 0x4058a7
push 1
push esi
push ebx
call fcn.00406ac0
add esp, 0xc
test eax, eax
jne 0x4058a7
jmp 0x405b28
test esi, esi
jne 0x405b50
jmp 0x405b28
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
mov dword [esp + 0x50], 0
lea ecx, [esp + 0x50]
push ebx
push 4
push 1
push ecx
call fcn.0049c145
add esp, 0x10
movzx ebx, byte [esp + 0x53]
movzx ecx, byte [esp + 0x52]
shl ebx, 0x18
shl ecx, 0x10
or ebx, ecx
movzx ecx, byte [esp + 0x51]
shl ecx, 8
or ebx, ecx
movzx ecx, byte [esp + 0x50]
or ebx, ecx
cmp edi, 0x50
je 0x405ce5
cmp edi, 0x55
je 0x405ce5
cmp edi, 1
je 0x405be9
cmp edi, 3
je 0x405be9
cmp dword [0x52ef48], 0xa
jl 0x405cf7
xor eax, eax
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x405c56
push dword [esp + 0xc]
push esi
call fcn.004156c0
add esp, 8
cmp eax, 0xffffffff
jne 0x405c1b
cmp dword [0x52ef48], 0xa
jl 0x405d0a
xor eax, eax
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x52ef3c]
test ecx, ecx
cmove ecx, dword [esp + 4]
mov dword [esp], ecx
push ecx
push esi
call fcn.00415670
add esp, 8
cmp eax, 0xffffffff
jne 0x405c56
cmp dword [0x52ef48], 0xa
jl 0x405d20
xor eax, eax
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esp + 8], 0
jle 0x405cca
mov ecx, dword [esp + 8]
mov dword [0x52eea4], ecx
mov dword [0x52eeac], 1
cmp edi, 3
jne 0x405c82
mov dword [0x52eeb0], 1
jmp 0x405c8c
mov dword [0x52eeb0], 0
cmp ebx, 0xffffffff
jne 0x405c9b
push 0xffffffffffffffff
push esi
call fcn.00415620
jmp 0x405cb5
mov eax, ebx
add ecx, 7
xor edx, edx
shr ecx, 3
mov edi, dword [esp + 0xc]
imul edi, ecx
div edi
push eax
push esi
call fcn.00415620
add esp, 8
mov eax, 1
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [0x52ef48], 0xa
jl 0x405d35
mov eax, 0xffffffff
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 7
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push edi
push str.Unsupported_data_format:_0x_04X_n
call fcn.004023b0
add esp, 8
jmp 0x405bda
push dword [esp + 0xc]
push str.Unsupported_number_of_channels:__d_n
call fcn.004023b0
add esp, 8
jmp 0x405c0c
push dword [esp]
push str.Unsupported_sample_rate:__d_n
call fcn.004023b0
add esp, 8
jmp 0x405c47
push dword [esp + 8]
push str.Unsupported_bits_per_sample:__d_n
call fcn.004023b0
add esp, 8
jmp 0x405cd3
test esi, esi
je 0x405b24
test eax, eax
je 0x405b18
jmp 0x405afe