Function at 0x403231
Capabilities:
Read file on windows
Set file attributes
Write file on windows

Disassembly:
mov eax, 0x404bfc
call sub.MSVCRT.dll__EH_prolog
mov eax, 0x1398
call fcn.004043b0
push ebx
push esi
push edi
mov esi, ecx
and dword [ebp - 4], 0
and dword [ebp - 0x18], 0
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
push dword [ebp + 8]
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 2
push str._s.
push eax
call sub.MFC42.DLL_CString::Format
push dword [ebp + 8]
lea eax, [ebp - 0x10]
push str._s_.exe
push eax
call sub.MFC42.DLL_CString::Format
push dword [0x407034]
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, dword [sym.imp.MSVCRT.dll_fopen]
mov dword [esi + 0x16c], eax
lea eax, [esi + 0x64]
push 0x40741c
push eax
call edi
mov ebx, eax
add esp, 0x24
test ebx, ebx
je 0x4033e9
push 0x407418
push dword [ebp - 0x14]
call edi
pop ecx
mov dword [ebp + 8], eax
test eax, eax
pop ecx
je 0x4033e9
push 0
push dword [0x407034]
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push ebx
lea eax, [esi + 0x60]
push 1
push 4
push eax
call edi
add esp, 0x1c
test eax, eax
je 0x4033e9
push ebx
push 1
lea eax, [ebp - 0x1c]
push 4
push eax
call edi
add esp, 0x10
test eax, eax
je 0x4033e9
push ebx
push 4
push 1
push dword [esi + 0x16c]
call edi
add esp, 0x10
test eax, eax
je 0x403360
mov edx, dword [ebp - 0x18]
mov ecx, dword [esi + 0x60]
add edx, eax
cmp edx, ecx
jle 0x403339
sub ecx, dword [ebp - 0x18]
mov eax, ecx
push dword [ebp + 8]
push eax
push 1
push dword [esi + 0x16c]
call dword [sym.imp.MSVCRT.dll_fwrite]
add dword [ebp - 0x18], eax
push ebx
push 4
push 1
push dword [esi + 0x16c]
call edi
add esp, 0x20
jmp 0x403324
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_fclose]
and dword [ebp - 0x18], 0
mov dword [esp], 0x407418
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp + 8], eax
test eax, eax
pop ecx
je 0x40340e
mov eax, dword [esi + 0x60]
mov ecx, dword [0x407034]
push 0
lea eax, [eax + ecx + 8]
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
push 4
push 1
push dword [esi + 0x16c]
call edi
add esp, 0x1c
push dword [ebp + 8]
test eax, eax
je 0x4033dc
push eax
push 1
push dword [esi + 0x16c]
call dword [sym.imp.MSVCRT.dll_fwrite]
add dword [ebp - 0x18], eax
push ebx
push 4
push 1
push dword [esi + 0x16c]
call edi
add esp, 0x20
jmp 0x4033b1
call dword [sym.imp.MSVCRT.dll_fclose]
cmp dword [ebp - 0x18], 0
pop ecx
jne 0x4033fb
push dword [esi + 0x16c]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
jmp 0x403489
push 0
push 1
push 0x40866c
mov ecx, esi
push dword [ebp + 0xc]
call fcn.004031c9
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
push dword [esi + 0x16c]
call dword [sym.imp.MSVCRT.dll_free]
push dword [ebp + 0x10]
lea eax, [ebp - 0x13a4]
push eax
call sub.MSVCRT.dll_strcpy
add esp, 0xc
lea eax, [ebp - 0x10]
mov ecx, esp
mov dword [ebp + 8], esp
push eax
call sub.MFC42.DLL_CString::CString_1
push ecx
lea eax, [ebp - 0x14]
mov ecx, esp
mov dword [ebp + 0xc], esp
push eax
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::CString_1
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.004019cd
push dword [ebp - 0x14]
call dword [sym.imp.MSVCRT.dll__unlink]
pop ecx
push 6
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 1
lea eax, [ebp - 0x13a4]
push 0
push eax
push dword [ebp - 0x10]
mov ecx, esi
call fcn.004031c9
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.004041e0
and byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.004041e0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x10]
call fcn.004041e0
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0xc