Function at 0x405df0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push esi
push edi
push ebx
sub esp, 0x134
mov esi, edx
mov ecx, dword [0x4f6e34]
pxor xmm0, xmm0
xor ecx, esp
mov ebx, eax
mov dword [esp + 0x128], ecx
movdqu xmmword [esp + 0x100], xmm0
movdqu xmmword [esp + 0x110], xmm0
movq qword [esp + 0x120], xmm0
mov dword [esp + 0x11c], 0x4e4f4e45
mov dword [esp + 0xc0], 0
lea eax, [esp + 0xc0]
push esi
push 4
push 1
push eax
call fcn.0046b3d5
movzx edi, byte [esp + 0xd0]
movzx eax, byte [esp + 0xd1]
shl edi, 0x18
shl eax, 0x10
movzx edx, byte [esp + 0xd2]
or edi, eax
shl edx, 8
or edi, edx
movzx ecx, byte [esp + 0xd3]
or edi, ecx
mov dword [esp + 0xe0], 0
lea eax, [esp + 0xe0]
push esi
push 4
push 1
push eax
call fcn.0046b3d5
add esp, 0x20
movzx ecx, byte [esp + 0xd0]
add edi, 0xfffffffc
movzx eax, byte [esp + 0xd1]
shl ecx, 0x18
shl eax, 0x10
movzx edx, byte [esp + 0xd2]
or ecx, eax
shl edx, 8
or ecx, edx
movzx eax, byte [esp + 0xd3]
or ecx, eax
cmp ecx, 0x41494646
je 0x405f1c
cmp ecx, 0x41494643
je 0x405f1c
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
mov eax, 0xffffffff
add esp, 0x134
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
xor edx, edx
mov dword [esp + 0x5c], 0xffffffff
xor eax, eax
cmp edi, 8
jb 0x40662e
mov dword [esp + 0x58], edx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x4c], ebx
mov ebx, edi
mov edi, eax
mov dword [esp + 0xe0], 0
push esi
push 4
push 1
lea edx, [esp + 0xec]
push edx
call fcn.0046b3d5
add esp, 0x10
movzx eax, byte [esp + 0xe0]
movzx edx, byte [esp + 0xe1]
shl eax, 0x18
shl edx, 0x10
movzx ecx, byte [esp + 0xe2]
or eax, edx
shl ecx, 8
or eax, ecx
movzx edx, byte [esp + 0xe3]
or eax, edx
cmp eax, 0x434f4d4d
je 0x406213
cmp eax, 0x53534e44
jne 0x406146
mov dword [esp + 0xa0], 0
lea eax, [esp + 0xa0]
push esi
push 4
push 1
push eax
call fcn.0046b3d5
add esp, 0x10
movzx edi, byte [esp + 0xa0]
add ebx, 0xfffffff8
movzx eax, byte [esp + 0xa1]
shl edi, 0x18
shl eax, 0x10
movzx edx, byte [esp + 0xa2]
or edi, eax
shl edx, 8
or edi, edx
movzx ecx, byte [esp + 0xa3]
or edi, ecx
mov eax, edi
and eax, 1
mov dword [esp + 0x48], eax
add eax, edi
cmp eax, 8
jb 0x406a41
cmp ebx, eax
jb 0x406a41
mov dword [esp + 0x118], 0x53534e44
sub ebx, eax
mov dword [esp + 0x60], 0
lea eax, [esp + 0x60]
push esi
push 4
push 1
push eax
call fcn.0046b3d5
movzx eax, byte [esp + 0x70]
movzx edx, byte [esp + 0x71]
shl eax, 0x18
shl edx, 0x10
movzx ecx, byte [esp + 0x72]
or eax, edx
shl ecx, 8
or eax, ecx
movzx edx, byte [esp + 0x73]
or eax, edx
mov dword [esp + 0x130], eax
mov dword [esp + 0x80], 0
lea eax, [esp + 0x80]
push esi
push 4
push 1
push eax
call fcn.0046b3d5
add esp, 0x20
movzx eax, byte [esp + 0x70]
movzx edx, byte [esp + 0x71]
shl eax, 0x18
shl edx, 0x10
movzx ecx, byte [esp + 0x72]
or eax, edx
shl ecx, 8
or eax, ecx
movzx edx, byte [esp + 0x73]
or eax, edx
mov dword [esp + 0x124], eax
mov eax, dword [esp + 0x48]
cmp dword [esp + 0x58], 0
lea edi, [edi + eax - 8]
jg 0x40699c
push esi
call fcn.0046bd18
mov dword [esp + 0x60], eax
add esp, 4
mov eax, dword [esp + 0x120]
mov edx, dword [esp + 0x5c]
add eax, edx
test edx, edx
cmovge edx, eax
mov dword [esp + 0x5c], edx
cmp edi, 0x7fffffff
jbe 0x40698f
push 1
push 0x7fffffff
push esi
add edi, 0x80000001
call fcn.00406d60
add esp, 0xc
cmp edi, 0x7fffffff
jbe 0x4065a0
test eax, eax
je 0x4060ee
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
mov eax, 0xffffffff
add esp, 0x134
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esp + 0xb0], 0
lea edx, [esp + 0xb0]
push esi
push 4
push 1
push edx
call fcn.0046b3d5
add esp, 0x10
movzx edx, byte [esp + 0xb0]
add ebx, 0xfffffff8
movzx ecx, byte [esp + 0xb1]
shl edx, 0x18
shl ecx, 0x10
or edx, ecx
movzx ecx, byte [esp + 0xb2]
shl ecx, 8
or edx, ecx
movzx ecx, byte [esp + 0xb3]
or edx, ecx
mov ecx, edx
and ecx, 1
add edx, ecx
cmp ebx, edx
jb 0x406a9a
sub ebx, edx
cmp edx, 0x7fffffff
jbe 0x406a91
mov dword [esp + 0x44], ebx
mov ebx, edx
push 1
push 0x7fffffff
push esi
add ebx, 0x80000001
call fcn.00406d60
add esp, 0xc
cmp ebx, 0x7fffffff
jbe 0x406a66
test eax, eax
je 0x4061bb
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
mov eax, 0xffffffff
add esp, 0x134
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x50], 0
lea edx, [esp + 0x50]
push esi
push 4
push 1
push edx
call fcn.0046b3d5
add esp, 0x10
movzx eax, byte [esp + 0x50]
add ebx, 0xfffffff8
movzx edx, byte [esp + 0x51]
shl eax, 0x18
shl edx, 0x10
movzx ecx, byte [esp + 0x52]
or eax, edx
shl ecx, 8
or eax, ecx
movzx edx, byte [esp + 0x53]
or eax, edx
mov ecx, eax
and ecx, 1
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ecx
lea edx, [eax + ecx]
cmp edx, 0x12
jb 0x406b23
cmp ebx, edx
jb 0x406b23
sub ebx, edx
lea edx, [edi + 1]
mov dword [esp + 0x58], edx
xor ecx, ecx
mov word [esp + 0x80], cx
lea edx, [esp + 0x80]
push esi
push 2
push 1
push edx
call fcn.0046b3d5
movzx ecx, byte [esp + 0x90]
shl ecx, 8
movzx edx, byte [esp + 0x91]
or ecx, edx
mov word [esp + 0x110], cx
mov dword [esp + 0x50], 0
lea edx, [esp + 0x50]
push esi
push 4
push 1
push edx
call fcn.0046b3d5
movzx eax, byte [esp + 0x60]
movzx edx, byte [esp + 0x61]
shl eax, 0x18
shl edx, 0x10
movzx ecx, byte [esp + 0x62]
or eax, edx
shl ecx, 8
or eax, ecx
xor ecx, ecx
movzx edx, byte [esp + 0x63]
or eax, edx
mov dword [esp + 0x124], eax
mov word [esp + 0xb0], cx
lea edx, [esp + 0xb0]
push esi
push 2
push 1
push edx
call fcn.0046b3d5
movzx ecx, byte [esp + 0xc0]
shl ecx, 8
pxor xmm0, xmm0
movzx edx, byte [esp + 0xc1]
or ecx, edx
mov word [esp + 0x138], cx
xor edx, edx
movq qword [esp + 0x120], xmm0
mov word [esp + 0x128], dx
lea edx, [esp + 0x120]
push esi
push 0xa
push 1
push edx
call fcn.0046b3d5
add esp, 0x40
movzx edx, byte [esp + 0xf2]
movzx eax, byte [esp + 0xf3]
shl edx, 0x18
shl eax, 0x10
or edx, eax
movzx eax, byte [esp + 0xf4]
shl eax, 8
or edx, eax
movzx eax, byte [esp + 0xf5]
or edx, eax
mov dword [esp + 0x34], edx
movzx eax, byte [esp + 0xf6]
movzx edx, byte [esp + 0xf7]
shl eax, 0x18
shl edx, 0x10
movzx ecx, byte [esp + 0xf0]
or eax, edx
movzx edx, byte [esp + 0xf8]
shl edx, 8
mov dword [esp + 0x24], ecx
and ecx, 0x7f
or eax, edx
shl ecx, 8
movzx edx, byte [esp + 0xf9]
or eax, edx
movzx edx, byte [esp + 0xf1]
or ecx, edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x34]
jne 0x4063fc
test ecx, ecx
jne 0x40640a
cmp dword [esp + 0x28], 0
jne 0x40640a
pxor xmm1, xmm1
jmp 0x406498
cmp dword [esp + 0x2c], 0x7fff
je 0x406490
add ecx, 0x80000000
pxor xmm0, xmm0
cvtsi2sd xmm0, ecx
mov edx, dword [esp + 0x2c]
addsd xmm0, qword [0x483490]
movsd qword [esp], xmm0
lea edx, [edx - 0x401e]
mov dword [esp + 8], edx
call fcn.00445ea0
mov edx, dword [esp + 0x28]
pxor xmm0, xmm0
add edx, 0x80000000
cvtsi2sd xmm0, edx
fstp qword [esp + 0x18]
movsd xmm1, qword [esp + 0x18]
addsd xmm0, qword [0x483490]
movsd qword [esp], xmm0
mov ecx, dword [esp + 0x2c]
add ecx, 0xffffbfc2
mov dword [esp + 8], ecx
movsd qword [esp + 0x10], xmm1
call fcn.00445ea0
fstp qword [esp + 0x18]
movsd xmm1, qword [esp + 0x10]
movsd xmm0, qword [esp + 0x18]
addsd xmm1, xmm0
jmp 0x406498
movsd xmm1, qword [0x483488]
mov ecx, dword [esp + 0x38]
movaps xmm0, xmm1
mov edx, dword [esp + 0x3c]
test dword [esp + 0x24], 0x80
xorps xmm0, xmmword [0x483430]
jne 0x4064b7
movaps xmm0, xmm1
cmp dword [esp + 0x54], 0x41494643
lea edx, [edx + ecx - 0x12]
mov dword [esp + 0x30], edx
jne 0x406528
cmp dword [esp + 0x30], 4
jb 0x406abf
movsd qword [esp + 0x110], xmm0
mov dword [esp + 0x20], 0
lea edx, [esp + 0x20]
push esi
push 4
push 1
push edx
call fcn.0046b3d5
add esp, 0x10
movzx eax, byte [esp + 0x20]
movzx edx, byte [esp + 0x21]
shl eax, 0x18
shl edx, 0x10
movzx ecx, byte [esp + 0x22]
or eax, edx
shl ecx, 8
or eax, ecx
movzx edx, byte [esp + 0x23]
or eax, edx
add dword [esp + 0x30], 0xfffffffc
mov dword [esp + 0x11c], eax
jmp 0x406531
movsd qword [esp + 0x110], xmm0
cmp dword [esp + 0x30], 0x7fffffff
jbe 0x406b17
mov dword [esp + 0x44], ebx
mov ebx, dword [esp + 0x30]
push 1
push 0x7fffffff
push esi
add ebx, 0x80000001
call fcn.00406d60
add esp, 0xc
cmp ebx, 0x7fffffff
jbe 0x406ae4
test eax, eax
je 0x406547
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
mov eax, 0xffffffff
add esp, 0x134
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
call fcn.00466f40
test edi, edi
je 0x4065b8
test eax, eax
jne 0x406114
push 1
push edi
push esi
call fcn.00406b50
add esp, 0xc
test eax, eax
jne 0x406114
mov edi, 1
cmp ebx, 8
jae 0x405f41
mov edx, dword [esp + 0x58]
mov eax, edi
mov ebx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x11c]
cmp ecx, 0x736f7774
jne 0x4065ff
mov ecx, dword [0x4f8df4]
mov dword [0x4f8d70], 0
mov dword [0x4f8d68], ecx
jmp 0x40666c
cmp ecx, 0x74776f73
jne 0x406626
mov dword [0x4f8d70], 0
cmp dword [0x4f8df4], 0
jne 0x406662
mov dword [0x4f8d68], 1
jmp 0x40666c
cmp ecx, 0x4e4f4e45
jne 0x406643
mov dword [0x4f8d70], 0
cmp dword [0x4f8df4], 0
je 0x40661a
jmp 0x406662
cmp ecx, 0x666c3332
jne 0x40674d
mov dword [0x4f8d70], 1
cmp dword [0x4f8df4], 0
je 0x40661a
mov dword [0x4f8d68], 0
test edx, edx
je 0x40671b
test eax, eax
jle 0x40697c
cmp dword [esp + 0x118], 0x53534e44
je 0x406698
cmp dword [0x4f8e08], 0xa
jl 0x40677f
jmp 0x4066ec
movsx ecx, word [esp + 0x108]
add ecx, 0xfffffff8
cmp ecx, 0x20
jae 0x4066df
mov eax, 1
shl eax, cl
test eax, 0x1010101
je 0x4066df
movsx edi, word [esp + 0x100]
cmp edi, 1
je 0x4067a3
cmp edi, 2
je 0x4067a3
cmp dword [0x4f8e08], 0xa
jl 0x406791
jmp 0x4066ec
cmp dword [0x4f8e08], 0xa
jl 0x40696a
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
xor eax, eax
add esp, 0x134
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
mov eax, 0xffffffff
add esp, 0x134
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
mov eax, 0xffffffff
add esp, 0x134
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str.ERROR:_input_sound_data_is_not_PCM_n
call fcn.004023b0
add esp, 4
jmp 0x4066ec
push str.ERROR:_input_sound_data_is_not_mono_or_stereo_n
call fcn.004023b0
add esp, 4
jmp 0x4066ec
cmp dword [esp + 0x124], 0
je 0x4067bf
cmp dword [0x4f8e08], 0xa
jl 0x406920
jmp 0x4066ec
test ebx, ebx
je 0x406871
push edi
push ebx
call fcn.00415a70
add esp, 8
cmp eax, 0xffffffff
jne 0x406812
cmp dword [0x4f8e08], 0xa
jl 0x406932
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
xor eax, eax
add esp, 0x134
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [0x4f8dfc]
test edi, edi
cvttsd2si eax, qword [esp + 0x110]
cmove edi, eax
push edi
push ebx
call fcn.00415a20
add esp, 8
cmp eax, 0xffffffff
jne 0x406871
cmp dword [0x4f8e08], 0xa
jl 0x406945
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
xor eax, eax
add esp, 0x134
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push dword [esp + 0x104]
push ebx
call fcn.004159d0
add esp, 8
movsx eax, word [esp + 0x108]
mov dword [0x4f8d64], eax
mov dword [0x4f8d6c], 0
cmp dword [esp + 0x5c], 0
jl 0x4068ee
push 0
push dword [esp + 0x60]
push esi
call fcn.0046bfdd
add esp, 0xc
test eax, eax
je 0x4068ee
cmp dword [0x4f8e08], 0xa
jl 0x406958
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
xor eax, eax
add esp, 0x134
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
mov eax, 1
add esp, 0x134
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str.ERROR:_block_size_of_input_sound_data_is_not_0_bytes_n
call fcn.004023b0
add esp, 4
jmp 0x4066ec
push edi
push str.Unsupported_number_of_channels:__d_n
call fcn.004023b0
add esp, 8
jmp 0x4067e3
push edi
push str.Unsupported_sample_rate:__d_n
call fcn.004023b0
add esp, 8
jmp 0x406842
push str.Cant_rewind_stream_to_audio_data_position_n
call fcn.004023b0
add esp, 4
jmp 0x4068bf
push str.ERROR:_input_sound_data_is_not_8__16__24_or_32_bits_n
call fcn.004023b0
add esp, 4
jmp 0x4066ec
cmp dword [esp + 0x104], 0
jne 0x40671b
jmp 0x40667c
test edi, edi
ja 0x4065ac
jmp 0x4065c0
mov edi, dword [esp + 0x120]
mov edx, dword [esp + 0x58]
mov ebx, dword [esp + 0x4c]
cmp edi, 0x7fffffff
jbe 0x406a3b
mov dword [esp + 0x4c], ebx
mov ebx, edx
push 1
push 0x7fffffff
push esi
add edi, 0x80000001
call fcn.00406d60
add esp, 0xc
cmp edi, 0x7fffffff
jbe 0x406a04
test eax, eax
je 0x4069bd
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
jmp 0x405f0a
mov edx, ebx
mov ebx, dword [esp + 0x4c]
test edi, edi
je 0x406a26
test eax, eax
jne 0x4069df
push 1
push edi
push esi
mov dword [esp + 0x64], edx
call fcn.00406b50
mov edx, dword [esp + 0x64]
add esp, 0xc
test eax, eax
jne 0x4069df
mov ecx, dword [esp + 0x11c]
mov eax, 1
jmp 0x4065df
test edi, edi
ja 0x406a12
jmp 0x406a2a
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
jmp 0x405f0a
mov edx, ebx
mov ebx, dword [esp + 0x44]
test edx, edx
je 0x406a84
test eax, eax
jne 0x4061e1
push 1
push edx
push esi
call fcn.00406b50
add esp, 0xc
test eax, eax
jne 0x4061e1
jmp 0x4065c5
test edx, edx
jne 0x406a78
jmp 0x4065c5
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
jmp 0x405f0a
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
jmp 0x405f0a
mov dword [esp + 0x30], ebx
mov ebx, dword [esp + 0x44]
cmp dword [esp + 0x30], 0
je 0x406b0a
test eax, eax
jne 0x40656d
push 1
push dword [esp + 0x34]
push esi
call fcn.00406b50
add esp, 0xc
test eax, eax
jne 0x40656d
jmp 0x4065c5
cmp dword [esp + 0x30], 0
ja 0x406afb
jmp 0x4065c5
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x4f6e34]
jne 0x40659b
jmp 0x405f0a