Function at 0x40bed0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x444409
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
mov al, byte [esp + 0x34]
push ebx
push esi
xor ebx, ebx
push edi
push ebx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], ebx
mov byte [esp + 0x1c], 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 eax, dword [esp + 0x20]
mov dword [esp + 0x30], ebx
cmp eax, 0x212
jb 0x40bf2d
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 edx, dword [ecx]
lea ecx, [esp + 0x18]
push edx
push 0x212
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 0x40bf84
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, 0x212
sub esi, eax
mov edx, dword [ecx]
sub edx, eax
cmp edx, esi
ja 0x40bf4c
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov eax, dword [esp + 0x20]
cmp esi, ebx
jbe 0x40bf84
lea edi, [eax + esi]
push ebx
push edi
lea ecx, [esp + 0x20]
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 0x40bf84
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
push esi
push ebx
lea edx, [eax + ecx*2]
push edx
call fcn.00407360
add esp, 0xc
lea ecx, [esp + 0x18]
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_]
push ebp
push str.Shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebx
je 0x40c009
push str.SHGetSpecialFolderPathW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebp, eax
cmp ebp, ebx
je 0x40c009
mov edi, dword [esp + 0x44]
mov eax, dword [esp + 0x20]
mov esi, edi
and esi, 0x8000
cmp eax, ebx
je 0x40bff5
mov cl, byte [eax - 1]
cmp cl, bl
je 0x40bfda
cmp cl, 0xff
je 0x40bfda
mov eax, dword [esp + 0x24]
push ebx
push eax
lea ecx, [esp + 0x24]
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_]
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x40bffa
mov ecx, dword [esp + 0x40]
mov byte [eax - 1], 0xff
mov eax, dword [esp + 0x20]
push esi
push edi
push eax
push ecx
call ebp
jmp 0x40c091
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]
mov ecx, dword [esp + 0x40]
push esi
push edi
push eax
push ecx
call ebp
jmp 0x40c091
lea edx, [esp + 0x14]
mov dword [esp + 0x10], ebx
push edx
mov dword [esp + 0x18], ebx
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
lea eax, [esp + 0x10]
push eax
push ecx
push edx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x40c067
mov cl, byte [eax - 1]
cmp cl, bl
je 0x40c059
cmp cl, 0xff
je 0x40c059
mov eax, dword [esp + 0x24]
push ebx
push eax
lea ecx, [esp + 0x24]
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_]
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x40c06c
mov byte [eax - 1], 0xff
mov eax, dword [esp + 0x20]
jmp 0x40c06c
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]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x14]
mov eax, dword [esp + 0x14]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov edi, dword [esp + 0x20]
pop ebp
cmp edi, ebx
jne 0x40c0a0
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]
mov esi, dword [esp + 0x38]
mov al, byte [esp + 0x40]
push edi
mov byte [esi], al
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov ecx, esi
push eax
push edi
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_unsigned_short_int_const___unsigned_int_]
mov ecx, dword [esp + 0x1c]
cmp ecx, ebx
je 0x40c0ff
mov al, byte [ecx - 1]
cmp al, bl
je 0x40c0f3
cmp al, 0xff
je 0x40c0f3
dec al
pop edi
mov byte [ecx - 1], al
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
add ecx, 0xfffffffe
push ecx
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x28]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x28
ret