Function at 0x479478
Capabilities:
Read file on windows

Disassembly:
push 0x434
push 0x531c88
call fcn.004cd9dc
mov esi, ecx
mov dword [ebp - 0x444], esi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x440], eax
xor edi, edi
mov dword [ebp - 0x438], edi
mov byte [ebp - 0x434], 0
mov ebx, 0x103
push ebx
push edi
lea eax, [ebp - 0x433]
push eax
call fcn.004b53e0
add esp, 0xc
mov byte [ebp - 0x12c], 0
push ebx
push edi
lea eax, [ebp - 0x12b]
push eax
call fcn.004b53e0
add esp, 0xc
mov edi, 0x1e8
call fcn.0047adea
test eax, eax
je 0x479c4e
mov edx, dword [ebp - 0x440]
call fcn.0047c3ca
test eax, eax
lea eax, [ebp - 0x12c]
jne 0x47950d
push dword [ebp - 0x440]
lea ecx, [ebx + 1]
call fcn.0047c3fc
pop ecx
jmp 0x479512
call fcn.0047c34d
and dword [ebp - 0x440], 0
lea edx, [ebp - 0x12c]
call fcn.0047c3ca
test eax, eax
jne 0x479624
lea edi, [ebp - 0x12c]
call fcn.0041b048
test eax, eax
jne 0x479599
mov edi, 0x63dfa8
mov edx, edi
call fcn.0047c3ca
test eax, eax
jne 0x4795ff
push edi
call fcn.004b4450
pop ecx
mov ecx, ebx
sub ecx, eax
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0x434]
call fcn.0047c3fc
pop ecx
mov edx, edi
mov ecx, eax
call fcn.0047c986
lea edi, [ebp - 0x434]
call fcn.0041b048
test eax, eax
je 0x4795d2
mov eax, edi
push eax
mov ecx, 0x104
lea eax, [ebp - 0x12c]
call fcn.0047c3fc
pop ecx
push 0
xor edx, edx
lea ecx, [ebp - 0x12c]
call fcn.0041b6bd
pop ecx
mov dword [ebp - 0x440], eax
test eax, eax
jne 0x479624
cmp dword [0x63e0b0], eax
jne 0x479c4e
lea eax, [ebp - 0x12c]
push eax
push str.:5:LoadSound___s___FAILED:_GetFileSizeTimeOut___FAILED.
call fcn.004178df
jmp 0x47961d
cmp dword [0x63e0ac], 0
jne 0x479c4e
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x12c]
push eax
push str.:2:LoadSound___s___FAILED:_The_file_could_not_be_found__Tried_default_directory___s_
call fcn.00417db7
add esp, 0xc
jmp 0x479c4e
cmp dword [0x63e0ac], 0
jne 0x479c4e
lea eax, [ebp - 0x12c]
push eax
push str.:2:LoadSound___s___FAILED:_The_file_could_not_be_found__No_default_directory_has_been_defined.
call fcn.00417db7
pop ecx
pop ecx
jmp 0x479c4e
xor ebx, ebx
cmp dword [ebp - 0x440], ebx
jne 0x47966e
mov edi, 0x21a
call fcn.0047adea
test eax, eax
je 0x479666
mov eax, esi
call fcn.0047ae4c
test eax, eax
je 0x479666
push str.LoadSound1
mov ecx, esi
call fcn.00478fa0
pop ecx
mov dword [esi + 0x104], ebx
mov eax, esi
call fcn.0047c34d
call fcn.0047ae64
xor eax, eax
inc eax
jmp 0x479c50
push 0x228
push str..Sound.c
mov edx, 0x4d3128
lea ecx, [ebp - 0x12c]
call fcn.0041cea8
pop ecx
pop ecx
mov edi, eax
cmp edi, ebx
jne 0x4796b8
cmp dword [0x63e0b0], ebx
jne 0x479c4e
push dword [ebp - 0x440]
lea eax, [ebp - 0x12c]
push eax
push str.:5:LoadSound___s___FAILED:_The_file_of_size__ld_exists_but_cannot_be_opened__
call fcn.004178df
jmp 0x4795f7
mov dword [ebp - 0x43c], ebx
push edi
call fcn.004b4b5e
pop ecx
call fcn.0047c24d
cmp eax, 0x52
jne 0x479702
push edi
call fcn.004b4b5e
pop ecx
call fcn.0047c24d
cmp eax, 0x49
jne 0x479702
push edi
call fcn.004b4b5e
pop ecx
call fcn.0047c24d
cmp eax, 0x46
jne 0x479702
push edi
call fcn.004b4b5e
pop ecx
call fcn.0047c24d
cmp eax, 0x46
je 0x47970c
mov dword [ebp - 0x43c], 1
xor ebx, ebx
inc ebx
push edi
call fcn.004b4b5e
pop ecx
push edi
call fcn.004b4b5e
pop ecx
push edi
call fcn.004b4b5e
pop ecx
push edi
call fcn.004b4b5e
pop ecx
push edi
call fcn.004b4b5e
pop ecx
call fcn.0047c24d
cmp eax, 0x57
jne 0x47976f
push edi
call fcn.004b4b5e
pop ecx
call fcn.0047c24d
cmp eax, 0x41
jne 0x47976f
push edi
call fcn.004b4b5e
pop ecx
call fcn.0047c24d
cmp eax, 0x56
jne 0x47976f
push edi
call fcn.004b4b5e
pop ecx
call fcn.0047c24d
cmp eax, 0x45
je 0x479775
mov dword [ebp - 0x43c], ebx
cmp dword [ebp - 0x43c], 0
je 0x4797a3
cmp dword [0x63e0b0], 0
jne 0x479c47
lea eax, [ebp - 0x12c]
push eax
push str.LoadSound___s___FAILED:_The_wave_file_is_invalid:_The_RIFF_Chunk_was_not_found.
call fcn.004178df
pop ecx
pop ecx
jmp 0x479c47
push edi
mov eax, str.fmt
call fcn.0041c9c5
pop ecx
test eax, eax
jne 0x4797cd
cmp dword [0x63e0b0], eax
jne 0x479c47
lea eax, [ebp - 0x12c]
push eax
push str.LoadSound___s___FAILED:_The_wave_file_is_invalid:_The_Format_Chunk_was_not_found.
jmp 0x479797
and dword [ebp - 0x438], 0
push edi
push ebx
push 4
lea eax, [ebp - 0x438]
push eax
call fcn.004b56f6
add esp, 0x10
cmp eax, ebx
jne 0x479c24
cmp dword [ebp - 0x438], 0x10
jb 0x479c24
push dword [ebp - 0x438]
push ebx
call fcn.004b422c
pop ecx
pop ecx
mov dword [ebp - 0x43c], eax
test eax, eax
jne 0x47983c
cmp dword [0x63e0b0], eax
jne 0x479c47
push dword [ebp - 0x438]
lea eax, [ebp - 0x12c]
push eax
push str.:6:LoadSound___s___FAILED:_Could_not_allocate__ld_bytes_for_the_wave_format_header_struct.
call fcn.004178df
jmp 0x479c44
push edi
push dword [ebp - 0x438]
push ebx
push dword [ebp - 0x43c]
call fcn.004b56f6
add esp, 0x10
cmp eax, dword [ebp - 0x438]
je 0x479895
cmp dword [0x63e0b0], 0
jne 0x47987e
push eax
push dword [ebp - 0x438]
lea eax, [ebp - 0x12c]
push eax
push str.:7:LoadSound___s___FAILED:_Could_not_read_the_Format_Chunk_of_size__ld_from_the_file.__Only__ld_bytes_could_be_read.
call fcn.004178df
add esp, 0x10
mov ecx, edi
call fcn.0041d2f0
push dword [ebp - 0x43c]
call fcn.004b4080
jmp 0x47961e
push edi
mov eax, str.data
call fcn.0041c9c5
pop ecx
test eax, eax
jne 0x4798c2
cmp dword [0x63e0b0], eax
jne 0x47987e
lea eax, [ebp - 0x12c]
push eax
push str.LoadSound___s___FAILED:_The_wave_file_is_invalid:_The_Format_Chunk_was_not_found.
call fcn.004178df
pop ecx
pop ecx
jmp 0x47987e
and dword [ebp - 0x438], 0
push edi
push ebx
push 4
lea eax, [ebp - 0x438]
push eax
call fcn.004b56f6
add esp, 0x10
cmp eax, ebx
jne 0x479bfb
cmp dword [ebp - 0x438], 0
je 0x479bfb
push dword [ebp - 0x438]
call fcn.004b5967
pop ecx
mov ebx, eax
test ebx, ebx
jne 0x47992e
cmp dword [0x63e0b0], eax
jne 0x47987e
push dword [ebp - 0x438]
lea eax, [ebp - 0x12c]
push eax
push str.:7:LoadSound___s___FAILED:_The_file_is_too_large_for_memory:_Could_not_allocate__ld_bytes_for_wave_data.
call fcn.004178df
add esp, 0xc
jmp 0x47987e
push edi
push dword [ebp - 0x438]
push 1
push ebx
call fcn.004b56f6
add esp, 0x10
cmp eax, dword [ebp - 0x438]
je 0x479983
cmp dword [0x63e0b0], 0
jne 0x47996c
push eax
push dword [ebp - 0x438]
lea eax, [ebp - 0x12c]
push eax
push str.:7:LoadSound___s___FAILED:_Wave_data_size_should_be__ld_but_only__ld_bytes_could_be_read.
call fcn.004178df
add esp, 0x10
push ebx
call fcn.004b4080
pop ecx
push dword [ebp - 0x43c]
call fcn.004b4080
jmp 0x47979d
mov ecx, edi
call fcn.0041d2f0
mov edi, 0x2a2
call fcn.0047adea
test eax, eax
je 0x479bef
mov eax, esi
call fcn.0047ae4c
test eax, eax
je 0x479bef
push str.LoadSound
mov ecx, esi
call fcn.00478fa0
pop ecx
and dword [ebp - 4], 0
mov dword [esi + 0x108], ebx
mov eax, dword [ebp - 0x438]
mov dword [esi + 0x10c], eax
mov eax, dword [ebp - 0x43c]
mov dword [esi + 0x110], eax
lea eax, [ebp - 0x12c]
push eax
mov ecx, 0x104
mov eax, esi
call fcn.0047c3fc
pop ecx
mov eax, dword [ebp - 0x440]
mov dword [esi + 0x104], eax
lea ebx, [esi + 0x114]
push 0x20
push 0
push ebx
call fcn.004b53e0
add esp, 0xc
mov eax, dword [ebp - 0x438]
mov dword [esi + 0x118], eax
mov eax, dword [esi + 0x108]
mov dword [ebx], eax
and dword [esi + 0x120], 0
lea edi, [esi + 0x434]
and dword [edi], 0
push 0x30000
push esi
push 0x47ad24
push dword [esi + 0x110]
push 0xffffffffffffffff
push edi
call dword [sym.imp.WINMM.dll_waveOutOpen]
mov dword [ebp - 0x440], eax
test eax, eax
je 0x479b18
mov byte [ebp - 0x32c], 0
push 0xff
push 0
lea eax, [ebp - 0x32b]
push eax
call fcn.004b53e0
add esp, 0xc
mov ebx, dword [ebp - 0x440]
push ebx
push str.Err_ld
push 0xf6
lea eax, [ebp - 0x32c]
push eax
call fcn.0047da40
lea eax, [ebp - 0x32c]
push eax
call fcn.004b4450
add esp, 0x14
mov ecx, 0x100
sub ecx, eax
push ecx
lea eax, [ebp - 0x32c]
push eax
call fcn.004b4450
pop ecx
lea eax, [ebp + eax - 0x32c]
push eax
push ebx
call dword [sym.imp.WINMM.dll_waveOutGetErrorTextA]
cmp dword [0x63e0c4], ebx
je 0x479add
and dword [0x63e1cc], 0
mov dword [0x63e0c4], ebx
jmp 0x479ae3
inc dword [0x63e1cc]
cmp dword [0x63e0ac], 0
jne 0x479b10
cmp dword [0x63e1cc], 2
jg 0x479b10
lea eax, [ebp - 0x32c]
push eax
lea eax, [ebp - 0x12c]
push eax
push str.:4:LoadSound___s___encountered_a_problem:_The_initial_sound_instance_could_not_be_queued_because_waveOutOpen___FAILED:__s
call fcn.00417db7
add esp, 0xc
and dword [edi], 0
jmp 0x479bb8
push 0x20
push ebx
push dword [edi]
call dword [sym.imp.WINMM.dll_waveOutPrepareHeader]
mov edi, eax
test edi, edi
je 0x479bb8
mov byte [ebp - 0x22c], 0
push 0xff
push 0
lea eax, [ebp - 0x22b]
push eax
call fcn.004b53e0
add esp, 0xc
push edi
push str.Err_ld
push 0xf6
lea eax, [ebp - 0x22c]
push eax
call fcn.0047da40
lea eax, [ebp - 0x22c]
push eax
call fcn.004b4450
add esp, 0x14
mov ecx, 0x100
sub ecx, eax
push ecx
lea eax, [ebp - 0x22c]
push eax
call fcn.004b4450
pop ecx
lea eax, [ebp + eax - 0x22c]
push eax
push edi
call dword [sym.imp.WINMM.dll_waveOutGetErrorTextA]
cmp dword [0x63e0ac], 0
jne 0x479bb8
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x12c]
push eax
push str.:4:LoadSound___s___encountered_a_problem:_The_initial_sound_instance_could_not_be_queued_because_waveOutPrepareHeader___FAILED:__s
call fcn.00417db7
add esp, 0xc
mov dword [ebp - 4], 0xfffffffe
jmp 0x479be8
mov eax, esi
jmp 0x479661
push ebx
call fcn.004b4080
pop ecx
jmp 0x479885
cmp dword [0x63e0ac], 0
jne 0x47987e
push dword [ebp - 0x438]
lea eax, [ebp - 0x12c]
push eax
push str.:6:LoadSound___s___FAILED:_The_file_format_is_invalid._The_Data_Chunk_size___ld__could_not_be_read.
call fcn.00417db7
jmp 0x479926
cmp dword [0x63e0ac], 0
jne 0x479c47
push dword [ebp - 0x438]
lea eax, [ebp - 0x12c]
push eax
push str.:6:LoadSound___s___FAILED:_The_file_format_is_invalid._The_Format_Chunk_size___ld__could_not_be_read.
call fcn.00417db7
add esp, 0xc
mov ecx, edi
call fcn.0041d2f0
xor eax, eax
call fcn.004cda24
ret