Function at 0x407dfc
Capabilities:
Check if file exists
Get file attributes
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x588
push ebx
push esi
push edi
lea eax, [ebp + 8]
mov esi, ecx
push eax
mov dword [ebp - 8], esi
call fcn.00402aa1
lea eax, [ebp + 0xc]
lea ecx, [esi + 4]
push eax
call fcn.00402aa1
lea eax, [ebp + 0x10]
lea ecx, [esi + 8]
push eax
call fcn.00402aa1
push str.update.ini
push 0x414dd4
lea eax, [ebp - 4]
push eax
call fcn.0040345d
push dword [ebp - 4]
push 0
push str.update_file_num
push str.update
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
and dword [ebp - 0x20], 0
test eax, eax
mov dword [ebp - 0x40], eax
jle 0x408220
mov edi, str.yyyy_MM_dd
mov ebx, 0x800
mov esi, 0x411cbc
mov eax, dword [0x414050]
push dword [ebp - 0x20]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x130]
push str.update_file__d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push dword [ebp - 4]
lea eax, [ebp - 0x338]
push 0x104
push eax
push 0x4115c0
push 0x411c94
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x338]
push eax
lea ecx, [ebp - 0x18]
call fcn.00402af1
push dword [ebp - 4]
lea eax, [ebp - 0x338]
push 0x104
push eax
push 0x4115c0
push str.path
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x338]
push eax
lea ecx, [ebp - 0x14]
call fcn.00402af1
push dword [ebp - 4]
lea eax, [ebp - 0x338]
push 0x104
push eax
push 0x4115c0
push str.verify
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x338]
push eax
lea ecx, [ebp - 0x10]
call fcn.00402af1
push dword [ebp - 4]
and word [ebp - 0xc], 0
push 0
push 0x411c70
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push dword [ebp - 4]
test eax, eax
setne al
push 0
mov byte [ebp - 0xa], al
push str.is_main
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x407f80
mov word [ebp - 0xc], 1
jmp 0x407fcf
push 0
push 0x411be0
lea ecx, [ebp - 0x14]
call fcn.00401862
test eax, eax
jle 0x407f9b
mov word [ebp - 0xc], 2
jmp 0x407fcf
push 0
push str..dll
lea ecx, [ebp - 0x14]
call fcn.00401862
test eax, eax
jle 0x407fb6
mov word [ebp - 0xc], 3
jmp 0x407fcf
push 0
push 0x411c48
lea ecx, [ebp - 0x14]
call fcn.00401862
test eax, eax
jle 0x407fcf
mov word [ebp - 0xc], 4
cmp word [ebp - 0xc], 1
mov eax, dword [0x414050]
mov dword [ebp - 0x28], eax
jne 0x408033
push ecx
lea eax, [ebp - 0x18]
mov ecx, esp
push eax
call fcn.004032dd
lea eax, [ebp - 0x48]
push eax
call fcn.004034a9
pop ecx
pop ecx
push eax
mov eax, dword [ebp - 8]
push 0x411c44
add eax, 8
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.0040345d
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.0040341c
push eax
lea ecx, [ebp - 0x28]
call fcn.00402aa1
lea ecx, [ebp - 0x54]
call fcn.00401894
lea ecx, [ebp - 0x50]
call fcn.00401894
lea ecx, [ebp - 0x48]
jmp 0x408053
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 8]
add eax, 4
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.0040341c
push eax
lea ecx, [ebp - 0x28]
call fcn.00402aa1
lea ecx, [ebp - 0x3c]
call fcn.00401894
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x14]
call fcn.00402aa1
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4081cf
mov eax, dword [0x414050]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x588]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x574]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
push edi
lea ecx, [ebp - 0x34]
call fcn.00403310
mov eax, dword [eax]
mov eax, dword [eax - 8]
push edi
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x1c], eax
call fcn.00403310
mov eax, dword [eax]
push dword [ebp - 0x1c]
mov eax, dword [eax - 8]
push eax
lea ecx, [ebp - 0x24]
call fcn.00401ed3
push eax
push edi
lea eax, [ebp - 0x68]
push eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetDateFormatW]
lea ecx, [ebp - 0x44]
call fcn.00401894
lea ecx, [ebp - 0x34]
call fcn.00401894
push esi
lea ecx, [ebp - 0x58]
call fcn.00403310
mov eax, dword [eax]
mov eax, dword [eax - 8]
push esi
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x1c], eax
call fcn.00403310
mov eax, dword [eax]
push dword [ebp - 0x1c]
mov eax, dword [eax - 8]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00401ed3
push eax
push esi
lea eax, [ebp - 0x68]
push eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetTimeFormatW]
lea ecx, [ebp - 0x4c]
call fcn.00401894
lea ecx, [ebp - 0x58]
call fcn.00401894
push 0xffffffffffffffff
lea ecx, [ebp - 0x24]
call fcn.004027b5
push 0xffffffffffffffff
lea ecx, [ebp - 0x2c]
call fcn.004027b5
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.0040341c
push eax
lea ecx, [ebp - 0x30]
call fcn.00402aa1
lea ecx, [ebp - 0x38]
call fcn.00401894
push dword [ebp - 0x30]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4081b5
cmp word [ebp - 0xc], 1
jne 0x4081a6
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x10]
lea edx, [ebp - 0x18]
push edx
push ecx
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [eax + 0xc]
call fcn.0040767e
jmp 0x4081b5
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x18]
push eax
add ecx, 0xc
call fcn.00407b6b
lea ecx, [ebp - 0x2c]
call fcn.00401894
lea ecx, [ebp - 0x24]
call fcn.00401894
lea ecx, [ebp - 0x30]
call fcn.00401894
jmp 0x4081fe
cmp word [ebp - 0xc], 1
jne 0x4081ef
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x10]
lea edx, [ebp - 0x18]
push edx
push ecx
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [eax + 0xc]
call fcn.0040767e
jmp 0x4081fe
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x18]
push eax
add ecx, 0xc
call fcn.00407b6b
lea ecx, [ebp - 0x28]
call fcn.00401894
lea ecx, [ebp - 0x18]
call fcn.00401a5f
inc dword [ebp - 0x20]
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x40]
jl 0x407e74
mov esi, dword [ebp - 8]
lea ecx, [ebp - 4]
call fcn.00401894
lea ecx, [ebp + 8]
call fcn.00401894
lea ecx, [ebp + 0xc]
call fcn.00401894
lea ecx, [ebp + 0x10]
call fcn.00401894
pop edi
lea eax, [esi + 0xc]
pop esi
pop ebx
leave
ret 0xc