Function at 0x415870
Capabilities:
Create thread

Disassembly:
sub esp, 0x10c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x124]
push 0x3a
push edi
call fcn.0044f470
mov esi, dword [esp + 0x128]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esp, 8
test eax, eax
je 0x415951
mov eax, dword [esp + 0x128]
push 0
push eax
lea ecx, [esp + 0x18]
push ecx
push 0
push DirectSoundCreate
push edi
push 0
push 0x4eb920
call fcn.00405350
add esp, 0x20
cmp eax, 0xffffffff
je 0x415951
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call ebx
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4158fc
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esi + 0xc]
push edx
call ebx
mov dword [esi + 0xc], 0
mov dword [esi], 0
push 0x4eb920
lea eax, [esi + 0x20]
push eax
call ebp
push edi
lea ecx, [esi + 0x124]
push ecx
call ebp
lea edx, [esi + 0x10]
push edx
push 0
push esi
push 0x415690
push 0
push 0
mov dword [esi], 1
call fcn.0044f2cb
add esp, 0x18
test eax, eax
mov dword [esi + 0xc], eax
je 0x415957
mov ecx, dword [esi + 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10c
ret
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [0xd0a5a0]
test al, al
je 0x4159f3
mov edx, dword [esp + 0x128]
push 0
push edx
lea eax, [esp + 0x18]
push eax
push 0
push DirectSoundCreate
push edi
push 0
push 0xd0a5a0
call fcn.00405350
add esp, 0x20
cmp eax, 0xffffffff
je 0x4159f3
push eax
call ebx
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4159b5
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0xc]
push ecx
call ebx
mov dword [esi + 0xc], 0
mov dword [esi], 0
push 0xd0a5a0
lea edx, [esi + 0x20]
push edx
call ebp
push edi
lea eax, [esi + 0x124]
push eax
call ebp
lea ecx, [esi + 0x10]
push ecx
push 0
push esi
push 0x415690
push 0
push 0
mov dword [esi], 1
call fcn.0044f2cb
add esp, 0x18
test eax, eax
mov dword [esi + 0xc], eax
jne 0x415b99
mov eax, dword [0xd0a7a8]
test eax, eax
mov dword [esp + 0x10], 0
jle 0x415aa1
mov ebx, 0x8eea50
mov eax, dword [esp + 0x128]
push 0
push eax
lea ecx, [esp + 0x1c]
push ecx
push 0
push DirectSoundCreate
push edi
push 0
push ebx
call fcn.00405350
add esp, 0x20
cmp eax, 0xffffffff
je 0x415a7e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00415760
add esp, 4
push ebx
lea edx, [esi + 0x20]
push edx
call ebp
push edi
lea eax, [esi + 0x124]
push eax
call ebp
lea ecx, [esi + 0x10]
push ecx
push 0
push esi
push 0x415690
push 0
push 0
mov dword [esi], 1
call fcn.0044f2cb
add esp, 0x18
test eax, eax
mov dword [esi + 0xc], eax
jne 0x415b99
mov eax, dword [esp + 0x10]
mov ecx, dword [0xd0a7a8]
inc eax
add ebx, 0x104
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x415a0d
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [0xd09f80]
test al, al
je 0x415b1b
mov eax, dword [esp + 0x128]
push 0
push eax
lea ecx, [esp + 0x1c]
push ecx
push 0
push DirectSoundCreate
push edi
push 0
push 0xd09f80
call fcn.00405350
add esp, 0x20
cmp eax, 0xffffffff
je 0x415b1b
push eax
call ebx
push esi
call fcn.00415760
add esp, 4
push 0xd09f80
lea edx, [esi + 0x20]
push edx
call ebp
push edi
lea eax, [esi + 0x124]
push eax
call ebp
lea ecx, [esi + 0x10]
push ecx
push 0
push esi
push 0x415690
push 0
push 0
mov dword [esi], 1
call fcn.0044f2cb
add esp, 0x18
test eax, eax
mov dword [esi + 0xc], eax
jne 0x415b99
mov al, byte [0xd0a28c]
test al, al
je 0x415bb4
mov eax, dword [esp + 0x128]
push 0
push eax
lea ecx, [esp + 0x1c]
push ecx
push 0
push DirectSoundCreate
push edi
push 0
push 0xd0a28c
call fcn.00405350
add esp, 0x20
cmp eax, 0xffffffff
je 0x415bb4
push eax
call ebx
push esi
call fcn.00415760
add esp, 4
push 0xd0a28c
lea edx, [esi + 0x20]
push edx
call ebp
push edi
lea eax, [esi + 0x124]
push eax
call ebp
lea ecx, [esi + 0x10]
push ecx
push 0
push esi
push 0x415690
push 0
push 0
mov dword [esi], 1
call fcn.0044f2cb
add esp, 0x18
test eax, eax
mov dword [esi + 0xc], eax
je 0x415bb4
mov edx, dword [esi + 0x14]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10c
ret
mov ebx, dword [esp + 0x128]
push ebx
push edi
push 0xd0a084
push esi
call fcn.004157b0
add esp, 0x10
test eax, eax
jne 0x415c69
mov al, byte [0xd0a188]
test al, al
je 0x415bf0
push ebx
push edi
push 0xd0a188
push esi
call fcn.004157b0
add esp, 0x10
test eax, eax
jne 0x415c69
mov al, byte [0xd0a394]
test al, al
je 0x415c0d
push ebx
push edi
push 0xd0a394
push esi
call fcn.004157b0
add esp, 0x10
test eax, eax
jne 0x415c69
mov al, byte [0xd0a398]
test al, al
je 0x415c2a
push ebx
push edi
push 0xd0a398
push esi
call fcn.004157b0
add esp, 0x10
test eax, eax
jne 0x415c69
mov al, byte [0xd0a49c]
test al, al
je 0x415c47
push ebx
push edi
push 0xd0a49c
push esi
call fcn.004157b0
add esp, 0x10
test eax, eax
jne 0x415c69
push edi
lea eax, [esp + 0x1c]
push str.File_Not_Found._n_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
push 0xd09bfc
call ebp
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret