Function at 0x40c010
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc54
mov eax, dword [0x43e090]
xor eax, esp
mov dword [esp + 0xc50], eax
mov edx, dword [0x4403b4]
mov ecx, dword [0x23587fc]
push ebx
push esi
push edi
xor ebx, ebx
xor eax, eax
mov edi, 0xec58acac
or esi, 0xffffffff
cmp eax, 0x180
jne 0x40c052
lea ecx, [edx + 0xa231]
cmp ecx, 0x141
jne 0x40c066
mov dword [0x441250], edi
mov dword [0x441254], esi
inc eax
cmp eax, 0x12376ec
jl 0x40c045
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x23587fc], ecx
xor esi, esi
lea esp, [esp]
cmp esi, 0x562d05
jne 0x40c092
mov eax, dword [0x43efa8]
mov dword [0x235892c], eax
cmp ecx, 0x3c
jne 0x40c0a1
push ebx
push ebx
call edi
mov ecx, dword [0x23587fc]
inc esi
cmp esi, 0x5f6c74
jl 0x40c080
cmp ecx, 0x7c
jne 0x40c17d
push ebx
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push ebx
lea eax, [esp + 0x28]
push eax
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
xor edx, edx
xor ecx, ecx
mov word [esp + 0x12], dx
xor eax, eax
mov word [esp + 0xe], cx
lea edx, [esp + 0x28]
push edx
mov word [esp + 0x10], ax
mov eax, dword [esp + 0x10]
push eax
mov word [esp + 0x18], cx
mov ecx, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x20]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputA]
lea eax, [esp + 0x58]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push ebx
lea ecx, [esp + 0x45c]
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, [esp + 0x1c]
push edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_InterlockedPushEntrySList]
cmp dword [0x23587fc], 0x2d
jne 0x40c15f
push ebx
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x43c664
push 0x4411c8
call fcn.00401ed2
push ebx
call fcn.0040201f
mov ecx, dword [0x23587fc]
add esp, 0xc
cmp ecx, 0x110a
jne 0x40c23b
push ebx
push ebx
mov dword [0x23587f0], ebx
mov dword [0x23587f4], ebx
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetLocaleInfoA]
mov eax, dword [esp + 0x14]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetConsoleScreenBufferSize]
push ebx
push ebx
lea ecx, [esp + 0x60]
push ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesA]
push ebx
push ebx
push ebx
lea edx, [esp + 0x464]
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, [esp + 0x34]
mov dword [esp + 0x4c], 7
mov dword [esp + 0x48], ebx
mov word [esp + 0x38], ax
call fcn.00401060
call fcn.004088a4
push ebx
push ebx
call fcn.00402035
push ebx
call fcn.00401e08
add esp, 0xc
push ebx
call fcn.00401c23
add esp, 4
cmp dword [esp + 0x48], 8
jb 0x40c23b
mov ecx, dword [esp + 0x34]
push ecx
call fcn.00401f97
add esp, 4
call fcn.0040bc80
xor esi, esi
cmp dword [0x23587fc], ebx
jbe 0x40c2a8
mov edi, dword [sym.imp.KERNEL32.dll_CommConfigDialogW]
mov ebx, 0x19b0
jmp 0x40c260
mov edx, dword [0x235892c]
mov dword [esp + 0xc], edx
mov eax, 0xa231
add dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
mov cl, byte [eax + esi]
mov edx, dword [0x2358644]
mov byte [edx + esi], cl
cmp dword [0x23587fc], 0x5ab
jne 0x40c29d
push 0
push 0
push 0
call edi
mov dword [0x2358648], ebx
inc esi
cmp esi, dword [0x23587fc]
jb 0x40c260
xor ebx, ebx
push 0x43c66c
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
call fcn.0040bcf0
call fcn.0040bcc0
call fcn.0040bf90
xor eax, eax
cmp eax, 0xd606b
jne 0x40c2d0
call fcn.0040bcb0
inc eax
cmp eax, 0x24e87d
jl 0x40c2c4
mov ecx, dword [esp + 0x38]
xor eax, eax
mov edi, edi
cmp eax, 0x408e
jle 0x40c2ef
cmp ecx, 0xf5bed7
jne 0x40c2f7
inc eax
cmp eax, 0x687ed2
jl 0x40c2e0
mov esi, dword [sym.imp.KERNEL32.dll_EnumTimeFormatsW]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [esp + 0x10], 0x1e4165
mov ebx, 0x8e46a6f0
cmp dword [0x23587fc], 0xcc1
jne 0x40c324
push 0
push 0
push 0
call esi
cmp dword [0x23587fc], 0x7c4
mov dword [0x23587f8], ebx
jne 0x40c338
call edi
sub dword [esp + 0x10], 1
jne 0x40c310
mov ecx, dword [esp + 0xc5c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00401bb7
mov esp, ebp
pop ebp
ret