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

Disassembly:
push 0xffffffffffffffff
push 0x40f190
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x434
push ebp
push esi
lea eax, [esp + 0x3c]
push edi
push eax
mov ebp, ecx
push 0x3ff
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov cl, byte [esp + 0xf]
push 0
mov byte [esp + 0x14], cl
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edx, dword [esp + 0x450]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x18]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov dword [esp + 0x448], 0
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x407ca8
lea ecx, [esp + 0x10]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Freeze_void_]
mov ecx, dword [esp + 0x14]
mov eax, ecx
jmp 0x407cad
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
cmp byte [eax], 0x5c
je 0x407cd0
test ecx, ecx
je 0x407cc6
lea ecx, [esp + 0x10]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Freeze_void_]
mov eax, dword [esp + 0x14]
jmp 0x407ccb
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
cmp byte [eax], 0x2f
jne 0x407d21
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea ecx, [esp + 0x20]
mov eax, dword [edx]
push eax
push 1
push ecx
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0x448], 1
mov ecx, dword [edx]
push ecx
push 0
push eax
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x44c], 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x407c8e
mov edi, 0x41608c
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
repne scasb al, byte es:[edi]
mov edx, dword [edx]
not ecx
dec ecx
push ecx
push edx
push 0x41608c
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_last_of_char_const___unsigned_int__unsigned_int_const]
mov esi, eax
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov eax, dword [eax]
cmp esi, eax
je 0x407e17
push esi
lea ecx, [esp + 0x24]
push 0
push ecx
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
inc esi
lea ecx, [esp + 0x30]
mov byte [esp + 0x448], 2
mov eax, dword [edx]
push eax
push esi
push ecx
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0x448], 3
mov ecx, dword [edx]
push ecx
mov ecx, dword [esp + 0x458]
push 0
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov eax, dword [esp + 0x34]
mov byte [esp + 0x448], 2
test eax, eax
je 0x407ddc
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x407dd3
cmp al, 0xff
je 0x407dd3
dec al
mov byte [ecx], al
jmp 0x407ddc
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x407de9
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
mov ecx, ebp
call fcn.00407a70
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x407e2c
mov al, byte [ecx - 1]
test al, al
je 0x407e0b
cmp al, 0xff
je 0x407e0b
dec al
mov byte [ecx - 1], al
jmp 0x407e2c
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x407e2c
mov ecx, dword [esp + 0x454]
push eax
lea edx, [esp + 0x14]
push 0
push edx
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ecx, dword [esp + 0x14]
pop edi
pop esi
pop ebp
test ecx, ecx
je 0x407e73
mov al, byte [ecx - 1]
test al, al
je 0x407e69
cmp al, 0xff
je 0x407e69
dec al
mov byte [ecx - 1], al
mov ecx, dword [esp + 0x434]
mov dword fs:[0], ecx
add esp, 0x440
ret 8
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x434]
mov dword fs:[0], ecx
add esp, 0x440
ret 8