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

Disassembly:
push 0xffffffffffffffff
push 0x40cc20
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 0x405948
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 0x40594d
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 0x405970
test ecx, ecx
je 0x405966
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 0x40596b
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 0x4059c1
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 0x40592e
mov edi, 0x413054
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 0x413054
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 0x405ab7
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 0x405a7c
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x405a73
cmp al, 0xff
je 0x405a73
dec al
mov byte [ecx], al
jmp 0x405a7c
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x405a89
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.00405710
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x405acc
mov al, byte [ecx - 1]
test al, al
je 0x405aab
cmp al, 0xff
je 0x405aab
dec al
mov byte [ecx - 1], al
jmp 0x405acc
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x405acc
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 0x405b13
mov al, byte [ecx - 1]
test al, al
je 0x405b09
cmp al, 0xff
je 0x405b09
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