Function at 0x405d60
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 [0x52cfb4]
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.0049c145
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.0049c145
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 0x405e8c
cmp ecx, 0x41494643
je 0x405e8c
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x52cfb4]
jne 0x40650b
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 0x40659e
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.0049c145
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 0x406183
cmp eax, 0x53534e44
jne 0x4060b6
mov dword [esp + 0xa0], 0
lea eax, [esp + 0xa0]
push esi
push 4
push 1
push eax
call fcn.0049c145
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 0x4069b1
cmp ebx, eax
jb 0x4069b1
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.0049c145
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.0049c145
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 0x40690c
push esi
call fcn.0049ca5d
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 0x4068ff
push 1
push 0x7fffffff
push esi
add edi, 0x80000001
call fcn.00406cd0
add esp, 0xc
cmp edi, 0x7fffffff
jbe 0x406510
test eax, eax
je 0x40605e
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x52cfb4]
jne 0x40650b
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.0049c145
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 0x406a0a
sub ebx, edx
cmp edx, 0x7fffffff
jbe 0x406a01
mov dword [esp + 0x44], ebx
mov ebx, edx
push 1
push 0x7fffffff
push esi
add ebx, 0x80000001
call fcn.00406cd0
add esp, 0xc
cmp ebx, 0x7fffffff
jbe 0x4069d6
test eax, eax
je 0x40612b
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x52cfb4]
jne 0x40650b
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.0049c145
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 0x406a93
cmp ebx, edx
jb 0x406a93
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.0049c145
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.0049c145
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.0049c145
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.0049c145
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 0x40636c
test ecx, ecx
jne 0x40637a
cmp dword [esp + 0x28], 0
jne 0x40637a
pxor xmm1, xmm1
jmp 0x406408
cmp dword [esp + 0x2c], 0x7fff
je 0x406400
add ecx, 0x80000000
pxor xmm0, xmm0
cvtsi2sd xmm0, ecx
mov edx, dword [esp + 0x2c]
addsd xmm0, qword [0x4b44d0]
movsd qword [esp], xmm0
lea edx, [edx - 0x401e]
mov dword [esp + 8], edx
call fcn.00486480
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 [0x4b44d0]
movsd qword [esp], xmm0
mov ecx, dword [esp + 0x2c]
add ecx, 0xffffbfc2
mov dword [esp + 8], ecx
movsd qword [esp + 0x10], xmm1
call fcn.00486480
fstp qword [esp + 0x18]
movsd xmm1, qword [esp + 0x10]
movsd xmm0, qword [esp + 0x18]
addsd xmm1, xmm0
jmp 0x406408
movsd xmm1, qword [0x4b44c8]
mov ecx, dword [esp + 0x38]
movaps xmm0, xmm1
mov edx, dword [esp + 0x3c]
test dword [esp + 0x24], 0x80
xorps xmm0, xmmword [0x4b4470]
jne 0x406427
movaps xmm0, xmm1
cmp dword [esp + 0x54], 0x41494643
lea edx, [edx + ecx - 0x12]
mov dword [esp + 0x30], edx
jne 0x406498
cmp dword [esp + 0x30], 4
jb 0x406a2f
movsd qword [esp + 0x110], xmm0
mov dword [esp + 0x20], 0
lea edx, [esp + 0x20]
push esi
push 4
push 1
push edx
call fcn.0049c145
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 0x4064a1
movsd qword [esp + 0x110], xmm0
cmp dword [esp + 0x30], 0x7fffffff
jbe 0x406a87
mov dword [esp + 0x44], ebx
mov ebx, dword [esp + 0x30]
push 1
push 0x7fffffff
push esi
add ebx, 0x80000001
call fcn.00406cd0
add esp, 0xc
cmp ebx, 0x7fffffff
jbe 0x406a54
test eax, eax
je 0x4064b7
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x52cfb4]
jne 0x40650b
mov eax, 0xffffffff
add esp, 0x134
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
call fcn.00497ce0
test edi, edi
je 0x406528
test eax, eax
jne 0x406084
push 1
push edi
push esi
call fcn.00406ac0
add esp, 0xc
test eax, eax
jne 0x406084
mov edi, 1
cmp ebx, 8
jae 0x405eb1
mov edx, dword [esp + 0x58]
mov eax, edi
mov ebx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x11c]
cmp ecx, 0x736f7774
jne 0x40656f
mov ecx, dword [0x52ef34]
mov dword [0x52eeb0], 0
mov dword [0x52eea8], ecx
jmp 0x4065dc
cmp ecx, 0x74776f73
jne 0x406596
mov dword [0x52eeb0], 0
cmp dword [0x52ef34], 0
jne 0x4065d2
mov dword [0x52eea8], 1
jmp 0x4065dc
cmp ecx, 0x4e4f4e45
jne 0x4065b3
mov dword [0x52eeb0], 0
cmp dword [0x52ef34], 0
je 0x40658a
jmp 0x4065d2
cmp ecx, 0x666c3332
jne 0x4066bd
mov dword [0x52eeb0], 1
cmp dword [0x52ef34], 0
je 0x40658a
mov dword [0x52eea8], 0
test edx, edx
je 0x40668b
test eax, eax
jle 0x4068ec
cmp dword [esp + 0x118], 0x53534e44
je 0x406608
cmp dword [0x52ef48], 0xa
jl 0x4066ef
jmp 0x40665c
movsx ecx, word [esp + 0x108]
add ecx, 0xfffffff8
cmp ecx, 0x20
jae 0x40664f
mov eax, 1
shl eax, cl
test eax, 0x1010101
je 0x40664f
movsx edi, word [esp + 0x100]
cmp edi, 1
je 0x406713
cmp edi, 2
je 0x406713
cmp dword [0x52ef48], 0xa
jl 0x406701
jmp 0x40665c
cmp dword [0x52ef48], 0xa
jl 0x4068da
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x52cfb4]
jne 0x40650b
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 [0x52cfb4]
jne 0x40650b
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 [0x52cfb4]
jne 0x40650b
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 0x40665c
push str.ERROR:_input_sound_data_is_not_mono_or_stereo_n
call fcn.004023b0
add esp, 4
jmp 0x40665c
cmp dword [esp + 0x124], 0
je 0x40672f
cmp dword [0x52ef48], 0xa
jl 0x406890
jmp 0x40665c
test ebx, ebx
je 0x4067e1
push edi
push ebx
call fcn.004156c0
add esp, 8
cmp eax, 0xffffffff
jne 0x406782
cmp dword [0x52ef48], 0xa
jl 0x4068a2
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x52cfb4]
jne 0x40650b
xor eax, eax
add esp, 0x134
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [0x52ef3c]
test edi, edi
cvttsd2si eax, qword [esp + 0x110]
cmove edi, eax
push edi
push ebx
call fcn.00415670
add esp, 8
cmp eax, 0xffffffff
jne 0x4067e1
cmp dword [0x52ef48], 0xa
jl 0x4068b5
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x52cfb4]
jne 0x40650b
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.00415620
add esp, 8
movsx eax, word [esp + 0x108]
mov dword [0x52eea4], eax
mov dword [0x52eeac], 0
cmp dword [esp + 0x5c], 0
jl 0x40685e
push 0
push dword [esp + 0x60]
push esi
call fcn.0049cd22
add esp, 0xc
test eax, eax
je 0x40685e
cmp dword [0x52ef48], 0xa
jl 0x4068c8
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x52cfb4]
jne 0x40650b
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 [0x52cfb4]
jne 0x40650b
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 0x40665c
push edi
push str.Unsupported_number_of_channels:__d_n
call fcn.004023b0
add esp, 8
jmp 0x406753
push edi
push str.Unsupported_sample_rate:__d_n
call fcn.004023b0
add esp, 8
jmp 0x4067b2
push str.Cant_rewind_stream_to_audio_data_position_n
call fcn.004023b0
add esp, 4
jmp 0x40682f
push str.ERROR:_input_sound_data_is_not_8__16__24_or_32_bits_n
call fcn.004023b0
add esp, 4
jmp 0x40665c
cmp dword [esp + 0x104], 0
jne 0x40668b
jmp 0x4065ec
test edi, edi
ja 0x40651c
jmp 0x406530
mov edi, dword [esp + 0x120]
mov edx, dword [esp + 0x58]
mov ebx, dword [esp + 0x4c]
cmp edi, 0x7fffffff
jbe 0x4069ab
mov dword [esp + 0x4c], ebx
mov ebx, edx
push 1
push 0x7fffffff
push esi
add edi, 0x80000001
call fcn.00406cd0
add esp, 0xc
cmp edi, 0x7fffffff
jbe 0x406974
test eax, eax
je 0x40692d
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x52cfb4]
jne 0x40650b
jmp 0x405e7a
mov edx, ebx
mov ebx, dword [esp + 0x4c]
test edi, edi
je 0x406996
test eax, eax
jne 0x40694f
push 1
push edi
push esi
mov dword [esp + 0x64], edx
call fcn.00406ac0
mov edx, dword [esp + 0x64]
add esp, 0xc
test eax, eax
jne 0x40694f
mov ecx, dword [esp + 0x11c]
mov eax, 1
jmp 0x40654f
test edi, edi
ja 0x406982
jmp 0x40699a
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x52cfb4]
jne 0x40650b
jmp 0x405e7a
mov edx, ebx
mov ebx, dword [esp + 0x44]
test edx, edx
je 0x4069f4
test eax, eax
jne 0x406151
push 1
push edx
push esi
call fcn.00406ac0
add esp, 0xc
test eax, eax
jne 0x406151
jmp 0x406535
test edx, edx
jne 0x4069e8
jmp 0x406535
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x52cfb4]
jne 0x40650b
jmp 0x405e7a
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x52cfb4]
jne 0x40650b
jmp 0x405e7a
mov dword [esp + 0x30], ebx
mov ebx, dword [esp + 0x44]
cmp dword [esp + 0x30], 0
je 0x406a7a
test eax, eax
jne 0x4064dd
push 1
push dword [esp + 0x34]
push esi
call fcn.00406ac0
add esp, 0xc
test eax, eax
jne 0x4064dd
jmp 0x406535
cmp dword [esp + 0x30], 0
ja 0x406a6b
jmp 0x406535
mov ecx, dword [esp + 0x128]
mov dword [esp + 0x128], 0
xor ecx, esp
cmp ecx, dword [0x52cfb4]
jne 0x40650b
jmp 0x405e7a