Function at 0x40c120
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x444432
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
mov al, byte [esp + 0x34]
push ebx
push esi
xor ebx, ebx
push edi
push ebx
lea ecx, [esp + 0x24]
mov dword [esp + 0x10], ebx
mov byte [esp + 0x24], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov cl, byte [esp + 0x40]
push ebx
mov byte [esp + 0x14], cl
lea ecx, [esp + 0x14]
mov dword [esp + 0x3c], ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov eax, dword [esp + 0x18]
mov byte [esp + 0x38], 1
cmp eax, 0x104
jb 0x40c195
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
lea ecx, [esp + 0x10]
mov eax, dword [edx]
push eax
push 0x104
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::erase_unsigned_int__unsigned_int_]
jmp 0x40c1ec
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov esi, 0x104
sub esi, eax
mov edx, dword [ecx]
sub edx, eax
cmp edx, esi
ja 0x40c1b4
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov eax, dword [esp + 0x18]
cmp esi, ebx
jbe 0x40c1ec
lea edi, [eax + esi]
push ebx
push edi
lea ecx, [esp + 0x18]
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x40c1ec
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push esi
push ebx
lea eax, [eax + ecx*2]
push eax
call fcn.00407360
add esp, 0xc
lea ecx, [esp + 0x10]
push edi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Eos_unsigned_int_]
cmp dword [esp + 0x14], ebx
je 0x40c202
lea ecx, [esp + 0x10]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Freeze_void_]
mov eax, dword [esp + 0x14]
jmp 0x40c207
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov edi, dword [esp + 0x14]
cmp edi, ebx
jne 0x40c221
mov edi, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push edi
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov esi, eax
lea ecx, [esp + 0x20]
push 1
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x40c259
mov edx, dword [esp + 0x24]
push esi
push edi
push edx
call fcn.00405c40
mov eax, dword [esp + 0x30]
mov dword [esp + 0x34], esi
add esp, 0xc
mov word [eax + esi*2], bx
mov ecx, dword [esp + 0x14]
mov byte [esp + 0x38], bl
cmp ecx, ebx
je 0x40c283
mov al, byte [ecx - 1]
cmp al, bl
je 0x40c277
cmp al, 0xff
je 0x40c277
dec al
mov byte [ecx - 1], al
jmp 0x40c283
add ecx, 0xfffffffe
push ecx
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov esi, dword [esp + 0x40]
mov cl, byte [esp + 0x20]
mov byte [esi], cl
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
lea ecx, [esp + 0x20]
mov eax, dword [edx]
push eax
push ebx
push ecx
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
mov ecx, dword [esp + 0x24]
cmp ecx, ebx
je 0x40c2e5
mov al, byte [ecx - 1]
cmp al, bl
je 0x40c2d9
cmp al, 0xff
je 0x40c2d9
dec al
pop edi
mov byte [ecx - 1], al
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret
add ecx, 0xfffffffe
push ecx
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x30]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x30
ret