Function at 0x402a00
Capabilities:
Get common file path

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4031dc
push eax
mov al, byte [esp + 0x14]
mov dword fs:[0], esp
sub esp, 0x21c
neg al
sbb eax, eax
push esi
and al, 0xf9
push 1
add eax, 0x23
xor esi, esi
push eax
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
jne 0x402a56
xor al, al
pop esi
mov ecx, dword [esp + 0x21c]
mov dword fs:[0], ecx
add esp, 0x228
ret
lea ecx, [esp + 0x14]
push 0x105
lea edx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x402a87
xor al, al
pop esi
mov ecx, dword [esp + 0x21c]
mov dword fs:[0], ecx
add esp, 0x228
ret
push ebx
push ebp
lea eax, [esp + 0x1c]
push edi
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
mov edi, dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 4
cmp eax, esi
jbe 0x402ab9
cmp word [esp + eax*2 + 0x1e], 0x5c
je 0x402ab9
lea ecx, [esp + 0x20]
push 0x43bba8
push ecx
call edi
add esp, 8
lea edx, [esp + 0x20]
push 0x43bbc8
push edx
call edi
lea eax, [esp + 0x28]
lea ecx, [esp + 0x18]
push eax
push ecx
call fcn.00402eb0
add esp, 0x10
mov edi, 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]
mov ecx, dword [edi + 8]
mov ebx, ecx
mov dword [esp + 0x234], esi
mov eax, dword [edx]
cmp eax, ebx
jae 0x402af3
mov ebx, eax
mov ebp, dword [esp + 0x23c]
cmp ebp, edi
jne 0x402b68
mov esi, eax
mov eax, dword [ebp + 8]
cmp eax, ebx
jae 0x402b0d
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xran_void_]
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Split_void_]
mov eax, dword [ebp + 8]
sub eax, ebx
cmp eax, esi
jae 0x402b20
mov esi, eax
test esi, esi
jbe 0x402b57
mov ecx, dword [ebp + 4]
sub eax, esi
add ecx, ebx
push eax
lea edx, [ecx + esi]
push edx
push ecx
call dword [sym.imp.MSVCRT.dll_memmove]
mov edi, dword [ebp + 8]
add esp, 0xc
sub edi, esi
mov ecx, ebp
push 0
push edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x402b57
push edi
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
push 0
push 0
mov ecx, ebp
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__::erase_unsigned_int__unsigned_int_]
jmp 0x402beb
cmp ebx, esi
jbe 0x402bb1
cmp ebx, ecx
jne 0x402bb1
mov eax, dword [edi + 4]
cmp eax, esi
jne 0x402b7c
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 - 1], 0xfe
jae 0x402bb1
push 1
mov ecx, ebp
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 eax, dword [edi + 4]
cmp eax, esi
jne 0x402b98
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]
mov dword [ebp + 4], eax
mov ecx, dword [edi + 8]
mov dword [ebp + 8], ecx
mov edi, dword [edi + 0xc]
mov dword [ebp + 0xc], edi
mov cl, byte [eax - 1]
inc cl
mov byte [eax - 1], cl
jmp 0x402bed
push 1
push ebx
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x402bed
mov edi, dword [edi + 4]
cmp edi, esi
mov esi, 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]
je 0x402bcf
mov esi, edi
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
xor esi, esi
mov eax, dword [esp + 0x14]
mov dword [esp + 0x234], 0xffffffff
cmp eax, esi
je 0x402c1d
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x402c14
cmp al, 0xff
je 0x402c14
dec al
mov byte [ecx], al
jmp 0x402c1d
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
push ebp
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
call fcn.00402560
mov ecx, dword [esp + 0x230]
add esp, 4
mov dword fs:[0], ecx
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x228
ret