Function at 0x4021b5
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x494
mov eax, dword [0x42f064]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x470]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
sub esp, 0x10
lea esi, [ebp - 0x470]
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.00401e5b
add esp, 0x10
push 7
pop ecx
mov dword [ebp - 0x474], eax
mov ebx, 0x104
push ebx
lea eax, [ebp - 0x248]
mov esi, str._bootstat.dat
lea edi, [ebp - 0x20]
push eax
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x248]
push ebx
push eax
call fcn.004146f5
add esp, 0xc
lea eax, [ebp - 0x248]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4022c9
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x248]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x480], eax
cmp eax, 0xffffffff
je 0x4022c9
lea ecx, [ebp - 0x47c]
push ecx
lea ecx, [ebp - 0x488]
push ecx
lea ecx, [ebp - 0x490]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea eax, [ebp - 0x460]
push eax
lea eax, [ebp - 0x47c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
sub esp, 0x10
lea esi, [ebp - 0x460]
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.00401e5b
add esp, 0x10
cmp eax, dword [ebp - 0x474]
jbe 0x4022bd
mov dword [ebp - 0x474], eax
push dword [ebp - 0x480]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 8
pop ecx
push ebx
lea eax, [ebp - 0x450]
mov esi, str.configdefault
lea edi, [ebp - 0x40]
push eax
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x450]
push ebx
push eax
call fcn.004146f5
add esp, 0xc
lea eax, [ebp - 0x450]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40238f
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x248]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40238f
lea eax, [ebp - 0x47c]
push eax
lea eax, [ebp - 0x490]
push eax
lea eax, [ebp - 0x488]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea eax, [ebp - 0x460]
push eax
lea eax, [ebp - 0x47c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
sub esp, 0x10
lea esi, [ebp - 0x460]
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.00401e5b
add esp, 0x10
cmp eax, dword [ebp - 0x474]
jbe 0x402388
mov dword [ebp - 0x474], eax
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0040249d
cmp dword [ebp - 0x474], eax
jae 0x4023a0
xor eax, eax
jmp 0x4023b2
push dword [ebp - 0x474]
call fcn.004023c1
mov eax, dword [ebp - 0x474]
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414657
leave
ret