Function at 0x40a6e0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x552064]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov dword [ebp - 0x3c], edx
push esi
mov esi, dword [ebp + 8]
xorps xmm0, xmm0
push edi
mov ecx, dword [ebx*4 + 0x55718c]
mov dword [ebp - 0x30], ebx
movups xmmword [ebp - 0x20], xmm0
mov dword [ebp - 0x10], 0
call fcn.00436110
mov edi, dword [ebx*4 + 0x55718c]
mov ecx, dword [edi]
test ecx, ecx
je 0x40a74d
mov eax, dword [ecx - 8]
add ecx, 0xfffffff8
cmp eax, 0xffffffff
je 0x40a740
dec eax
mov dword [ecx], eax
test eax, eax
jg 0x40a740
push ecx
call fcn.00501c9e
add esp, 4
mov dword [edi], 0
mov edi, dword [ebx*4 + 0x55718c]
push 0
push 0x80
push 3
push 0
push 0
push DirectSoundCreate
push esi
mov dword [ebp - 0x34], 0
add edi, 8
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x24], eax
cmp eax, 0xffffffff
je 0x40a9ef
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
je 0x40a9ef
push esi
call fcn.00501e08
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
je 0x40a9ef
push 0
lea ecx, [ebp - 0xc]
push ecx
push esi
push eax
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0xc], esi
jne 0x40a9ef
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x24]
mov edx, esi
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0040a020
add esp, 0xc
mov esi, eax
push dword [ebp - 8]
call fcn.00501c9e
mov edx, dword [ebp - 0x2c]
add esp, 4
mov eax, edx
imul eax, esi
add eax, eax
mov dword [ebp - 0x38], eax
test esi, esi
jle 0x40a846
mov eax, 1
mov word [edi + 2], dx
mov word [edi], ax
mov ecx, edx
mov eax, dword [ebp - 0x24]
mov dword [edi + 4], eax
imul ecx, eax
lea eax, [edx + edx]
mov word [edi + 0xc], ax
mov eax, dword [ebp - 0x38]
mov dword [edi + 0xe], 0x120010
add ecx, ecx
mov dword [edi + 8], ecx
mov dword [ebp - 0x20], 0x14
mov dword [ebp - 0x1c], 0x80ea
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], edi
test eax, eax
jle 0x40a9ef
xor esi, esi
xor edi, edi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x2c], esi
nop dword [eax + eax]
mov edx, dword [ebx*4 + 0x55718c]
lea eax, [edx + 0x2c]
add eax, edi
mov dword [ebp - 0x28], eax
test esi, esi
jle 0x40a893
mov eax, dword [0x557180]
push dword [ebp - 0x28]
mov ebx, dword [ebp - 0x2c]
mov ecx, dword [eax]
push dword [ebx + edx + 0x2c]
push eax
call dword [ecx + 0x14]
mov ebx, dword [ebp - 0x30]
test eax, eax
je 0x40a96b
mov eax, dword [0x557180]
lea edx, [ebp - 0x20]
push 0
push dword [ebp - 0x28]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x28]
lea edx, [ebp - 8]
push 0
push 0
push 0
push edx
mov dword [ebp - 0x24], 0
lea edx, [ebp - 0x24]
mov dword [ebp - 8], 0
mov eax, dword [eax]
push edx
push dword [ebp - 0x38]
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x2c]
push dword [ebp - 8]
push dword [ebp - 0x34]
push dword [ebp - 0x24]
call fcn.004fd9e0
mov eax, dword [ebp - 0x28]
add esp, 0xc
mov eax, dword [eax]
push 0
push 0
push dword [ebp - 8]
mov ecx, dword [eax]
push dword [ebp - 0x24]
push eax
call dword [ecx + 0x4c]
mov ecx, dword [ebx*4 + 0x55718c]
push 0x32
push esi
call fcn.00435cc0
mov ecx, dword [ebx*4 + 0x55718c]
cmp esi, 4
jb 0x40a951
lea esi, [ecx + 0x2c]
lea ebx, [esi + 0x78]
cmp esi, ebx
je 0x40a949
xor edx, edx
push 0x64
lea ecx, [edx + 0x64]
call fcn.004a23c0
add esp, 4
nop dword [eax]
mov dword [esi + 8], eax
add esi, 0x1e
cmp esi, ebx
jne 0x40a930
mov ebx, dword [ebp - 0x30]
mov esi, dword [ebp - 0xc]
mov ecx, dword [ebx*4 + 0x55718c]
jmp 0x40a960
mov ebx, dword [ebp - 0x30]
mov esi, dword [ebp - 0xc]
jmp 0x40a960
mov dword [edi + ecx + 0x34], 0x64
mov ecx, dword [ebx*4 + 0x55718c]
push 0x64
push esi
call fcn.00435dd0
mov dword [ebp - 0x2c], edi
inc esi
add edi, 0x1e
mov dword [ebp - 0xc], esi
cmp edi, 0x78
jl 0x40a860
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40a98b
push eax
call fcn.00501c9e
add esp, 4
mov ecx, dword [ebx*4 + 0x55718c]
mov edx, dword [ebp - 0x3c]
mov eax, dword [ecx + 0xc]
mov dword [ecx + 0x1a], eax
mov ecx, dword [ebx*4 + 0x55718c]
mov eax, dword [ecx + 0x10]
mov dword [ecx + 0x1e], eax
mov esi, dword [ebx*4 + 0x55718c]
mov ecx, dword [esi]
cmp ecx, edx
je 0x40a9ef
test ecx, ecx
je 0x40a9dd
mov eax, dword [ecx - 8]
add ecx, 0xfffffff8
cmp eax, 0xffffffff
je 0x40a9d7
dec eax
mov dword [ecx], eax
test eax, eax
jg 0x40a9d7
push ecx
call fcn.00501c9e
mov edx, dword [ebp - 0x3c]
add esp, 4
mov dword [esi], 0
test edx, edx
je 0x40a9ef
mov dword [esi], edx
mov eax, dword [edx - 8]
cmp eax, 0xffffffff
je 0x40a9ef
inc eax
mov dword [edx - 8], eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e66f2
mov esp, ebp
pop ebp
ret