Function at 0x40be60
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc50
mov eax, dword [0x4a9090]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [0x4ab3b4]
mov ecx, dword [0x23c34dc]
push ebx
push esi
push edi
xor ebx, ebx
xor eax, eax
mov edi, 0xec58acac
or esi, 0xffffffff
mov edi, edi
cmp eax, 0x180
jne 0x40be9d
lea ecx, [edx + 0xa231]
cmp ecx, 0x141
jne 0x40beb1
mov dword [0x4abf30], edi
mov dword [0x4abf34], esi
inc eax
cmp eax, 0x12376ec
jl 0x40be90
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x23c34dc], ecx
xor esi, esi
cmp esi, 0x562d05
jne 0x40bed9
mov eax, dword [0x4a9fa8]
mov dword [0x23c360c], eax
cmp ecx, 0x3c
jne 0x40bee8
push ebx
push ebx
call edi
mov ecx, dword [0x23c34dc]
inc esi
cmp esi, 0x5f6c74
jl 0x40bec7
cmp ecx, 0x7c
jne 0x40bfe1
push ebx
lea ecx, [ebp - 0xc48]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
lea edx, [ebp - 0xc1c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push ebx
lea eax, [ebp - 0xc44]
push eax
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
xor edx, edx
xor ecx, ecx
mov word [ebp - 0xc32], dx
xor eax, eax
mov word [ebp - 0xc2e], cx
lea edx, [ebp - 0xc50]
push edx
mov word [ebp - 0xc30], ax
mov eax, dword [ebp - 0xc30]
push eax
mov word [ebp - 0xc34], cx
mov ecx, dword [ebp - 0xc34]
push ecx
lea edx, [ebp - 0xc38]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputA]
lea eax, [ebp - 0x404]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push ebx
lea ecx, [ebp - 0xc04]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_EnumDateFormatsA]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_HeapWalk]
push ebx
lea edx, [ebp - 0xc40]
push edx
mov dword [ebp - 0xc40], ebx
mov dword [ebp - 0xc3c], ebx
call dword [sym.imp.KERNEL32.dll_InterlockedPushEntrySList]
cmp dword [0x23c34dc], 0x2d
jne 0x40bfc3
push ebx
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x4a7394
push 0x4abea8
call fcn.00401ed2
push ebx
call fcn.0040201f
mov ecx, dword [0x23c34dc]
add esp, 0xc
cmp ecx, 0x110a
jne 0x40c0ab
push ebx
push ebx
mov dword [0x23c34d0], ebx
mov dword [0x23c34d4], ebx
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetLocaleInfoA]
mov eax, dword [ebp - 0xc38]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetConsoleScreenBufferSize]
push ebx
push ebx
lea ecx, [ebp - 0x404]
push ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesA]
push ebx
push ebx
push ebx
lea edx, [ebp - 0xc04]
push edx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CompareStringW]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_ActivateActCtx]
push ebx
push ebx
call fcn.00401d79
push ebx
push ebx
call fcn.00401d79
add esp, 0x10
xor eax, eax
push 1
lea esi, [ebp - 0xc20]
mov dword [ebp - 0xc08], 7
mov dword [ebp - 0xc0c], ebx
mov word [ebp - 0xc1c], ax
call fcn.00401060
call fcn.004088a4
push ebx
push ebx
call fcn.00402035
push ebx
call fcn.00401e08
push ebx
call fcn.00401c23
add esp, 0x10
cmp dword [ebp - 0xc08], 8
jb 0x40c0ab
mov ecx, dword [ebp - 0xc1c]
push ecx
call fcn.00401f97
add esp, 4
call fcn.0040bad0
xor esi, esi
cmp dword [0x23c34dc], ebx
jbe 0x40c11e
mov edi, dword [sym.imp.KERNEL32.dll_CommConfigDialogW]
mov ebx, 0x19b0
jmp 0x40c0d0
mov edx, dword [0x23c360c]
mov dword [ebp - 0xc30], edx
mov eax, 0xa231
add dword [ebp - 0xc30], eax
mov eax, dword [ebp - 0xc30]
mov cl, byte [eax + esi]
mov edx, dword [0x23c3324]
mov byte [edx + esi], cl
cmp dword [0x23c34dc], 0x5ab
jne 0x40c113
push 0
push 0
push 0
call edi
mov dword [0x23c3328], ebx
inc esi
cmp esi, dword [0x23c34dc]
jb 0x40c0d0
xor ebx, ebx
push 0x4a739c
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
call fcn.0040bb40
call fcn.0040bb10
call fcn.0040bde0
xor eax, eax
lea ebx, [ebx]
cmp eax, 0xd606b
jne 0x40c14c
call fcn.0040bb00
inc eax
cmp eax, 0x24e87d
jl 0x40c140
mov ecx, dword [ebp - 0xc24]
xor eax, eax
lea esp, [esp]
cmp eax, 0x408e
jle 0x40c16f
cmp ecx, 0xf5bed7
jne 0x40c177
inc eax
cmp eax, 0x687ed2
jl 0x40c160
mov esi, dword [sym.imp.KERNEL32.dll_EnumTimeFormatsW]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0xc34], 0x1e4165
mov ebx, 0x8e46a6f0
cmp dword [0x23c34dc], 0xcc1
jne 0x40c1a6
push 0
push 0
push 0
call esi
cmp dword [0x23c34dc], 0x7c4
mov dword [0x23c34d8], ebx
jne 0x40c1ba
call edi
sub dword [ebp - 0xc34], 1
jne 0x40c192
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401bb7
mov esp, ebp
pop ebp
ret