Function at 0x401e40
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x403960
mov eax, dword fs:[0]
push eax
mov eax, 0x825c
call fcn.00403890
mov eax, dword [0x40601c]
xor eax, esp
mov dword [esp + 0x8258], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x40601c]
xor eax, esp
push eax
lea eax, [esp + 0x8270]
mov dword fs:[0], eax
xor eax, eax
push 0x7cfe
push eax
lea ecx, [esp + 0x576]
push ecx
mov word [esp + 0x578], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
push 1
lea ecx, [esp + 0x18]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::constructor_void_]
push 0x406538
push 0
push 0
push 0x15
push 0
mov dword [esp + 0x828c], 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
mov ebp, dword [sym.imp.MSVCR90.dll_strcat_s]
push 0x4042c0
push 0x104
push 0x406538
call ebp
mov esi, dword [0x4043ac]
mov edi, dword [str.rlog]
mov bl, byte [0x4043b4]
push 0xfb
lea edx, [esp + 0x375]
push 0
push edx
mov dword [esp + 0x374], esi
mov dword [esp + 0x378], edi
mov byte [esp + 0x37c], bl
call sub.MSVCR90.dll_memset
push 0xfb
lea eax, [esp + 0x279]
push 0
push eax
mov dword [esp + 0x278], esi
mov dword [esp + 0x27c], edi
mov byte [esp + 0x280], bl
call sub.MSVCR90.dll_memset
mov ecx, dword [str.2ipr]
mov dl, byte [0x4043bc]
push 0xff
lea eax, [esp + 0x179]
push 0
push eax
mov dword [esp + 0x17c], ecx
mov byte [esp + 0x180], dl
call sub.MSVCR90.dll_memset
lea eax, [esp + 0x17c]
add esp, 0x30
lea ecx, [eax + 1]
nop
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401f80
sub eax, ecx
xor ecx, ecx
test eax, eax
jle 0x401f9d
nop
add byte [esp + ecx + 0x14c], 0xfc
inc ecx
cmp ecx, eax
jl 0x401f90
lea eax, [esp + 0x14c]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401fa6
lea edi, [esp + 0x254]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401fb7
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov cl, byte [eax + 0x406538]
mov byte [esp + eax + 0x464], cl
inc eax
test cl, cl
jne 0x401fd1
lea ecx, [esp + 0x254]
push ecx
lea edx, [esp + 0x468]
push 0x104
push edx
call ebp
lea eax, [esp + 0x368]
push eax
push 0x104
push 0x406538
call ebp
mov ebp, dword [sym.imp.MSVCR90.dll_fopen]
push 0x4043c0
push 0x406538
call ebp
add esp, 0x20
mov dword [0x40663c], eax
test eax, eax
je 0x4021af
mov ebx, 2
push ebx
push 0
push eax
call dword [sym.imp.MSVCR90.dll_fseek]
mov ecx, dword [0x40663c]
push ecx
call dword [sym.imp.MSVCR90.dll_ftell]
mov edx, dword [0x40663c]
push edx
mov esi, eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 0x14
cmp esi, 0x3e8
jbe 0x4021af
push 1
push 0x40
push 1
push 0x406538
lea ecx, [esp + 0x15c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::constructor_char_const___int__int_]
push 1
push 0x40
push 0xa
lea eax, [esp + 0x470]
push eax
lea ecx, [esp + 0xb4]
mov byte [esp + 0x8288], 1
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ofstream_char__struct_std::char_traits_char__::constructor_char_const___int__int_]
lea ecx, [esp + 0x130]
mov byte [esp + 0x8278], bl
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ecx, [esp + 0x130]
push ecx
lea edx, [esp + 0x150]
mov byte [esp + 0x827c], 3
mov esi, dword [sym.imp.MSVCP90.dll_class_std::basic_istream_char__struct_std::char_traits_char______cdecl_std::getline_char__struct_std::char_traits_char___class_std::allocator_char___class_std::basic_istream_char__struct_std::char_traits_char_____class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char____]
push edx
call esi
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov edx, dword [ecx + eax + 8]
add ecx, eax
and dl, 6
movsx eax, dl
add esp, 8
neg eax
sbb eax, eax
not eax
test ecx, eax
je 0x402140
mov edi, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___char__struct_std::char_traits_char___class_std::allocator_char___class_std::basic_ostream_char__struct_std::char_traits_char_____class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [ecx]
lea ecx, [esp + 0x130]
push ecx
lea edx, [esp + 0xa8]
push edx
call edi
lea eax, [esp + 0x138]
push eax
lea ecx, [esp + 0x158]
push ecx
call esi
mov edx, dword [eax]
mov ecx, dword [edx + 4]
add ecx, eax
mov eax, dword [ecx + 8]
and al, 6
movsx edx, al
add esp, 0x10
neg edx
sbb edx, edx
not edx
test ecx, edx
jne 0x402100
lea ecx, [esp + 0x130]
mov byte [esp + 0x8278], bl
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push 0x4043c4
push 0x406538
call ebp
push 0x404304
push 0x4042f8
push eax
mov dword [0x40663c], eax
call dword [sym.imp.MSVCR90.dll_fprintf]
mov eax, dword [0x40663c]
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 0x18
lea ecx, [esp + 0xa4]
mov byte [esp + 0x8278], 1
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ofstream_char__struct_std::char_traits_char__::vbase_dtor_void_]
lea ecx, [esp + 0x14c]
mov byte [esp + 0x8278], 0
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::vbase_dtor_void_]
push 0x40
push 1
push 0x40ee18
lea ecx, [esp + 0x20]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::open_char_const___int__int_]
push 0x7fff
lea ecx, [esp + 0x570]
push ecx
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::read_char___int_]
lea eax, [esp + 0x56c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4021e3
sub eax, edx
xor ecx, ecx
test eax, eax
jle 0x4021ff
add byte [esp + ecx + 0x56c], 4
inc ecx
cmp ecx, eax
jl 0x4021f2
push 0x4043c8
push 0x406538
call ebp
add esp, 8
mov dword [0x40663c], eax
test eax, eax
je 0x40223a
lea edx, [esp + 0x56c]
push edx
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
mov eax, dword [0x40663c]
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 0x10
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::close_void_]
lea ecx, [esp + 0x14]
mov dword [esp + 0x8278], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::vbase_dtor_void_]
mov ecx, dword [esp + 0x8270]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x8258]
xor ecx, esp
call fcn.00402ef4
add esp, 0x8268
ret