Function at 0x401147
Capabilities:
Get common file path
Move file

Disassembly:
mov eax, 0x4040a4
call fcn.00403930
sub esp, 0x48
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x10], esp
mov byte [ebp - 0x11], 1
mov dword [ebp - 4], edi
call fcn.0040111b
test eax, eax
jne 0x40119d
call fcn.004010ef
test eax, eax
jne 0x40119d
mov eax, dword [ebp + 8]
push 4
push edi
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x40118b
and byte [ebp - 0x11], al
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0x11]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
lea ecx, [ebp - 0x24]
call fcn.00403ccc
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.00403ccc
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 2
call fcn.00403ccc
mov esi, 0x400
lea ecx, [ebp - 0x24]
push esi
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::GetBuffer
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0xffffffffffffffff
lea ecx, [ebp - 0x24]
mov esi, eax
call sub.MFC42.DLL_CString::ReleaseBuffer
cmp esi, edi
jne 0x401214
and byte [ebp - 0x11], 0
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
and byte [ebp - 4], 0
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CString::CString
jmp 0x40118b
push dword [ebp - 0x24]
lea eax, [ebp - 0x1c]
push str._swininit.ini
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea eax, [ebp - 0x20]
push dword [ebp - 0x24]
push str._swininit.new
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [ebp - 0x54]
call sub.MFC42.DLL_CStdioFile::CStdioFile
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CStdioFile::CStdioFile
push edi
push edi
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CStdioFile::Open
cmp eax, edi
setne byte [ebp - 0x12]
cmp byte [ebp - 0x12], 0
jne 0x40127d
push edi
push dword [ebp - 0x1c]
call dword [sym.imp.MSVCRT.dll__access]
pop ecx
test eax, eax
pop ecx
je 0x401292
push edi
push 0x1001
push dword [ebp - 0x20]
lea ecx, [ebp - 0x40]
call sub.MFC42.DLL_CStdioFile::Open
cmp eax, edi
jne 0x40129b
and byte [ebp - 0x11], 0
jmp 0x40149e
lea ecx, [ebp - 0x18]
call fcn.00403ccc
xor bl, bl
mov byte [ebp - 4], 7
cmp byte [ebp - 0x12], bl
je 0x401386
mov esi, 0x407054
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x54]
push eax
call sub.MFC42.DLL_CStdioFile::ReadString
cmp eax, edi
setne bl
test bl, bl
je 0x401398
push str._rename_
push dword [ebp - 0x18]
call dword [sym.imp.MSVCRT.dll__stricmp]
pop ecx
cmp eax, edi
pop ecx
je 0x40130e
lea eax, [ebp - 0x18]
push esi
push eax
lea eax, [ebp - 0x2c]
push eax
call sub.MFC42.DLL_operator
push dword [eax]
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CStdioFile::WriteString
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::CString
jmp 0x4012b7
test bl, bl
je 0x401398
lea eax, [ebp - 0x18]
push esi
push eax
lea eax, [ebp - 0x2c]
push eax
call sub.MFC42.DLL_operator
push dword [eax]
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 9
call sub.MFC42.DLL_CStdioFile::WriteString
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x2c]
call sub.MFC42.DLL_CString::CString
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x54]
push eax
call sub.MFC42.DLL_CStdioFile::ReadString
cmp eax, edi
setne bl
test bl, bl
je 0x401398
push 0x5b
lea ecx, [ebp - 0x18]
call sub.MFC42.DLL_CString::Find
cmp eax, edi
je 0x401398
lea eax, [ebp - 0x18]
push esi
push eax
lea eax, [ebp - 0x2c]
push eax
call sub.MFC42.DLL_operator
push dword [eax]
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0xa
call sub.MFC42.DLL_CStdioFile::WriteString
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x2c]
jmp 0x401339
push str._rename__n
lea ecx, [ebp - 0x40]
call sub.MFC42.DLL_CStdioFile::WriteString
mov esi, 0x407054
lea ecx, [ebp - 0x28]
call fcn.00403ccc
mov eax, dword [ebp + 8]
mov byte [ebp - 4], 0xb
push dword [eax]
lea eax, [ebp - 0x28]
push str.NUL_s_n_n
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [ebp - 0x40]
push dword [ebp - 0x28]
call sub.MFC42.DLL_CStdioFile::WriteString
cmp byte [ebp - 0x12], 0
je 0x40142c
test bl, bl
je 0x40142c
lea eax, [ebp - 0x18]
push esi
push eax
lea eax, [ebp + 8]
push eax
call sub.MFC42.DLL_operator
push dword [eax]
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0xc
call sub.MFC42.DLL_CStdioFile::WriteString
mov byte [ebp - 4], 0xb
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x54]
push eax
call sub.MFC42.DLL_CStdioFile::ReadString
cmp eax, edi
je 0x40142c
lea eax, [ebp - 0x18]
push esi
push eax
lea eax, [ebp + 8]
push eax
call sub.MFC42.DLL_operator
push dword [eax]
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0xd
call sub.MFC42.DLL_CStdioFile::WriteString
mov byte [ebp - 4], 0xb
lea ecx, [ebp + 8]
jmp 0x4013f2
lea ecx, [ebp - 0x40]
call sub.MFC42.DLL_CStdioFile::Close
cmp byte [ebp - 0x12], 0
je 0x40144a
lea ecx, [ebp - 0x54]
call sub.MFC42.DLL_CStdioFile::Close
push dword [ebp - 0x1c]
call sub.MFC42.DLL_CFile::Remove
mov esi, dword [sym.imp.MSVCRT.dll__access]
push edi
push dword [ebp - 0x1c]
call esi
pop ecx
test eax, eax
pop ecx
je 0x40147f
push edi
push dword [ebp - 0x20]
call esi
pop ecx
test eax, eax
pop ecx
jne 0x40147f
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
call sub.MFC42.DLL_CFile::Rename
push edi
push dword [ebp - 0x1c]
call esi
pop ecx
test eax, eax
pop ecx
je 0x401483
and byte [ebp - 0x11], 0
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 4
call fcn.00403cd8
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 3
call fcn.00403cd8
jmp 0x4011eb