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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x45424b
push eax
mov dword fs:[0], esp
sub esp, 0x60
xor eax, eax
push ebx
push ebp
push esi
push edi
mov ebp, ecx
push eax
mov ecx, 0xc5
mov edi, ebp
push 0x8000000
push 3
rep stosd dword es:[edi], eax
push eax
mov eax, dword [esp + 0x90]
push 1
push DirectSoundCreate
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x41108f
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push edi
call fcn.00429f70
add esp, 4
mov dword [ebp], eax
test eax, eax
jne 0x410cd9
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x41108f
lea ecx, [esp + 0x24]
push 0
push ecx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp]
mov eax, dword [edx]
shr eax, 2
mov dword [esp + 0x14], eax
mov eax, 0
mov dword [esp + 0x10], eax
je 0x410e88
mov ebx, dword [ebp]
mov esi, dword [ebx + eax*4]
test esi, esi
mov dword [esp + 0x18], esi
je case.0x410d42.5
mov al, byte [esi + ebx]
mov byte [esp + 0x20], al
mov ecx, dword [esp + 0x20]
and ecx, 0xff
lea eax, [ecx - 2]
cmp eax, 0x13
ja case.0x410d42.5
xor edx, edx
mov dl, byte [eax + 0x4110b8]
jmp dword [edx*4 + 0x4110a8]
mov eax, 1
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], eax
jmp case.0x410d42.5
mov dword [esp + 0x1c], 1
jmp case.0x410d42.5
lea edi, [esi + ebx + 0xb]
lea eax, [esp + 0x30]
mov esi, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x410d96
test cl, cl
je 0x410d92
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x410d96
add eax, 2
add esi, 2
test cl, cl
jne 0x410d72
xor eax, eax
jmp 0x410d9b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x410db4
mov al, byte [ebp + 0x310]
mov ecx, dword [esp + 0x18]
dec al
mov byte [ecx + ebx + 0xa], al
jmp case.0x410d42.5
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x30]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x14
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00429f70
add esp, 4
mov dword [esp + 0x2c], eax
xor esi, esi
cmp eax, esi
mov dword [esp + 0x78], esi
je 0x410dfb
lea ecx, [esp + 0x30]
push ecx
mov ecx, eax
call fcn.00415a10
jmp 0x410dfd
xor eax, eax
mov edx, dword [ebp + 0x310]
mov dword [esp + 0x78], 0xffffffff
mov dword [ebp + edx*4 + 0x10], eax
mov eax, dword [ebp + 0x310]
mov ecx, dword [ebp + eax*4 + 0x10]
call fcn.00416760
mov edx, dword [esp + 0x18]
mov cl, byte [ebp + 0x310]
mov byte [edx + ebx + 0xa], cl
mov eax, dword [ebp + 0x310]
lea ecx, [ebp + eax*4 + 0x110]
push ecx
mov ecx, dword [ebp + eax*4 + 0x10]
call fcn.00415db0
test eax, eax
jne 0x410e56
mov edx, dword [ebp + 0x310]
mov dword [ebp + edx*4 + 0x110], esi
jmp 0x410e6d
mov eax, dword [ebp + 0x310]
lea ecx, [ebp + eax*4 + 0x210]
push ecx
mov ecx, dword [ebp + eax*4 + 0x10]
call fcn.00415d30
inc dword [ebp + 0x310]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jb 0x410d0b
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x41108f
mov edi, dword [esp + 0x80]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x2e
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
push ecx
call fcn.0042ce60
add esp, 8
test eax, eax
je 0x410ed2
mov byte [eax], 0
mov edi, str..PAL
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x8000000
mov ecx, ebx
push 3
push eax
and ecx, 3
push 1
lea eax, [esp + 0x44]
push DirectSoundCreate
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x41108f
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push edi
call fcn.00429f70
add esp, 4
mov dword [ebp + 4], eax
test eax, eax
jne 0x410f4d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x41108f
lea ecx, [esp + 0x24]
push 0
push ecx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp + 4]
mov ebx, dword [edx]
shr ebx, 2
lea eax, [ebx*4]
push eax
call fcn.00429f70
add esp, 4
mov dword [ebp + 8], eax
test eax, eax
je 0x41108f
lea ecx, [ebx + ebx]
push ecx
call fcn.00429f70
add esp, 4
mov dword [ebp + 0xc], eax
test eax, eax
je 0x41108f
xor esi, esi
test ebx, ebx
jbe 0x41100c
mov eax, dword [ebp + 4]
lea edx, [esi*4]
mov ecx, dword [eax + edx]
add ecx, eax
mov eax, dword [ebp + 0xc]
mov di, word [ecx]
mov word [eax + esi*2], di
mov eax, dword [ebp + 0xc]
lea edi, [eax + esi*2]
mov ax, word [eax + esi*2]
test ah, 0x80
je 0x410fef
and eax, 0x7fff
add ecx, 2
mov word [edi], ax
mov eax, dword [ebp + 0xc]
xor edi, edi
mov di, word [eax + esi*2]
mov eax, dword [ebp + 8]
add eax, edx
push edi
push eax
push ecx
call fcn.0040e770
jmp 0x411004
and eax, 0xffff
add ecx, 2
push eax
mov eax, dword [ebp + 8]
add eax, edx
push eax
push ecx
call fcn.0040e630
add esp, 0xc
inc esi
cmp esi, ebx
jb 0x410fa4
mov eax, dword [esp + 0x28]
test eax, eax
je 0x41108f
mov ecx, dword [ebp]
mov eax, dword [ecx]
shr eax, 2
mov dword [esp + 0x14], eax
mov eax, 0
mov dword [esp + 0x10], eax
je 0x41108f
mov ecx, dword [ebp]
mov esi, dword [ecx + eax*4]
test esi, esi
je 0x41107e
mov bl, byte [esi + ecx]
test bl, 2
je 0x41107e
mov eax, dword [ebp + 8]
xor edx, edx
mov dl, byte [esi + ecx + 5]
mov edx, dword [eax + edx*4]
test edx, edx
je 0x41107e
mov edx, dword [edx + 4]
xor edi, edi
mov di, word [esi + ecx + 1]
xor eax, eax
mov ax, word [esi + ecx + 3]
push edx
test bl, 1
je 0x41106c
imul eax, edi
push eax
push 1
jmp 0x411072
imul eax, edi
push eax
push 0
lea eax, [esi + ecx + 6]
mov ecx, ebp
push eax
call fcn.00412e00
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jb 0x41102b
mov ecx, dword [esp + 0x70]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x6c
ret 4