Function at 0x40f40a
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
sub esp, 0xa18
lea ebp, [esp - 4]
mov eax, dword [0x441028]
xor eax, ebp
mov dword [ebp + 0xa18], eax
push 0x14
mov eax, 0x42b8a8
call fcn.00429b62
and dword [ebp - 0x18], 0
push 0x5c
push 0x2f
mov esi, ecx
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Replace]
mov eax, dword [esi]
mov ebx, dword [sym.imp.MSVCR90.dll__wsplitpath_s]
mov edi, pe_nt_image_headers32
push edi
lea ecx, [ebp + 0x208]
push ecx
push edi
lea ecx, [ebp + 0x608]
push ecx
push edi
lea ecx, [ebp + 0x408]
push ecx
push 3
lea ecx, [ebp + 0xa10]
push ecx
push eax
call ebx
lea eax, [ebp + 0xa10]
add esp, 0x24
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x40f47b
sub eax, ecx
sar eax, 1
jne 0x40f6b4
lea eax, [ebp + 0x408]
push eax
lea ecx, [ebp - 0x14]
call dword [0x42f7ec]
and dword [ebp - 4], 0
lea eax, [ebp + 0x808]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax - 0xc]
cmp eax, 2
jle 0x40f4ef
push 3
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Left]
mov byte [ebp - 4], 1
push 0x433920
mov ecx, eax
mov dword [ebp - 0x18], 1
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Compare]
mov byte [ebp - 0xd], 1
test eax, eax
je 0x40f4f3
mov byte [ebp - 0xd], 0
and dword [ebp - 4], 0
test byte [ebp - 0x18], 1
je 0x40f50a
and dword [ebp - 0x18], 0xfffffffe
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
cmp byte [ebp - 0xd], 0
je 0x40f5fb
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], 2
jle 0x40f54f
push 3
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Left]
mov byte [ebp - 4], 2
or dword [ebp - 0x18], 2
push 0x433920
mov ecx, eax
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Compare]
test eax, eax
jne 0x40f54f
mov bl, 1
jmp 0x40f551
xor bl, bl
and dword [ebp - 4], 0
test byte [ebp - 0x18], 2
je 0x40f568
and dword [ebp - 0x18], 0xfffffffd
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
test bl, bl
je 0x40f5aa
push 0x433914
call edi
mov eax, dword [ebp - 0x14]
mov eax, dword [eax - 0xc]
add eax, 0xfffffffd
push eax
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Right]
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
jmp 0x40f51a
lea eax, [ebp]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp]
push eax
mov ecx, esi
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
push 0x5c
mov ecx, esi
call dword [0x42f62c]
lea eax, [ebp + 0x608]
push eax
mov ecx, esi
call dword [0x42f8b8]
lea eax, [ebp + 0x208]
push eax
mov ecx, esi
call dword [0x42f8b8]
lea eax, [ebp + 0x808]
push eax
call edi
jmp 0x40f6ab
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], 0
je 0x40f65a
push 0
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::operator__]
cmp ax, 0x5c
jne 0x40f65a
push edi
lea eax, [ebp + 0x208]
push eax
push edi
lea eax, [ebp + 0x608]
push eax
push edi
lea eax, [ebp + 0x408]
push eax
push 3
lea eax, [ebp + 0xa10]
push eax
lea eax, [ebp + 0x808]
push eax
call ebx
lea eax, [ebp + 0xa10]
push eax
lea eax, [ebp - 0x1c]
push eax
mov ecx, esi
call fcn.00406806
add esp, 0x2c
mov byte [ebp - 4], 4
jmp 0x40f699
lea eax, [ebp - 0x1c]
push 0x5c
push eax
call fcn.0040f77e
pop ecx
pop ecx
push eax
mov ecx, esi
mov byte [ebp - 4], 5
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea eax, [ebp + 0x808]
push eax
lea eax, [ebp - 0x1c]
push eax
mov ecx, esi
call fcn.00406806
pop ecx
pop ecx
mov byte [ebp - 4], 6
push eax
mov ecx, esi
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xa18]
xor ecx, ebp
call fcn.0042918e
add ebp, 0xa1c
leave
ret