Function at 0x40f490
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46fa53
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x4ae44c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov esi, dword [ebp + 8]
push 1
push 0
push 0
lea eax, [ebp - 0x20]
push eax
mov ecx, esi
call fcn.004626e0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x10]
push ecx
mov ecx, esi
call fcn.0045d8b0
mov byte [ebp - 4], 1
lea edx, [ebp + 8]
push edx
mov ecx, esi
call fcn.00462900
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x18]
call dword [0x4824e8]
mov bl, 3
mov byte [ebp - 4], bl
push 0x104
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer_1]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::ReleaseBuffer]
push 0x5c
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::TrimRight_2]
cmp byte [ebp + 0xc], 0
jne 0x40f5c6
lea ecx, [ebp - 0x1c]
call dword [0x4824e8]
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x20]
push eax
lea ecx, [ebp - 0x1c]
push 0xff
push ecx
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::FormatMessageW]
mov ecx, dword [edi + 0x1a4]
add esp, 0xc
lea edx, [ebp - 0x1c]
push edx
call fcn.0044fc10
lea ecx, [ebp + 0xc]
call dword [0x4824e8]
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x20]
push eax
lea ecx, [ebp + 0xc]
push 0x100
push ecx
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::FormatMessageW]
mov ecx, dword [edi + 0x1a4]
add esp, 0xc
lea edx, [ebp + 0xc]
push edx
call fcn.0044fca0
call fcn.0042def0
mov byte [eax + 0x815], 1
mov byte [ebp - 4], 4
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
jmp 0x40f618
push 0x18
mov ecx, esi
call fcn.0045fe90
test al, al
je 0x40f60c
lea eax, [ebp + 0xc]
push esi
push eax
call fcn.0042def0
mov ecx, eax
call fcn.004244b0
mov byte [ebp - 4], 6
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp + 8]
push str._s__sms__f1__s_
push edx
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0xc
mov byte [ebp - 4], bl
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
jmp 0x40f618
call fcn.0042def0
mov byte [eax + 0x815], 1
push 0x19
mov ecx, esi
mov dword [ebp - 0x14], 0
call fcn.0045fe90
test al, al
je 0x40f6a9
lea ecx, [ebp + 0xc]
call dword [0x4824e8]
mov byte [ebp - 4], 7
push 0
push 0x484ea8
lea ecx, [ebp - 0x10]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Find]
mov ecx, dword [ebp - 0x10]
cmp eax, 0xffffffff
mov eax, dword [ebp + 8]
push eax
lea edx, [ebp + 0xc]
push ecx
je 0x40f660
push str.__s___s
jmp 0x40f665
push str._s__s
push edx
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0x10
push 1
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer]
push eax
push 0
call fcn.0042def0
mov ecx, eax
call fcn.00422a30
push 0xffffffffffffffff
lea ecx, [ebp + 0xc]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::ReleaseBuffer]
mov byte [ebp - 4], bl
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
jmp 0x40f6e8
push 1
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp + 8]
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer]
push eax
lea ecx, [ebp - 0x10]
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer]
push eax
call fcn.0042def0
mov ecx, eax
call fcn.00422a30
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::ReleaseBuffer]
push 0xffffffffffffffff
lea ecx, [ebp + 8]
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::ReleaseBuffer]
call fcn.0042def0
mov byte [eax + 0x815], 0
mov edx, dword [ebp - 0x14]
push esi
push edx
call fcn.0042def0
mov ecx, eax
call fcn.00427da0
push 1
push 0
push 0
lea eax, [ebp + 0xc]
push eax
mov ecx, esi
call fcn.004626e0
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0x14]
mov edx, dword [eax]
push 0x483b88
push ecx
push str.__was
push edx
push str.RunProgram_exit_code_for__
push 0x485628
call fcn.00459000
push eax
call fcn.0045a050
add esp, 0x1c
mov byte [ebp - 4], bl
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
push 0x482e5c
lea ecx, [ebp + 0xc]
call dword [0x4824d0]
mov byte [ebp - 4], 9
mov ecx, dword [edi + 0x1a4]
lea eax, [ebp + 0xc]
push eax
call fcn.0044fc10
mov byte [ebp - 4], bl
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
push 0x482e5c
lea ecx, [ebp + 0xc]
call dword [0x4824d0]
mov byte [ebp - 4], 0xa
lea ecx, [ebp + 0xc]
push ecx
mov ecx, dword [edi + 0x1a4]
call fcn.0044fca0
mov byte [ebp - 4], bl
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40f7bb
cmp eax, 0xbc2
je 0x40f7bb
xor cl, cl
jmp 0x40f7bd
mov cl, 1
cmp dword [ebp - 0x1c], 0
setne al
test al, al
je 0x40f7d0
test cl, cl
je 0x40f7d0
mov bl, 1
jmp 0x40f7d2
xor bl, bl
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov byte [ebp - 4], 1
lea ecx, [ebp + 8]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8