Function at 0x401db0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x727ccc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa8
mov al, byte [ecx + 0x2a8]
test al, al
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x18], ecx
je 0x401de4
xor eax, eax
jmp 0x40270e
mov esi, dword [esp + 0xc8]
mov edi, dword [sym.imp.MSVCRT.dll_strstr]
push str.Vo_
push esi
call edi
add esp, 8
test eax, eax
jne 0x401e22
push str._vo_
push esi
call edi
add esp, 8
test eax, eax
jne 0x401e22
push str.VO_
push esi
call edi
add esp, 8
test eax, eax
je 0x401eff
push 0x2e
push esi
call dword [sym.imp.MSVCRT.dll_strrchr]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x401e53
push str..wav
push ebx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x401e53
mov byte [ebx + 1], 0x6d
mov byte [ebx + 2], 0x70
mov byte [ebx + 3], 0x33
mov ecx, 0x7cb478
call fcn.004d5220
mov ebp, eax
push ebp
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
or ecx, 0xffffffff
xor eax, eax
mov edi, 0x774bc4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
or ecx, 0xffffffff
mov esi, edi
mov edi, ebp
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0xc8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
or ecx, 0xffffffff
mov esi, edi
mov edi, ebp
repne scasb al, byte es:[edi]
mov ecx, edx
shr ecx, 2
dec edi
rep movsd dword es:[edi], dword [esi]
push eax
mov eax, dword [esp + 0xcc]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
cmp eax, 0xffffffff
jne 0x40226e
mov ecx, dword [esp + 0xc8]
push ecx
push str.MP3_Voice_file_not_found:__s_r_n
call fcn.00477400
add esp, 8
test ebx, ebx
je 0x401eff
mov byte [ebx + 1], 0x77
mov byte [ebx + 2], 0x61
mov byte [ebx + 3], 0x76
mov esi, dword [esp + 0xc8]
push 0
push esi
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
cmp eax, 0xffffffff
jne 0x401f2c
push esi
push str.Sound_file_not_found:__s_r_n
call fcn.00477400
add esp, 8
xor eax, eax
jmp 0x40270e
push 0x10000
push 0
push esi
call dword [sym.imp.WINMM.dll_mmioOpenA]
mov esi, eax
test esi, esi
je 0x40270e
mov edi, dword [sym.imp.WINMM.dll_mmioDescend]
push 0
push 0
lea edx, [esp + 0x64]
push edx
push esi
call edi
push 0x10
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x50]
push ecx
push esi
mov dword [esp + 0x58], 0x20746d66
call edi
push 0x58
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov ebp, eax
push 0x10
lea ebx, [ebp + 8]
push ebx
push esi
mov byte [ebp + 0x40], 0
call dword [sym.imp.WINMM.dll_mmioRead]
push 0
lea edx, [esp + 0x4c]
push edx
push esi
mov word [ebp + 0x18], 0
call dword [sym.imp.WINMM.dll_mmioAscend]
push 0x10
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x50]
push ecx
push esi
mov dword [esp + 0x58], 0x61746164
call edi
lea edx, [ebp + 0x1c]
xor eax, eax
mov ecx, 9
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [ebp + 0x48], eax
mov al, byte [esp + 0xcc]
test al, al
mov dword [edx], 0x24
je 0x401ff3
mov eax, dword [esp + 0x18]
cmp byte [eax + 0x18], 1
jle 0x401fea
mov dword [ebp + 0x20], 0x300b0
jmp 0x401ffe
mov dword [ebp + 0x20], 0xe0
jmp 0x401ffe
mov eax, dword [esp + 0x18]
mov dword [ebp + 0x20], 0xa0
mov ecx, dword [esp + 0x4c]
mov dword [ebp + 0x2c], ebx
xor ebx, ebx
mov dword [ebp + 0x24], ecx
mov dword [ebp + 0x44], ebx
test byte [eax + 4], 4
je 0x40201a
or dword [ebp + 0x20], 0x40000
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
push ebx
lea edi, [esp + 0x24]
push edi
push edx
push eax
call dword [ecx + 0xc]
cmp eax, ebx
jge 0x402158
cmp eax, 0x8878000a
jne 0x40204b
mov edx, dword [esp + 0xc8]
push edx
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_ALLOCATED
jmp 0x402140
cmp eax, 0x88780064
jne 0x402064
mov eax, dword [esp + 0xc8]
push eax
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_BADFORMAT
jmp 0x402140
cmp eax, 0x887800b4
jne 0x40207d
mov ecx, dword [esp + 0xc8]
push ecx
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_BUFFERTOOSMALL
jmp 0x402140
cmp eax, 0x8878001e
jne 0x402096
mov edx, dword [esp + 0xc8]
push edx
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_CONTROLUNAVAIL
jmp 0x402140
cmp eax, 0x887800be
jne 0x4020af
mov eax, dword [esp + 0xc8]
push eax
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_DS8_REQUIRED
jmp 0x402140
cmp eax, 0x88780032
jne 0x4020c5
mov ecx, dword [esp + 0xc8]
push ecx
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_INVALIDCALL
jmp 0x402140
cmp eax, 0x80070057
jne 0x4020db
mov edx, dword [esp + 0xc8]
push edx
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_INVALIDPARAM
jmp 0x402140
cmp eax, 0x80040110
jne 0x4020f1
mov eax, dword [esp + 0xc8]
push eax
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_NOAGGREGATION
jmp 0x402140
cmp eax, 0x8007000e
jne 0x402107
mov ecx, dword [esp + 0xc8]
push ecx
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_OUTOFMEMORY
jmp 0x402140
cmp eax, 0x887800aa
jne 0x40211d
mov edx, dword [esp + 0xc8]
push edx
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_UNINITIALIZED
jmp 0x402140
cmp eax, 0x80004001
jne 0x402133
mov eax, dword [esp + 0xc8]
push eax
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_UNSUPPORTED
jmp 0x402140
mov ecx, dword [esp + 0xc8]
push ecx
push str.DirectSound_CreateSoundBuffer_failed___s___Unknown_Error_Code
call fcn.006e9a00
add esp, 8
push ebp
call fcn.00727530
add esp, 4
xor eax, eax
jmp 0x40270e
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
push 2
push ebx
push ebx
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x48]
push ecx
push ebx
push ebx
push eax
call dword [edx + 0x2c]
test eax, eax
jge 0x40218b
mov edx, dword [esp + 0xc8]
push edx
push str.DirectSound_Lock_failed___s_._r_n
call fcn.00476e20
add esp, 8
push ebx
lea eax, [esp + 0x74]
push eax
push esi
call dword [sym.imp.WINMM.dll_mmioGetInfo]
cmp dword [esp + 0x4c], ebx
jbe 0x4021e6
mov edi, dword [sym.imp.WINMM.dll_mmioAdvance]
mov ecx, dword [esp + 0x8c]
cmp ecx, dword [esp + 0x90]
jne 0x4021be
push 0
lea edx, [esp + 0x74]
push edx
push esi
call edi
mov eax, dword [esp + 0x8c]
mov cl, byte [eax]
mov edx, dword [esp + 0x38]
mov byte [ebx + edx], cl
mov edx, dword [esp + 0x8c]
mov eax, dword [esp + 0x4c]
inc edx
inc ebx
cmp ebx, eax
mov dword [esp + 0x8c], edx
jb 0x4021a4
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
push 0
push 0
push edx
mov edx, dword [esp + 0x44]
push edx
push eax
call dword [ecx + 0x4c]
test eax, eax
jge 0x402217
mov eax, dword [esp + 0xc8]
push eax
push str.DirectSound_Unlock_failed___s_._r_n
call fcn.00476e20
add esp, 8
push 0
push esi
call dword [sym.imp.WINMM.dll_mmioClose]
mov al, byte [esp + 0xcc]
test al, al
je 0x40225b
mov ecx, dword [esp + 0x18]
cmp byte [ecx + 0x18], 1
jle 0x40225b
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
lea ecx, [esp + 0x14]
push ecx
push 0x74b788
push eax
call dword [edx]
mov edx, dword [esp + 0x14]
mov dword [ebp + 4], edx
mov eax, dword [esp + 0x20]
mov dword [ebp], eax
jmp 0x40270c
mov dword [ebp + 4], 0
mov eax, dword [esp + 0x20]
mov dword [ebp], eax
jmp 0x40270c
push 0x1c
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x2c], eax
xor edi, edi
cmp eax, edi
mov dword [esp + 0xc0], edi
je 0x402295
push ebp
mov ecx, eax
call fcn.00427780
mov ebx, eax
jmp 0x402297
xor ebx, ebx
or esi, 0xffffffff
push 0x58
mov dword [esp + 0x2c], ebx
mov dword [esp + 0xc4], esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebp, eax
mov eax, dword [ebx + 0xc]
add esp, 4
cmp eax, edi
je 0x4026ed
push 0x413c
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, edi
mov dword [esp + 0xc0], 1
je 0x4022ea
push ebx
mov ecx, eax
call fcn.00425d10
mov dword [esp + 0x10], eax
jmp 0x4022ee
mov dword [esp + 0x10], edi
mov eax, dword [ebx]
cmp eax, edi
mov dword [esp + 0xc0], esi
jne 0x402302
xor eax, eax
jmp 0x40270e
lea ecx, [eax + eax*8]
shl ecx, 8
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
mov eax, dword [ebx]
lea ecx, [eax + eax*8]
shl ecx, 8
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebx]
shl eax, 1
push eax
mov dword [esp + 0x38], esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
mov dword [ebp + 0x44], edi
mov ecx, dword [ebx]
shl ecx, 1
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebx]
add esp, 8
dec eax
test eax, eax
mov dword [esp + 0x24], 0
jle 0x4023ea
mov dword [esp + 0x34], esi
mov ecx, dword [esp + 0x10]
call fcn.00425ec0
xor esi, esi
xor edi, edi
test eax, eax
je 0x4023cc
mov edx, dword [esp + 0x34]
mov ecx, eax
mov dword [esp + 0x14], 0x480
xor eax, eax
mov ax, word [ecx]
cmp ax, si
mov word [edx], ax
jge 0x40239b
mov esi, eax
jmp 0x4023a2
cmp ax, di
jle 0x4023a2
mov edi, eax
mov eax, dword [esp + 0x14]
add ecx, 2
add edx, 2
dec eax
mov dword [esp + 0x14], eax
jne 0x40238a
movsx ecx, si
movsx edx, di
neg ecx
cmp edx, ecx
jle 0x4023c1
mov esi, edi
mov eax, dword [ebp + 0x44]
mov ecx, dword [esp + 0x24]
mov word [eax + ecx*2], si
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x34]
mov edx, dword [ebx]
inc eax
add edi, 0x900
dec edx
cmp eax, edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], edi
jl 0x40236b
mov ebx, dword [esp + 0x18]
xor eax, eax
lea edx, [ebp + 0x1c]
mov ecx, 9
mov edi, edx
rep stosd dword es:[edi], eax
mov byte [ebp + 0x40], al
cmp byte [ebx + 0x18], 1
jle 0x40240e
mov dword [ebp + 0x20], 0x300b0
jmp 0x402415
mov dword [ebp + 0x20], 0xe0
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov dword [ebp + 0x48], ecx
mov eax, dword [eax]
mov eax, dword [eax]
lea eax, [eax + eax*8]
shl eax, 8
mov dword [ebp + 0x24], eax
test byte [ebx + 4], 4
je 0x402438
or dword [ebp + 0x20], 0x40000
mov esi, dword [esp + 0x28]
mov word [ebp + 0x18], cx
mov word [ebp + 0xa], 1
mov eax, dword [esi + 4]
mov eax, dword [eax + 8]
mov dword [ebp + 0xc], eax
shl eax, 1
push ecx
mov dword [ebp + 0x10], eax
lea eax, [ebp + 8]
lea ecx, [esp + 0x20]
push ecx
mov word [ebp + 0x16], 0x10
mov word [ebp + 0x14], 2
mov word [eax], 1
mov dword [ebp + 0x2c], eax
mov dword [edx], 0x24
mov eax, dword [ebx + 0xc]
mov edi, dword [eax]
push edx
push eax
call dword [edi + 0xc]
test eax, eax
jge 0x4025e8
cmp eax, 0x8878000a
jne 0x4024a2
mov edx, dword [esp + 0xc8]
push edx
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_ALLOCATED
jmp 0x402597
cmp eax, 0x88780064
jne 0x4024bb
mov eax, dword [esp + 0xc8]
push eax
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_BADFORMAT
jmp 0x402597
cmp eax, 0x887800b4
jne 0x4024d4
mov ecx, dword [esp + 0xc8]
push ecx
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_BUFFERTOOSMALL
jmp 0x402597
cmp eax, 0x8878001e
jne 0x4024ed
mov edx, dword [esp + 0xc8]
push edx
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_CONTROLUNAVAIL
jmp 0x402597
cmp eax, 0x887800be
jne 0x402506
mov eax, dword [esp + 0xc8]
push eax
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_DS8_REQUIRED
jmp 0x402597
cmp eax, 0x88780032
jne 0x40251c
mov ecx, dword [esp + 0xc8]
push ecx
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_INVALIDCALL
jmp 0x402597
cmp eax, 0x80070057
jne 0x402532
mov edx, dword [esp + 0xc8]
push edx
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_INVALIDPARAM
jmp 0x402597
cmp eax, 0x80040110
jne 0x402548
mov eax, dword [esp + 0xc8]
push eax
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_NOAGGREGATION
jmp 0x402597
cmp eax, 0x8007000e
jne 0x40255e
mov ecx, dword [esp + 0xc8]
push ecx
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_OUTOFMEMORY
jmp 0x402597
cmp eax, 0x887800aa
jne 0x402574
mov edx, dword [esp + 0xc8]
push edx
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_UNINITIALIZED
jmp 0x402597
cmp eax, 0x80004001
jne 0x40258a
mov eax, dword [esp + 0xc8]
push eax
push str.DirectSound_CreateSoundBuffer_failed___s___Error_Code:_DSERR_UNSUPPORTED
jmp 0x402597
mov ecx, dword [esp + 0xc8]
push ecx
push str.DirectSound_CreateSoundBuffer_failed___s___Unknown_Error_Code
call fcn.006e9a00
mov edx, dword [esp + 0x38]
add esp, 8
push edx
call fcn.00727530
add esp, 4
test esi, esi
je 0x4025c0
mov ecx, esi
call fcn.004277d0
push esi
call fcn.00727530
add esp, 4
mov esi, dword [esp + 0x10]
test esi, esi
je 0x4025d8
mov ecx, esi
call fcn.00425e60
push esi
call fcn.00727530
add esp, 4
push ebp
call fcn.00727530
add esp, 4
xor eax, eax
jmp 0x40270e
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
push 2
push 0
push 0
lea edx, [esp + 0x4c]
push edx
lea edx, [esp + 0x4c]
push edx
push 0
push 0
push eax
call dword [ecx + 0x2c]
test eax, eax
jge 0x40261f
mov eax, dword [esp + 0xc8]
push eax
push str.DirectSound_Lock_failed___s_._r_n
call fcn.00476e20
add esp, 8
mov ecx, dword [esp + 0x40]
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x30]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
push 0
push edx
mov edx, dword [esp + 0x48]
push edx
push eax
call dword [ecx + 0x4c]
test eax, eax
jge 0x40266a
mov eax, dword [esp + 0xc8]
push eax
push str.DirectSound_Unlock_failed___s_._r_n
call fcn.00476e20
add esp, 8
cmp byte [ebx + 0x18], 1
jle 0x40269e
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
lea edx, [esp + 0x2c]
push edx
push 0x74b788
push eax
call dword [ecx]
test eax, eax
jge 0x4026a6
mov eax, dword [esp + 0xc8]
push eax
push str.DirectSound_QueryInterface__DirectSound3DBuffer__failed___s_._r_n
call fcn.00476e20
add esp, 8
jmp 0x4026a6
mov dword [esp + 0x2c], 0
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x2c]
push eax
mov dword [ebp], ecx
mov dword [ebp + 4], edx
call fcn.00727530
mov esi, dword [esp + 0x2c]
add esp, 4
test esi, esi
je 0x4026d9
mov ecx, esi
call fcn.004277d0
push esi
call fcn.00727530
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x402701
mov esi, eax
mov ecx, esi
call fcn.00425e60
push esi
jmp 0x4026f9
cmp ebx, edi
je 0x402701
mov ecx, ebx
call fcn.004277d0
push ebx
call fcn.00727530
add esp, 4
mov eax, dword [ebp]
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x3c]
mov eax, ebp
mov ecx, dword [esp + 0xb8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xb4
ret 8