Function at 0x406a10
Capabilities:
Read file on windows

Disassembly:
mov eax, 0xb4d0
call fcn.00451ab0
mov eax, dword [0x4a8f7c]
xor eax, esp
mov dword [esp + 0xb4cc], eax
mov eax, dword [esp + 0xb4d4]
push ebx
push ebp
push 0
push 0x20
push 3
push 0
push 0
push DirectSoundCreate
push eax
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x406a7f
push 0
lea eax, [esp + 0x10]
push eax
push 0xab00
lea ecx, [esp + 0x9e0]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x9d4], 0x78766173
je 0x406a86
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x406cd5
cmp dword [esp + 0x9d8], 0xade98f20
jne 0x406a78
push esi
push edi
push 0
lea edx, [esp + 0x18]
push edx
push 0x760
lea eax, [esp + 0x134]
lea edi, [ebx + 0x2c]
mov ecx, 0x40
lea esi, [esp + 0x9f0]
rep movsd dword es:[edi], dword [esi]
push eax
lea edi, [ebx + 0x12c]
mov ecx, 0x40
lea esi, [esp + 0xaf4]
push ebp
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, ebx
call fcn.004036d0
test eax, eax
je 0x406c0d
lea ecx, [esp + 0x128]
lea esi, [ebx + 0x83e4]
push ecx
mov ecx, esi
call fcn.00418030
test eax, eax
je 0x406c0d
mov edx, dword [esp + 0x174]
push edx
push 0
push 1
mov ecx, esi
call fcn.00418290
mov eax, dword [esp + 0x178]
lea edi, [ebx + 0x22c]
mov ecx, 0x100
lea esi, [esp + 0x180]
rep movsd dword es:[edi], dword [esi]
push 0
lea edi, [ebx + 0x1cb8]
mov ecx, 0x80
lea esi, [esp + 0x584]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x884]
push 1
push ecx
lea edx, [esp + 0x78c]
lea esi, [ebx + 0x1790]
push edx
mov ecx, esi
mov dword [ebx + 0x1784], eax
call fcn.00410d70
test eax, eax
je 0x406c0d
cmp dword [esp + 0x884], 0
mov dword [esp + 0x10], 0
jbe 0x406c1b
jmp 0x406b90
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [esp + 0x18]
push eax
push 0x110
lea ecx, [esp + 0x24]
push ecx
push ebp
call edi
mov edx, dword [esp + 0x11c]
mov eax, dword [esp + 0x118]
push edx
push 0
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, esi
call fcn.00410d70
test eax, eax
je 0x406c0d
mov edx, dword [esp + 0x11c]
push edx
mov ecx, esi
call fcn.0040fe50
test eax, eax
je 0x406c0d
mov ecx, dword [esp + 0x120]
mov dword [eax + 0x128], ecx
mov edx, dword [esp + 0x124]
mov dword [eax + 0x12c], edx
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x884]
jb 0x406b90
jmp 0x406c21
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x406cd3
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
xor esi, esi
cmp dword [esp + 0x17c], esi
jbe 0x406c60
lea esp, [esp]
push 0
lea eax, [esp + 0x18]
push eax
push 0x154
lea ecx, [esp + 0x894]
push ecx
push ebp
call edi
lea edx, [esp + 0x888]
push edx
mov ecx, ebx
call fcn.00401590
inc esi
cmp esi, dword [esp + 0x17c]
jb 0x406c30
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [ebx + 0x1cb8]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x406cb4
cmp dword [ebx + 0x173c], 1
lea esi, [ebx + 0x1940]
push ecx
mov ecx, esi
jne 0x406ca0
fild dword [ebx + 0x1740]
fmul qword [0x483360]
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
jmp 0x406ca2
fldz
fstp dword [esp]
call fcn.0041a270
push 1
push edi
mov ecx, esi
call fcn.0041a6c0
lea ecx, [ebx + 0x1790]
call fcn.0040fda0
push 0x3e8
push 2
mov ecx, ebx
call fcn.00403f90
neg eax
sbb eax, eax
neg eax
pop edi
pop esi
mov ecx, dword [esp + 0xb4d4]
pop ebp
pop ebx
xor ecx, esp
call fcn.00451800
add esp, 0xb4d0
ret 4