Function at 0x405770
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.0046b3d5
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.0046b3d5
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 0x405937
cmp edi, 1
jb 0x405937
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.0046b3d5
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 0x405949
cmp eax, 0x64617461
je 0x405bfc
mov dword [esp + 0xd0], 0
lea ecx, [esp + 0xd0]
push ebx
push 4
push 1
push ecx
call fcn.0046b3d5
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 0x405bf6
push 1
push 0x7fffffff
push ebx
add esi, 0x80000001
call fcn.00406d60
add esp, 0xc
cmp esi, 0x7fffffff
jbe 0x405bd4
test eax, eax
je 0x405911
mov eax, 0xffffffff
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x80], 0
lea ecx, [esp + 0x80]
push ebx
push 4
push 1
push ecx
call fcn.0046b3d5
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 0x405937
xor ecx, ecx
mov word [esp + 0x90], cx
lea ecx, [esp + 0x90]
push ebx
push 2
push 1
push ecx
call fcn.0046b3d5
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.0046b3d5
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.0046b3d5
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.0046b3d5
xor ecx, ecx
mov word [esp + 0xf0], cx
lea ecx, [esp + 0xf0]
push ebx
push 2
push 1
push ecx
call fcn.0046b3d5
xor ecx, ecx
mov word [esp + 0x110], cx
lea ecx, [esp + 0x110]
push ebx
push 2
push 1
push ecx
call fcn.0046b3d5
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 0x405ba0
cmp dword [esp + 0x18], 0xfffe
jne 0x405b60
xor ecx, ecx
mov word [esp + 0x20], cx
lea ecx, [esp + 0x20]
push ebx
push 2
push 1
push ecx
call fcn.0046b3d5
xor ecx, ecx
mov word [esp + 0x40], cx
lea ecx, [esp + 0x40]
push ebx
push 2
push 1
push ecx
call fcn.0046b3d5
mov dword [esp + 0x30], 0
lea ecx, [esp + 0x30]
push ebx
push 4
push 1
push ecx
call fcn.0046b3d5
xor ecx, ecx
mov word [esp + 0x70], cx
lea ecx, [esp + 0x70]
push ebx
push 2
push 1
push ecx
call fcn.0046b3d5
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 0x405bb8
cmp esi, 0x7fffffff
jbe 0x405ba4
push 1
push 0x7fffffff
push ebx
add esi, 0x80000001
call fcn.00406d60
add esp, 0xc
cmp esi, 0x7fffffff
jbe 0x405dd8
test eax, eax
je 0x405b68
mov eax, 0xffffffff
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
test esi, esi
jbe 0x405bb8
test esi, esi
jbe 0x405bb8
push 1
push esi
push ebx
call fcn.00406b50
add esp, 0xc
test eax, eax
jne 0x405b8e
inc edi
cmp edi, 0x14
jl 0x40584a
mov eax, 0xffffffff
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x405bec
test eax, eax
jne 0x405937
push 1
push esi
push ebx
call fcn.00406b50
add esp, 0xc
test eax, eax
jne 0x405937
jmp 0x405bb8
test esi, esi
jne 0x405be0
jmp 0x405bb8
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.0046b3d5
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 0x405d75
cmp edi, 0x55
je 0x405d75
cmp edi, 1
je 0x405c79
cmp edi, 3
je 0x405c79
cmp dword [0x4f8e08], 0xa
jl 0x405d87
xor eax, eax
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x405ce6
push dword [esp + 0xc]
push esi
call fcn.00415a70
add esp, 8
cmp eax, 0xffffffff
jne 0x405cab
cmp dword [0x4f8e08], 0xa
jl 0x405d9a
xor eax, eax
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x4f8dfc]
test ecx, ecx
cmove ecx, dword [esp + 4]
mov dword [esp], ecx
push ecx
push esi
call fcn.00415a20
add esp, 8
cmp eax, 0xffffffff
jne 0x405ce6
cmp dword [0x4f8e08], 0xa
jl 0x405db0
xor eax, eax
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esp + 8], 0
jle 0x405d5a
mov ecx, dword [esp + 8]
mov dword [0x4f8d64], ecx
mov dword [0x4f8d6c], 1
cmp edi, 3
jne 0x405d12
mov dword [0x4f8d70], 1
jmp 0x405d1c
mov dword [0x4f8d70], 0
cmp ebx, 0xffffffff
jne 0x405d2b
push 0xffffffffffffffff
push esi
call fcn.004159d0
jmp 0x405d45
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.004159d0
add esp, 8
mov eax, 1
add esp, 0x104
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [0x4f8e08], 0xa
jl 0x405dc5
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 0x405c6a
push dword [esp + 0xc]
push str.Unsupported_number_of_channels:__d_n
call fcn.004023b0
add esp, 8
jmp 0x405c9c
push dword [esp]
push str.Unsupported_sample_rate:__d_n
call fcn.004023b0
add esp, 8
jmp 0x405cd7
push dword [esp + 8]
push str.Unsupported_bits_per_sample:__d_n
call fcn.004023b0
add esp, 8
jmp 0x405d63
test esi, esi
je 0x405bb4
test eax, eax
je 0x405ba8
jmp 0x405b8e