Function at 0x402580
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x408c6c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x11c
push ebx
push esi
push edi
mov ebx, ecx
mov dword [esp + 0x1c], 0
mov eax, dword [esp + 0x13c]
mov edi, 1
test eax, eax
mov dword [esp + 0x130], edi
jne 0x4025f8
mov esi, dword [esp + 0x138]
push 0x40d6f0
mov ecx, esi
call sub.MFC42.DLL_CString::CString_2
mov dword [esp + 0x1c], edi
mov eax, dword [esp + 0x13c]
mov byte [esp + 0x130], 0
test eax, eax
je 0x4027e0
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x4027e0
push ecx
mov dword [esp + 0x24], esp
mov edi, esp
push 0xc
call sub.MFC42.DLL_operatornew
mov esi, eax
add esp, 4
mov dword [esp + 0x1c], esi
test esi, esi
mov byte [esp + 0x134], 2
je 0x40264e
push str.FilePath
mov dword [esi + 4], 0
mov dword [esi + 8], 1
call fcn.00408737
test eax, eax
mov dword [esi], eax
jne 0x402650
mov edx, str.FilePath
test edx, edx
je 0x402650
push 0x8007000e
call fcn.0040868a
jmp 0x402650
xor esi, esi
test esi, esi
mov byte [esp + 0x134], 1
mov dword [edi], esi
jne 0x402668
push 0x8007000e
call fcn.0040868a
lea eax, [esp + 0x14]
lea ecx, [esp + 0x140]
push eax
mov byte [esp + 0x138], 1
call fcn.00402b50
mov ecx, eax
call fcn.004029b0
push ecx
mov ecx, dword [esp + 0x14]
mov eax, esp
mov byte [esp + 0x134], 4
mov dword [esp + 0x1c], esp
mov dword [eax], ecx
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4026ab
mov edx, dword [eax]
push eax
call dword [edx + 4]
lea eax, [esp + 0x10]
mov ecx, ebx
push eax
call fcn.004016f0
lea ecx, [esp + 0x14]
mov byte [esp + 0x130], 5
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [esp + 0xc]
mov esi, dword [sym.imp.MSVCRT.dll__mbscmp]
push 0x40d6f0
push ecx
mov byte [esp + 0x138], 6
call esi
add esp, 8
test eax, eax
je 0x402774
lea edx, [esp + 0xc]
lea ecx, [esp + 0x14]
push edx
call sub.MFC42.DLL_CString::operator_1
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push str.Type
call sub.MFC42.DLL_CString::CString_2
push ecx
lea eax, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x20], esp
push eax
call fcn.00402b30
lea ecx, [esp + 0x28]
push ecx
mov ecx, ebx
call fcn.00401320
mov eax, dword [eax]
push 0x40d090
push eax
call esi
add esp, 8
lea ecx, [esp + 0x20]
test eax, eax
sete bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x402774
lea edx, [esp + 0x24]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x24]
push eax
push ecx
lea edx, [esp + 0x1c]
push str._s_s
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
mov esi, dword [esp + 0x138]
lea eax, [esp + 0x14]
push eax
mov ecx, esi
call sub.MFC42.DLL_CString::CString_3
lea ecx, [esp + 0x14]
mov dword [esp + 0x1c], 1
mov byte [esp + 0x130], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov byte [esp + 0x130], 4
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x10]
mov byte [esp + 0x130], 1
test eax, eax
je 0x4027c7
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x13c]
mov byte [esp + 0x130], 0
test eax, eax
je 0x4027e0
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov ecx, dword [esp + 0x128]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x128
ret 8