Function at 0x410d40
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov esi, ecx
call fcn.00411000
mov eax, dword [esp + 0x28]
push 0
push 0x80
push 3
push 0
push 1
push DirectSoundCreate
push eax
call dword [sym.imp.kernel32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x410d7e
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 4
mov ebp, dword [sym.imp.kernel32.dll_ReadFile]
lea ecx, [esp + 0x14]
push 0
push ecx
lea edx, [esp + 0x18]
push 4
push edx
push ebx
call ebp
test eax, eax
jne 0x410dac
push ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 4
cmp dword [esp + 0x14], 4
je 0x410dc6
push ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 4
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x410e5e
lea ecx, [eax + eax*8]
lea eax, [eax + ecx*2]
lea edx, [eax + eax*2]
shl edx, 2
push edx
push 0
call dword [sym.imp.kernel32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
jne 0x410e00
push ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 4
lea eax, [esp + 0x14]
push 0
push eax
mov eax, dword [esp + 0x18]
lea ecx, [eax + eax*8]
lea eax, [eax + ecx*2]
lea edx, [eax + eax*2]
shl edx, 2
push edx
push edi
push ebx
call ebp
test eax, eax
jne 0x410e33
push ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 4
mov eax, dword [esp + 0x10]
lea ecx, [eax + eax*8]
lea eax, [eax + ecx*2]
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x14]
shl edx, 2
cmp eax, edx
je 0x410e60
push ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 4
xor edi, edi
push ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
test eax, eax
jne 0x410e77
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 4
mov ebx, dword [esp + 0x10]
xor edx, edx
test ebx, ebx
mov dword [esi], ebx
mov dword [esi + 4], edi
jle 0x410ecd
lea eax, [edi + 0x24]
add edi, 0x20
cmp dword [edi], 1
jl 0x410e6b
cmp dword [eax - 4], 4
jg 0x410e6b
mov ecx, dword [eax]
cmp ecx, 1
jl 0x410e6b
cmp ecx, 0x15
jg 0x410e6b
mov ecx, dword [eax + 0xc]
cmp ecx, 1
jl 0x410e6b
cmp ecx, 0x63
jg 0x410e6b
mov ecx, dword [eax + 0x10]
cmp ecx, 1
jl 0x410e6b
cmp ecx, 4
jg 0x410e6b
inc edx
add edi, 0xe4
add eax, 0xe4
cmp edx, ebx
jl 0x410e8c
xor edi, edi
test ebx, ebx
jle 0x410f0b
xor ebx, ebx
mov eax, dword [esi + 4]
mov edx, dword [ebx + eax + 0x24]
lea ecx, [ebx + eax]
add ebx, 0xe4
mov eax, dword [ecx + 0x30]
mov ecx, dword [ecx + 0x20]
dec eax
dec edx
add edx, eax
dec ecx
lea ebp, [eax + eax*4]
lea edx, [edx + ebp*4]
lea eax, [ecx + edx*4]
mov ebp, dword [esi + eax*4 + 8]
lea eax, [esi + eax*4 + 8]
inc ebp
inc edi
mov dword [eax], ebp
mov eax, dword [esi]
cmp edi, eax
jl 0x410ed5
mov ebx, 0x207e
lea ebp, [esi + 8]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x28], 0
mov dword [esp + 0x18], ebp
xor edi, edi
mov eax, dword [ebp]
test eax, eax
jle 0x410f55
lea ecx, [eax*4]
push ecx
push 0
call dword [sym.imp.kernel32.dll_GlobalAlloc]
lea edx, [ebx + edi]
test eax, eax
mov dword [esi + edx*4], eax
je 0x410e6b
mov dword [ebp], 0
inc edi
add ebp, 4
cmp edi, 4
jl 0x410f29
mov eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x18]
inc eax
add ebp, 0x10
add ebx, 4
cmp eax, 0x15
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], ebp
jl 0x410f27
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
add ebx, 0x54
add ebp, 0x150
cmp ebx, 0x40fa
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebp
jl 0x410f1b
mov eax, dword [esi]
xor edi, edi
test eax, eax
jle 0x410fe7
xor ebx, ebx
mov eax, dword [esi + 4]
mov edx, dword [ebx + eax + 0x24]
lea ecx, [ebx + eax]
add ebx, 0xe4
mov eax, dword [ecx + 0x30]
mov ecx, dword [ecx + 0x20]
dec eax
dec edx
add edx, eax
dec ecx
lea ebp, [eax + eax*4]
lea edx, [edx + ebp*4]
lea eax, [ecx + edx*4]
mov ecx, dword [esi + eax*4 + 8]
mov edx, dword [esi + eax*4 + 0x81f8]
mov dword [edx + ecx*4], edi
mov ebp, dword [esi + eax*4 + 8]
inc ebp
inc edi
mov dword [esi + eax*4 + 8], ebp
mov eax, dword [esi]
cmp edi, eax
jl 0x410fa5
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x14
ret 4