Function at 0x410160
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x481d73
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x4a8f7c]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4a8f7c]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov esi, dword [esp + 0x90]
mov ebx, ecx
lea ecx, [esp + 0x14]
call fcn.00413b20
xor edi, edi
mov dword [esp + 0x88], edi
cmp esi, edi
je 0x410204
mov eax, dword [ebx + 0x70]
cmp eax, edi
je 0x4101c4
push eax
call fcn.00451890
add esp, 4
push edi
push 0x20
push 3
push edi
push edi
push DirectSoundCreate
push esi
mov dword [ebx + 0x70], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x410204
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea eax, [esp + 0x1c]
push eax
push 0x10
lea ecx, [esp + 0x40]
push ecx
push esi
call ebp
cmp dword [esp + 0x38], edi
je 0x41021f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x14]
mov dword [esp + 0x88], 0xffffffff
call fcn.00413ce0
xor eax, eax
jmp 0x41047b
mov eax, dword [esp + 0x94]
cmp dword [esp + 0x3c], eax
jbe 0x4101fd
push 1
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [eax*4]
push edx
push esi
call edi
push 0
lea eax, [esp + 0x1c]
push eax
push 4
lea ecx, [esp + 0x30]
push ecx
push esi
call ebp
mov eax, dword [esp + 0x24]
cmp eax, 0xffffffff
je 0x4101fd
mov edx, dword [esp + 0x3c]
push 0
push 0
lea eax, [eax + edx*4 + 0x10]
push eax
push esi
call edi
push 0
lea ecx, [esp + 0x1c]
push ecx
push 0x24
lea edx, [esp + 0x64]
push edx
push esi
call ebp
mov eax, dword [esp + 0x34]
sub eax, 1
je 0x410356
sub eax, 1
jne 0x410462
push eax
lea eax, [esp + 0x1c]
push eax
push 0x14
lea ecx, [esp + 0x50]
push ecx
push esi
call ebp
mov edx, dword [esp + 0x48]
push edx
call fcn.00451980
mov edi, eax
add esp, 4
test edi, edi
je 0x4101fd
mov ecx, dword [esp + 0x48]
push 0
lea eax, [esp + 0x1c]
push eax
push ecx
push edi
push esi
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x50]
imul esi, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
push 0
push edx
lea eax, [esi*4]
push eax
push edi
lea ecx, [esp + 0x24]
call fcn.00413b30
push edi
call fcn.00451890
add esp, 4
lea ecx, [esp + 0x14]
call fcn.00413cd0
push esi
mov edi, eax
call fcn.00451980
add esp, 4
mov dword [ebx + 0x70], eax
test eax, eax
jne 0x410323
lea ecx, [esp + 0x14]
call fcn.00413cb0
jmp 0x410204
xor eax, eax
test esi, esi
jbe 0x410348
lea ecx, [edi + 2]
lea esp, [esp]
mov edx, dword [ebx + 0x70]
mov dword [esp + 0x1c], ebx
mov bl, byte [ecx]
mov byte [eax + edx], bl
mov ebx, dword [esp + 0x1c]
inc eax
add ecx, 4
cmp eax, esi
jb 0x410330
lea ecx, [esp + 0x14]
call fcn.00413cb0
jmp 0x410462
push 0xc
call fcn.00451980
add esp, 4
mov dword [esp + 0x20], eax
mov byte [esp + 0x88], 1
test eax, eax
je 0x41037b
mov ecx, eax
call fcn.00411e00
mov edi, eax
jmp 0x41037d
xor edi, edi
mov byte [esp + 0x88], 0
test edi, edi
je 0x4101fd
mov eax, dword [esp + 0x78]
push eax
call fcn.00451980
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
je 0x4101fd
mov edx, dword [esp + 0x78]
push 0
lea ecx, [esp + 0x1c]
push ecx
push edx
push eax
push esi
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x78]
mov ebp, dword [esp + 0x1c]
lea eax, [esp + 0x28]
push eax
push ecx
push ebp
mov ecx, edi
call fcn.00411e40
test eax, eax
jne 0x4103f5
push ebp
call fcn.00451890
add esp, 4
mov ecx, edi
call fcn.00412020
push edi
call fcn.00451890
add esp, 4
jmp 0x410204
mov esi, dword [esp + 0x2c]
imul esi, dword [esp + 0x28]
push esi
call fcn.00451980
add esp, 4
mov dword [ebx + 0x70], eax
test eax, eax
je 0x4103d7
xor eax, eax
test esi, esi
jbe 0x410442
xor ecx, ecx
jmp 0x410420
mov edx, dword [ebx + 0x70]
mov ebp, dword [esp + 0x30]
mov dword [esp + 0x20], ebx
mov bl, byte [ecx + ebp + 2]
mov byte [eax + edx], bl
mov ebx, dword [esp + 0x20]
inc eax
add ecx, 3
cmp eax, esi
jb 0x410420
mov ebp, dword [esp + 0x1c]
push ebp
call fcn.00451890
add esp, 4
mov ecx, edi
call fcn.00411e10
mov ecx, edi
call fcn.00412020
push edi
call fcn.00451890
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x88], 0xffffffff
call fcn.00413ce0
mov eax, 1
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.00451800
add esp, 0x78
ret 8