Function at 0x40acb7
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows

Disassembly:
mov eax, 0x4be6d4
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x84
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1c], ecx
push edi
push esi
lea ecx, [ebp - 0x20]
call sub.MFC42.DLL_CString::CString_1
push dword [ebp + 0xc]
xor ebx, ebx
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], ebx
call sub.MFC42.DLL_CString::CString_1
cmp esi, ebx
mov byte [ebp - 4], 1
je 0x40af30
cmp dword [ebp + 0xc], ebx
je 0x40af30
and byte [ebp - 0x34], bl
xor eax, eax
lea edi, [ebp - 0x33]
mov ecx, dword [ebp - 0x1c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 0xc]
call fcn.0040af5d
test eax, eax
je 0x40af30
push 1
pop edi
lea eax, [ebp - 0x90]
push eax
call fcn.0041bff4
cmp edi, ebx
pop ecx
jle 0x40ad54
mov dword [ebp + 0xc], edi
lea eax, [ebp - 0x34]
push 0x10
push eax
lea eax, [ebp - 0x90]
push eax
call fcn.0041c032
add esp, 0xc
dec dword [ebp + 0xc]
jne 0x40ad3a
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.0041cb86
inc edi
pop ecx
cmp edi, 0xc
pop ecx
jl 0x40ad26
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40af30
push ebx
push eax
push 3
push ebx
push ebx
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40af30
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
je 0x40af29
cmp esi, 0x7fffffff
ja 0x40af29
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString_3
push esi
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::GetBuffer
and dword [ebp - 0x18], 0
mov ebx, eax
lea eax, [ebp - 0x18]
push 0
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40af14
cmp dword [ebp - 0x18], esi
jne 0x40af14
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString_3
push esi
lea ecx, [ebp + 8]
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::GetBuffer
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], esi
push ecx
push eax
lea eax, [ebp - 0x34]
push eax
push esi
push ebx
call fcn.0041be0b
xor ebx, ebx
add esp, 0x14
cmp dword [ebp - 0x14], ebx
mov edi, eax
jge 0x40ae31
mov dword [ebp - 0x14], ebx
push dword [ebp - 0x14]
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::ReleaseBuffer
push esi
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::ReleaseBuffer
cmp edi, ebx
je 0x40ae6e
cmp dword [ebp - 0x14], ebx
je 0x40ae6e
push dword [ebp - 0x14]
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::GetBuffer
push 2
mov esi, eax
mov eax, dword [ebp - 0x14]
pop ecx
cmp eax, ecx
jae 0x40ae7f
push eax
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::ReleaseBuffer
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
jmp 0x40af1b
mov edi, dword [ebp + 0x10]
mov dx, word [esi]
mov word [edi], dx
lea edx, [eax - 2]
cmp edx, ecx
jb 0x40ae65
mov edi, dword [ebp + 0x14]
mov dx, word [esi + 2]
mov word [edi], dx
lea edx, [eax - 4]
cmp edx, 4
jb 0x40ae65
mov edi, dword [ebp + 0x18]
mov edx, dword [esi + 4]
mov dword [edi], edx
lea edx, [eax - 8]
cmp edx, ecx
jb 0x40ae65
mov edi, dword [ebp + 0x1c]
mov dx, word [esi + 8]
mov word [edi], dx
lea edx, [eax - 0xa]
cmp edx, ecx
jb 0x40ae65
movzx edi, word [esi + 0xa]
lea ecx, [eax - 0xc]
cmp ecx, edi
jl 0x40ae65
mov ecx, dword [ebp + 0x20]
push edi
call sub.MFC42.DLL_CString::GetBuffer
add esi, 0xc
push edi
push esi
push eax
call sub.MSVCRT.dll_memcpy
mov ecx, dword [ebp + 0x20]
add esp, 0xc
push edi
call sub.MFC42.DLL_CString::ReleaseBuffer
push dword [ebp - 0x14]
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::ReleaseBuffer
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
push 1
pop esi
jmp 0x40af32
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
jmp 0x40af30
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
and byte [ebp - 4], 0
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x1c