Function at 0x414140
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x130
mov eax, dword [str..MUSIC_]
mov ecx, dword [0x42daf4]
mov dl, byte [0x42daf8]
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ecx
mov ecx, 0x3e
xor eax, eax
lea edi, [esp + 0x45]
mov byte [esp + 0x44], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x144]
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x4142bc
cmp dword [0x697f84], 0x200
jge 0x4142bc
mov eax, dword [0x697f90]
xor ebx, ebx
cmp dword [eax], 0
je 0x4141b1
inc ebx
add eax, 4
cmp ebx, 0x200
jl 0x4141a0
mov edi, dword [esp + 0x148]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x3c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x8000080
mov ecx, ebp
push 3
push eax
and ecx, 3
push 1
lea eax, [esp + 0x50]
push 0x80000000
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x4142bc
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x38]
push 0xc
push edx
push ebp
call esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4142b5
push 4
lea eax, [esp + 0x34]
push str.RIFF
push eax
call fcn.00415490
add esp, 0xc
test eax, eax
jne 0x4142b5
push 4
lea ecx, [esp + 0x3c]
push str.WAVE
push ecx
call fcn.00415490
add esp, 0xc
test eax, eax
jne 0x4142b5
mov ecx, dword [str.fmt]
xor edx, edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x24], eax
lea edx, [esp + 0x14]
mov dword [esp + 0x28], eax
push edx
push ebp
mov dword [esp + 0x34], eax
mov dword [esp + 0x1c], ecx
call fcn.004140a0
add esp, 8
test eax, eax
jne 0x4142b5
mov eax, dword [esp + 0x18]
push 0
cmp eax, 0x14
jb 0x4142ca
lea eax, [esp + 0x14]
lea ecx, [esp + 0x20]
push eax
push 0x14
push ecx
push ebp
call esi
cmp dword [esp + 0x10], 0x14
je 0x4142e4
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x130
ret
lea edx, [esp + 0x14]
push edx
push eax
lea eax, [esp + 0x28]
push eax
push ebp
call esi
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
cmp ecx, eax
jne 0x4142b5
mov edx, dword [str.data]
lea eax, [esp + 0x14]
push eax
push ebp
mov dword [esp + 0x1c], edx
call fcn.004140a0
add esp, 8
test eax, eax
jne 0x4142b5
push 0x14
call fcn.00415de6
mov ecx, dword [0x697f88]
add esp, 4
mov dword [ecx + ebx*4], eax
mov edx, dword [0x697f88]
mov edi, dword [edx + ebx*4]
test edi, edi
je 0x4142b5
mov ecx, 5
lea esi, [esp + 0x1c]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [0x697f90]
mov ecx, dword [esp + 0x18]
mov dword [eax + ebx*4], ecx
mov edx, dword [0x697f90]
mov eax, dword [edx + ebx*4]
push eax
call fcn.00415de6
mov ecx, dword [0x697f8c]
add esp, 4
mov dword [ecx + ebx*4], eax
mov edx, dword [0x697f8c]
mov eax, dword [edx + ebx*4]
test eax, eax
jne 0x414397
mov eax, dword [0x697f90]
mov dword [eax + ebx*4], 0
mov ecx, dword [0x697f88]
mov eax, dword [ecx + ebx*4]
test eax, eax
je 0x4142b5
push eax
call fcn.00415db7
mov edx, dword [0x697f88]
add esp, 4
mov dword [edx + ebx*4], 0
jmp 0x4142b5
mov edx, dword [0x697f90]
lea ecx, [esp + 0x10]
push 0
push ecx
mov ecx, dword [edx + ebx*4]
push ecx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0x697f90]
mov edx, dword [esp + 0x10]
cmp edx, dword [eax + ebx*4]
je 0x414412
mov dword [eax + ebx*4], 0
mov eax, dword [0x697f88]
mov eax, dword [eax + ebx*4]
test eax, eax
je 0x4143e7
push eax
call fcn.00415db7
mov ecx, dword [0x697f88]
add esp, 4
mov dword [ecx + ebx*4], 0
mov edx, dword [0x697f8c]
mov eax, dword [edx + ebx*4]
test eax, eax
je 0x4142b5
push eax
call fcn.00415db7
mov eax, dword [0x697f8c]
add esp, 4
mov dword [eax + ebx*4], 0
jmp 0x4142b5
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x697f84]
pop edi
inc eax
pop esi
mov dword [0x697f84], eax
mov eax, ebx
pop ebp
pop ebx
add esp, 0x130
ret