Function at 0x40a824
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x75c
push ebx
push esi
push edi
call dword [sym.imp.WINMM.dll_waveOutGetNumDevs]
push dword [ebp + 8]
mov esi, eax
call fcn.0040992e
xor ebx, ebx
xor edi, edi
cmp esi, ebx
pop ecx
mov dword [ebp - 4], ebx
jbe 0x40a8aa
lea eax, [ebp - 0x38]
push 0x34
push eax
push edi
call dword [sym.imp.WINMM.dll_waveOutGetDevCapsA]
test eax, eax
jne 0x40a8a5
mov ax, word [ebp - 0x38]
cmp ax, word [ebp + 0xc]
jne 0x40a895
mov ax, word [ebp - 0x36]
cmp ax, word [ebp + 0x10]
jne 0x40a895
push dword [ebp + 0x18]
lea eax, [ebp - 0x30]
push eax
call fcn.00410cf0
pop ecx
test eax, eax
pop ecx
jne 0x40a895
mov eax, dword [ebp - 0x34]
or dword [ebp - 4], 1
cmp eax, dword [ebp + 0x14]
je 0x40a899
or dword [ebp - 4], 4
jmp 0x40a899
or dword [ebp - 4], 2
test byte [ebp - 4], 1
je 0x40a8a5
test byte [ebp - 4], 2
jne 0x40a8aa
inc edi
cmp edi, esi
jb 0x40a84c
mov eax, dword [ebp - 4]
test al, 1
je 0x40aa84
test al, 4
jne 0x40aa84
mov esi, dword [ebp + 0x1c]
cmp esi, ebx
je 0x40aa84
cmp dword [esi], ebx
je 0x40aa84
mov edi, 0x94
lea eax, [ebp - 0xcc]
push edi
push ebx
push eax
call fcn.00410eb0
add esp, 0xc
lea eax, [ebp - 0xcc]
mov dword [ebp - 0xcc], edi
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x40a90e
push ebx
push str.GetVersionEx
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40aa73
cmp dword [ebp - 0xbc], 2
jne 0x40aa81
mov edi, 0x104
lea eax, [ebp - 0x75c]
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40a93b
push ebx
push str.GetModuleFileName
jmp 0x40a903
and byte [ebp - 0x659], 0
lea eax, [ebp - 0x75c]
push 0x5c
push eax
call fcn.004121f0
pop ecx
cmp eax, ebx
pop ecx
je 0x40a959
inc eax
jmp 0x40a95f
lea eax, [ebp - 0x75c]
mov dword [ebp + 0xc], eax
lea eax, [ebp - 0x2d4]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp eax, ebx
je 0x40aa62
cmp eax, edi
jae 0x40aa6a
cmp byte [ebp - 0x2d4], 0
je 0x40a9a0
lea eax, [ebp - 0x2d4]
push eax
call fcn.00411260
cmp byte [ebp + eax - 0x2d5], 0x5c
pop ecx
je 0x40a9b3
lea eax, [ebp - 0x2d4]
push 0x434124
push eax
call fcn.00411120
pop ecx
pop ecx
lea eax, [ebp - 0x2d4]
push eax
call fcn.00411260
cmp dword [esi], 0
pop ecx
lea ebx, [ebp + eax - 0x2d4]
je 0x40aa81
mov edi, esi
push dword [esi]
push dword [ebp + 0xc]
call fcn.00411110
push dword [esi]
push ebx
call fcn.00411110
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x75c]
push eax
call fcn.004064b3
add esp, 0x18
test eax, eax
je 0x40aa4c
lea eax, [ebp - 0x554]
push eax
lea eax, [ebp - 0x2d4]
push eax
call fcn.004064b3
pop ecx
test eax, eax
pop ecx
je 0x40aa4c
lea eax, [ebp - 0x540]
push eax
lea eax, [ebp - 0x400]
push eax
call fcn.004064e8
pop ecx
test eax, eax
pop ecx
je 0x40aa5c
mov eax, dword [ebp - 0x3f8]
cmp eax, dword [ebp - 0x538]
jne 0x40aa5c
mov eax, dword [ebp - 0x3f4]
cmp eax, dword [ebp - 0x534]
jne 0x40aa5c
add edi, 4
mov esi, edi
cmp dword [edi], 0
jne 0x40a9d2
jmp 0x40aa81
or dword [ebp - 4], 4
jmp 0x40aa81
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40aa6d
push 0x7a
pop eax
push ebx
push str.GetSystemDirectory
push eax
push 1
push dword [ebp + 8]
call fcn.00409a6a
add esp, 0x14
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret