Function at 0x40aa20
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x410be2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2f8
push ebx
push ebp
push esi
push edi
mov ebx, ecx
call sub.MFC42.DLL_AfxGetModuleState
mov ebp, dword [eax + 4]
push str.TRUE
mov dword [esp + 0x18], 0
mov eax, dword [ebp + 0x44d8]
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
jne 0x40aa72
mov dword [esp + 0x14], 1
mov eax, dword [esp + 0x318]
lea esi, [ebp + 0x3cc8]
push eax
mov ecx, esi
call fcn.0040c010
mov esi, dword [esi + 0x10]
mov ecx, 0xb8
lea edi, [esp + 0x28]
lea edx, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x318]
push ecx
push edx
mov ecx, ebx
call fcn.0040a540
mov eax, dword [ebx + 0x108]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
xor edi, edi
push edi
push edi
push 0x402
push eax
mov dword [esp + 0x320], edi
call esi
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40aaec
mov eax, dword [esp + 0x1b4]
test eax, eax
je 0x40abc8
jmp 0x40ac26
mov eax, dword [esp + 0x1b0]
cmp eax, 0x800
jne 0x40ac09
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [esp + 0x14]
mov byte [esp + 0x310], 1
test eax, eax
je 0x40ab28
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push edx
push 0x416420
push eax
jmp 0x40ab37
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x18]
push ecx
push str.The_file__s_have_existed_do_you_want_to_overlay_
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea eax, [ebp + 0x4508]
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push eax
call fcn.0040f000
push ecx
lea edx, [ebp + 0x4504]
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
mov byte [esp + 0x31c], 2
call fcn.0040f000
push ecx
lea eax, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x30], esp
push eax
mov byte [esp + 0x320], 3
call fcn.0040f000
mov ecx, ebp
mov byte [esp + 0x31c], 1
call fcn.00407320
test eax, eax
jne 0x40abaa
mov edx, dword [esp + 0x1b4]
xor ecx, ecx
test edx, edx
setne cl
inc ecx
mov edi, ecx
lea ecx, [esp + 0x18]
mov byte [esp + 0x310], 0
call sub.MFC42.DLL_CString::CString
test edi, edi
je 0x40accf
cmp edi, 1
jne 0x40ac21
mov edi, dword [ebp + 0x4524]
mov edx, dword [esp + 0x10]
add ebp, 0x27c4
mov dword [esp + 0x14], edx
push ebp
call dword [sym.imp.MSVCRT.dll_atol]
mov ecx, dword [esp + 0x1c0]
mov edx, dword [esp + 0x18]
add esp, 4
push eax
mov eax, dword [esp + 0x1bc]
push eax
push ecx
push edi
push edx
mov ecx, ebx
call fcn.0040a7e0
jmp 0x40ac92
cmp eax, 0x200
jne 0x40accf
mov eax, dword [esp + 0x1b4]
test eax, eax
je 0x40abc8
jmp 0x40ac26
cmp edi, 2
jne 0x40ac92
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
xor edx, edx
mov ecx, 0x28
div ecx
push 0
add edx, 0xa
push edx
mov edx, dword [ebx + 0x108]
push 0x402
push edx
call esi
mov eax, dword [esp + 0x1b8]
mov ecx, dword [esp + 0x1bc]
mov edx, dword [esp + 0x10]
mov ebp, dword [ebp + 0x4524]
push 0
push 0
push eax
push ecx
push edx
push ebp
call fcn.00404730
add esp, 0x18
call edi
xor edx, edx
mov ecx, 0x28
div ecx
push 0
add edx, 0x32
push edx
mov edx, dword [ebx + 0x108]
push 0x402
push edx
call esi
push ecx
lea eax, [esp + 0x2cc]
mov ecx, esp
mov dword [esp + 0x28], esp
push eax
call sub.MFC42.DLL_CString::CString_1
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
mov byte [esp + 0x31c], 4
call fcn.0040f000
mov byte [esp + 0x318], 0
call fcn.00402ca0
add esp, 8
mov eax, dword [esp + 0x10]
push 0x2e
lea ecx, [esp + 0x14]
mov edi, dword [eax - 8]
call sub.MFC42.DLL_CString::ReverseFind
sub edi, eax
lea ecx, [esp + 0x1c]
push edi
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Right
mov edx, dword [esp + 0x1c]
mov edi, dword [sym.imp.MSVCRT.dll__mbsicmp]
push 0x4163e8
push edx
mov byte [esp + 0x318], 5
call edi
add esp, 8
test eax, eax
je 0x40ad26
mov eax, dword [esp + 0x1c]
push 0x4163e4
push eax
call edi
add esp, 8
test eax, eax
jne 0x40ad33
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00401870
add esp, 4
mov edx, dword [ebx + 0x108]
push 0
push 0x64
push 0x402
push edx
call esi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x310], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x310], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x308]
pop edi
pop esi
pop ebp
mov eax, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x304
ret 4