Function at 0x4020c0
Capabilities:
Check if file exists
Create directory
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x403d80
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x23c
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push str..._tmpUpState.ini
lea ecx, [esp + 0x14]
mov dword [esp + 0x258], ebp
call sub.MFC42.DLL_CString::CString_2
push ebp
push 0x80
push 3
push ebp
push 1
push 0x80000000
push str..._tmpUpState.ini
mov byte [esp + 0x270], 1
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x402139
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x402139
push str..._tmpUpdateState.ini
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator_1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
push eax
push ebp
push str.ModeNumber
push str.Updatemode
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov edi, eax
lea ecx, [esp + 0x24]
mov dword [esp + 0x34], edi
call sub.MFC42.DLL_CFile::CFile
push str..._backup
mov byte [esp + 0x258], 2
call dword [sym.imp.MSVCRT.dll__mkdir]
add esp, 4
test eax, eax
push ebp
jne 0x402187
push 0x1002
jmp 0x402189
push 2
push str..._backupupfilelist.txt
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CFile::Open
cmp edi, ebp
jle 0x4023ea
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [esp + 0x20]
call fcn.00403714
push ebp
lea ecx, [esp + 0x24]
push str.dir_d
push ecx
mov byte [esp + 0x260], 3
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [esp + 0x14]
call fcn.00403714
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
push edx
push 0x104
push 0x104
lea ecx, [esp + 0x20]
mov byte [esp + 0x260], 4
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 0x4062b4
push esi
push str.Updatemode
call ebx
lea ecx, [esp + 0x18]
call fcn.00403714
push ebp
lea eax, [esp + 0x1c]
push str.UpState_d
push eax
mov byte [esp + 0x260], 5
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
add esp, 0xc
push ecx
push 1
push edx
push str.Updatemode
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
jne 0x4023ae
mov ecx, 0x41
lea edi, [esp + 0x44]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x148]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x14]
mov eax, dword [eax - 8]
push eax
call sub.MFC42.DLL_CString::GetBuffer
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x44]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x25c]
mov eax, dword [ecx - 8]
lea ecx, [esp + 0x25c]
push eax
call sub.MFC42.DLL_CString::GetBuffer
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x148]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, byte [esp + 0x46]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x25c]
test al, al
mov edx, dword [ecx - 8]
je 0x4022f8
lea ecx, [esp + 0x46]
lea edx, [esp + edx + 0x148]
inc ecx
mov byte [edx], al
inc edx
mov al, byte [ecx]
test al, al
jne 0x4022ee
lea edx, [esp + 0x148]
lea ecx, [esp + 0x1c]
push edx
call sub.MFC42.DLL_CString::CString_2
lea eax, [esp + 0x24]
lea edx, [esp + 0x25c]
push eax
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push edx
mov byte [esp + 0x260], 6
mov dword [0x4062b0], 0
call sub.MFC42.DLL_CString::CString_1
push ecx
lea eax, [esp + 0x28]
mov ecx, esp
mov dword [esp + 0x48], esp
push eax
mov byte [esp + 0x264], 7
call sub.MFC42.DLL_CString::CString_1
push ecx
lea edx, [esp + 0x2c]
mov ecx, esp
mov dword [esp + 0x50], esp
push edx
mov byte [esp + 0x268], 8
call sub.MFC42.DLL_CString::CString_1
mov byte [esp + 0x264], 6
call fcn.004017d0
mov eax, dword [0x4062b0]
add esp, 0x10
test eax, eax
jne 0x402399
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
push eax
push 0x40610c
push ecx
push str.Updatemode
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea ecx, [esp + 0x1c]
mov byte [esp + 0x254], 5
call sub.MFC42.DLL_CString::CString
mov edi, dword [esp + 0x34]
lea ecx, [esp + 0x18]
mov byte [esp + 0x254], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x254], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
mov byte [esp + 0x254], 2
call sub.MFC42.DLL_CString::CString
inc ebp
cmp ebp, edi
jl 0x4021a5
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CFile::Close
push 0
push 0
push str..._backupupfilelist.txt
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CFile::Open
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CFile::GetLength
mov ebp, eax
lea edi, [ebp + 1]
push edi
call sub.MFC42.DLL_operatornew
mov ecx, edi
mov esi, eax
mov edx, ecx
xor eax, eax
mov edi, esi
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebp
and ecx, 3
push esi
rep stosb byte es:[edi], al
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CFile::Read
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CFile::Close
push 0
push 1
push str..._backupupfilelist.txt
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CFile::Open
push esi
call fcn.00403360
add esp, 4
lea ecx, [esp + 0x24]
push ebp
push esi
call sub.MFC42.DLL_CFile::Write
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CFile::Close
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x24]
mov byte [esp + 0x254], 1
call fcn.0040389a
lea ecx, [esp + 0x10]
mov byte [esp + 0x254], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x25c]
mov dword [esp + 0x254], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x24c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x248
ret