Function at 0x4031e0
Capabilities:
Get common file path
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4046c8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x148
push ebx
push ebp
push esi
mov esi, ecx
push edi
push str.temp
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString_1
lea eax, [esp + 0x54]
mov ebp, 1
push 0x104
push eax
mov dword [esp + 0x168], 0
mov dword [esp + 0x18], ebp
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 0x54]
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_1
mov edx, dword [0x407024]
mov byte [esp + 0x160], 1
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
lea edi, [esi + 0x68]
push 0x40718c
push edi
mov dword [esi + 0x16c], eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x40329b
mov eax, dword [esi + 0x16c]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov ecx, esi
push ebx
push 0x407184
push 0x407164
call sub.MFC42.DLL_CWnd::MessageBoxA
jmp 0x403516
mov ecx, dword [0x407024]
lea edx, [esp + 0x30]
push edx
push edi
mov dword [esp + 0x28], ecx
call dword [sym.imp.MSVCRT.dll__stat]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x4c]
add esp, 8
cmp eax, ecx
je 0x403439
lea ecx, [esp + 0x18]
xor edi, edi
call sub.MFC42.DLL_CString::CString
push ebp
lea ecx, [esp + 0x1c]
push str.svch_dst
push ecx
mov byte [esp + 0x16c], 2
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea edx, [esp + 0x14]
lea eax, [esp + 0x28]
push 0x407154
push edx
push eax
call sub.MFC42.DLL_operator_1
lea ecx, [esp + 0x18]
lea edx, [esp + 0x2c]
push ecx
push eax
push edx
mov byte [esp + 0x16c], 3
call sub.MFC42.DLL_operator
push 0x40714c
push eax
lea eax, [esp + 0x2c]
mov byte [esp + 0x168], 4
push eax
call sub.MFC42.DLL_operator_1
mov eax, dword [eax]
push 0x407148
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
lea ecx, [esp + 0x24]
mov ebp, eax
call fcn.00403d82
lea ecx, [esp + 0x2c]
mov byte [esp + 0x160], 3
call fcn.00403d82
lea ecx, [esp + 0x28]
mov byte [esp + 0x160], 2
call fcn.00403d82
test ebp, ebp
je 0x403554
mov ecx, dword [esp + 0x20]
push edi
push ecx
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
lea eax, [esi + 0x64]
push 1
push 4
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
test eax, eax
je 0x403572
mov edx, dword [esi + 0x16c]
push ebx
push 4
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
test eax, eax
je 0x4033ee
mov ecx, dword [esi + 0x64]
lea edx, [eax + edi]
cmp edx, ecx
jle 0x4033c2
sub ecx, edi
mov eax, ecx
push ebp
push eax
mov eax, dword [esi + 0x16c]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ecx, dword [esi + 0x16c]
push ebx
push 4
push 1
push ecx
add edi, eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x20
test eax, eax
jne 0x4033b4
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
test edi, edi
je 0x403590
mov ecx, dword [esp + 0x10]
mov edx, dword [esi + 0x64]
mov eax, dword [esp + 0x20]
inc ecx
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x18]
lea edi, [eax + edx + 4]
mov byte [esp + 0x160], 1
mov dword [esp + 0x20], edi
call fcn.00403d82
mov eax, dword [esp + 0x44]
mov ebp, dword [esp + 0x10]
cmp edi, eax
jne 0x4032c4
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
mov ecx, dword [esi + 0x16c]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
mov edi, 1
add esp, 8
cmp ebp, edi
jle 0x403516
mov bl, 6
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
push edi
lea edx, [esp + 0x14]
push str.svch_dst
push edx
mov byte [esp + 0x16c], 5
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea eax, [esp + 0x14]
lea ecx, [esp + 0x24]
push 0x407154
push eax
push ecx
call sub.MFC42.DLL_operator_1
lea edx, [esp + 0x10]
mov byte [esp + 0x160], bl
push edx
push eax
lea eax, [esp + 0x34]
push eax
call sub.MFC42.DLL_operator
push 0x40714c
lea ecx, [esp + 0x2c]
push eax
push ecx
mov byte [esp + 0x16c], 7
call sub.MFC42.DLL_operator_1
mov eax, dword [eax]
push 1
push eax
mov ecx, esi
call fcn.00403170
lea ecx, [esp + 0x28]
call fcn.00403d82
lea ecx, [esp + 0x2c]
mov byte [esp + 0x160], bl
call fcn.00403d82
lea ecx, [esp + 0x24]
mov byte [esp + 0x160], 5
call fcn.00403d82
lea ecx, [esp + 0x10]
mov byte [esp + 0x160], 1
call fcn.00403d82
inc edi
cmp edi, ebp
jl 0x40345f
lea ecx, [esp + 0x14]
mov byte [esp + 0x160], 0
call fcn.00403d82
lea ecx, [esp + 0x1c]
mov dword [esp + 0x160], 0xffffffff
call fcn.00403d82
mov ecx, dword [esp + 0x158]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x154
ret
mov ecx, dword [esi + 0x16c]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 0
push 0x407184
push 0x407120
jmp 0x4035ac
mov edx, dword [esi + 0x16c]
push edx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 0
push 0x407184
push 0x4070f4
jmp 0x4035ac
mov eax, dword [esi + 0x16c]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 0
push 0x407184
push 0x4070c8
mov ecx, esi
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [esp + 0x18]
mov byte [esp + 0x160], 1
call fcn.00403d82
jmp 0x403516