Function at 0x418c70
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x188
mov eax, dword [0x4a8f7c]
xor eax, esp
mov dword [esp + 0x184], eax
mov eax, dword [esp + 0x18c]
push ebx
push esi
push edi
xor esi, esi
push esi
push 0x20
push 3
push esi
push esi
push DirectSoundCreate
push eax
mov ebx, ecx
mov dword [esp + 0x38], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [esp + 0x20], edi
cmp edi, 0xffffffff
je 0x418ce2
push esi
lea eax, [esp + 0x34]
push eax
push 0x10c
lea ecx, [esp + 0x90]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x84], 0x4443495f
je 0x418ce9
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x418f9b
mov eax, dword [esp + 0x18c]
cmp eax, 0xffffffff
je 0x418d26
mov ecx, dword [ebx + 8]
push 0xffff000d
push 2
push eax
lea edx, [esp + 0x98]
push edx
call fcn.00410d70
test eax, eax
je 0x418ce2
mov ecx, dword [ebx + 8]
push 0xffff000d
call fcn.0040fe20
mov dword [esp + 0x1c], eax
cmp eax, esi
je 0x418ce2
push ebp
mov dword [esp + 0x30], esi
cmp dword [esp + 0x8c], esi
jbe 0x418f7a
push 0
lea eax, [esp + 0x38]
push eax
push 0x40
lea ecx, [esp + 0x54]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, ebx
call fcn.00418b00
mov esi, eax
test esi, esi
je 0x418fb5
mov edx, dword [esp + 0x78]
mov dword [esi], edx
mov eax, dword [esp + 0x7c]
mov dword [esi + 4], eax
mov ecx, dword [esp + 0x80]
mov dword [esi + 8], ecx
mov edx, dword [esp + 0x84]
mov dword [esi + 0xc], edx
xor eax, eax
cmp dword [esp + 0x190], 0xffffffff
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
je 0x418e56
mov eax, dword [esp + 0x48]
mov ebp, dword [esp + 0x50]
cmp eax, ebp
jge 0x418e56
mov edi, dword [esp + 0x54]
sub edi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
sub ebp, eax
mov eax, dword [ebx + 4]
push edi
push ebp
mov dword [esp + 0x30], ecx
lea ecx, [esi + 0x14]
push eax
mov dword [esp + 0x38], edx
call fcn.0040f380
test eax, eax
je 0x418fcd
mov eax, dword [esp + 0x28]
push edi
lea ecx, [eax + ebp]
push ebp
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x34]
push 0
lea edx, [edi + eax]
mov dword [esp + 0x20], eax
push 0
lea eax, [esp + 0x48]
push eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
call dword [sym.imp.USER32.dll_SetRect]
mov edx, dword [ebx + 0x1c]
push 0xff
lea ecx, [esp + 0x14]
push ecx
add edx, 0x108
push edx
lea eax, [esp + 0x44]
lea edi, [esi + 0x14]
push eax
mov ecx, edi
call fcn.0040e7d0
mov edx, dword [esp + 0x20]
push 0xff
lea ecx, [esp + 0x4c]
push ecx
add edx, 0x108
push edx
lea eax, [esp + 0x44]
push eax
mov ecx, edi
call fcn.0040ea20
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x34], ecx
mov edx, dword [esp + 0x14]
mov dword [esi + 0x38], edx
mov eax, dword [esp + 0x18]
mov dword [esi + 0x3c], eax
mov ecx, dword [esp + 0x1c]
mov dword [esi + 0x40], ecx
xor eax, eax
cmp dword [esp + 0x190], 0xffffffff
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
je 0x418f48
mov eax, dword [esp + 0x60]
mov ebp, dword [esp + 0x68]
cmp eax, ebp
jge 0x418f48
mov edi, dword [esp + 0x6c]
sub edi, dword [esp + 0x64]
mov edx, dword [esp + 0x70]
mov ecx, dword [esp + 0x74]
push edi
sub ebp, eax
mov dword [esp + 0x2c], edx
mov edx, dword [ebx + 4]
push ebp
mov dword [esp + 0x34], ecx
lea ecx, [esi + 0x44]
push edx
call fcn.0040f380
test eax, eax
je 0x418fe9
mov eax, dword [esp + 0x28]
push edi
mov dword [esp + 0x14], eax
push ebp
add eax, ebp
push 0
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x38]
push 0
lea edx, [esp + 0x48]
lea ecx, [edi + eax]
push edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], ecx
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [ebx + 0x1c]
push 0xff
lea eax, [esp + 0x14]
push eax
add ecx, 0x108
push ecx
lea edx, [esp + 0x44]
lea edi, [esi + 0x44]
push edx
mov ecx, edi
call fcn.0040e7d0
mov ecx, dword [esp + 0x20]
push 0xff
lea eax, [esp + 0x64]
push eax
add ecx, 0x108
push ecx
lea edx, [esp + 0x44]
push edx
mov ecx, edi
call fcn.0040ea20
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
mov dword [esi + 0x64], eax
mov ecx, dword [esp + 0x14]
mov dword [esi + 0x68], ecx
mov edx, dword [esp + 0x18]
mov dword [esi + 0x6c], edx
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x70], eax
mov eax, dword [esp + 0x30]
inc eax
mov dword [esp + 0x30], eax
cmp eax, dword [esp + 0x8c]
jb 0x418d38
cmp dword [esp + 0x20], 0
je 0x418f8e
mov ecx, dword [ebx + 8]
push 0xffff000d
call fcn.004111a0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop ebp
mov ecx, dword [esp + 0x190]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00451800
add esp, 0x188
ret 4
mov ecx, dword [ebx + 8]
push 0xffff000d
call fcn.004111a0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x418f9a
mov ecx, dword [ebx + 8]
push 0xffff000d
call fcn.004111a0
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x418f9a
mov ecx, dword [ebx + 8]
push 0xffff000d
call fcn.004111a0
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x418f9a