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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x47433f
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x490018]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebx]
lea edi, [esi + 0x2bc]
push eax
call fcn.00448730
push eax
lea ecx, [esp + 0x18]
call dword [0x4763f4]
mov dword [esp + 0x40], 0
mov ecx, dword [ebx]
push ecx
lea edx, [esi + 0x588]
push edx
call fcn.004472d0
push eax
lea ecx, [esp + 0x14]
call dword [0x4763f4]
mov byte [esp + 0x40], 1
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.00401b90
mov byte [esp + 0x48], 2
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x24]
push eax
call fcn.00401b90
mov byte [esp + 0x50], 3
push 0x18
call sub.mfc90u.dll_new
add esp, 0x14
mov dword [esp + 0x20], eax
mov byte [esp + 0x40], 4
test eax, eax
je 0x40a852
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push ecx
push edx
push eax
call fcn.0041e9a0
jmp 0x40a854
xor eax, eax
mov byte [esp + 0x40], 3
push eax
lea eax, [esi - 0x68]
push eax
call fcn.0041dc30
cmp dword [esi + 0x788], 0
jne 0x40a98d
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40a98d
and eax, 0x10
mov eax, 0
sete al
test eax, eax
je 0x40a98d
mov ecx, dword [esp + 0x10]
mov edx, dword [esi - 0x84]
mov edx, dword [edx + 0x48]
xor eax, eax
mov dword [esp + 0x24], ecx
lea ecx, [esi - 0x84]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
lea eax, [esp + 0x24]
push eax
call edx
cmp dword [esp + 0x30], 0
je 0x40a923
mov byte [esp + 0x40], 2
lea ecx, [esp + 0x18]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x40], 1
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x40], 0
lea ecx, [esp + 0x10]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov dword [esp + 0x40], 0xffffffff
lea ecx, [esp + 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, 0xf00
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp dword [esp + 0x28], 0
mov eax, dword [esp + 0x2c]
mov dword [esi + 0x788], eax
jne 0x40a98d
mov byte [esp + 0x40], 2
lea ecx, [esp + 0x18]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x40], 1
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x40], 0
lea ecx, [esp + 0x10]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov dword [esp + 0x40], 0xffffffff
lea ecx, [esp + 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, 0x1000900
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [edi]
mov edx, dword [edx + 8]
push ebx
push eax
mov eax, dword [ebp + 8]
push ecx
push eax
mov ecx, edi
call edx
mov esi, eax
mov byte [esp + 0x40], 2
lea ecx, [esp + 0x18]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x40], 1
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov byte [esp + 0x40], 0
lea ecx, [esp + 0x10]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov dword [esp + 0x40], 0xffffffff
lea ecx, [esp + 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, esi
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10