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

Disassembly:
mov eax, 0x4fc510
call fcn.00484660
sub esp, 0x78
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
je 0x40384d
cmp dword [ebp + 0xc], ebx
je 0x40384d
and byte [ebp - 0x28], bl
xor eax, eax
lea edi, [ebp - 0x27]
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 - 0x28]
push eax
push dword [ebp + 0xc]
call fcn.00403860
test eax, eax
je 0x40384d
push 1
pop esi
lea eax, [ebp - 0x84]
push eax
call fcn.0044caac
cmp esi, ebx
pop ecx
jle 0x40366f
mov edi, esi
lea eax, [ebp - 0x28]
push 0x10
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.0044caea
add esp, 0xc
dec edi
jne 0x403657
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0044d63e
inc esi
pop ecx
cmp esi, 0xc
pop ecx
jl 0x403644
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40384d
push ebx
push eax
push 3
push ebx
push 1
push SysReAllocStringLen
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40384d
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
je 0x403846
cmp edi, 0x7fffffff
ja 0x403846
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString_5
lea eax, [edi + 1]
lea ecx, [ebp - 0x14]
push eax
mov dword [ebp - 4], ebx
mov dword [ebp + 8], eax
call sub.MFC42.DLL_CString::GetBuffer
and dword [ebp - 0x18], 0
mov ebx, eax
lea eax, [ebp - 0x18]
push 0
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40383b
cmp dword [ebp - 0x18], edi
jne 0x40383b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString_5
push dword [ebp + 8]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::GetBuffer
mov esi, eax
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x28]
push esi
push eax
push edi
push ebx
mov dword [ebp + 0xc], edi
call fcn.0044c8c3
add esp, 0x14
cmp dword [ebp + 0xc], 0
mov edi, eax
jge 0x40375a
and dword [ebp + 0xc], 0
push dword [ebp + 8]
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::ReleaseBuffer
test edi, edi
je 0x403837
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x403837
push 2
pop ebx
cmp eax, ebx
jb 0x403837
mov edx, dword [ebp + 0x10]
mov cx, word [esi]
mov word [edx], cx
lea ecx, [eax - 2]
cmp ecx, ebx
jb 0x403837
mov edx, dword [ebp + 0x14]
mov cx, word [esi + 2]
mov word [edx], cx
lea ecx, [eax - 4]
cmp ecx, 4
jb 0x403837
mov edx, dword [ebp + 0x18]
mov ecx, dword [esi + 4]
mov dword [edx], ecx
lea ecx, [eax - 8]
cmp ecx, ebx
jb 0x403837
mov edx, dword [ebp + 0x1c]
mov cx, word [esi + 8]
mov word [edx], cx
lea ecx, [eax - 0xa]
cmp ecx, 4
jb 0x403837
mov edx, dword [ebp + 0x20]
mov ecx, dword [esi + 0xa]
mov dword [edx], ecx
lea ecx, [eax - 0xe]
cmp ecx, ebx
jb 0x403837
movzx ecx, word [esi + 0xe]
add eax, 0xfffffff0
cmp eax, ecx
jl 0x403837
add esi, 0x10
push ecx
push esi
lea ecx, [ebp + 0x10]
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [ebp + 0x24]
push eax
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
push 1
pop esi
push dword [ebp + 8]
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::ReleaseBuffer
and byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call sub.MFC42.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString
mov eax, esi
jmp 0x40384f
xor esi, esi
jmp 0x403810
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
jmp 0x403827
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x20