Function at 0x40cce2
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4264d7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x24
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x30], ecx
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x30]
mov edx, dword [eax + 0x3a8]
sub edx, dword [ecx + 0x3ac]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x30]
mov dword [eax + 0x3b4], 0
mov ecx, dword [ebp - 0x30]
mov dword [ecx + 0x3b0], 0
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x14]
cmp eax, dword [edx + 0x394]
jb 0x40cd52
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx + 0x394]
mov dword [ebp - 0x18], edx
jmp 0x40cd58
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
cmp ecx, dword [ebp - 0x14]
jbe 0x40cd66
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x18], edx
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x398], 0
je 0x40cdcb
push 0
mov ecx, dword [ebp - 0x30]
add ecx, 0x3a0
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x38c]
push ecx
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 0x398]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40cdcb
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx + 0x3ac]
mov eax, dword [ebp - 0x30]
add edx, dword [eax + 0x3a0]
mov ecx, dword [ebp - 0x30]
mov dword [ecx + 0x3ac], edx
jmp 0x40ce96
mov edx, dword [ebp - 0x30]
cmp dword [edx + 0x398], 0
jne 0x40cde0
mov dword [ebp - 0x1c], 6
jmp 0x40cde9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1c], eax
push 1
push 0
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx + 0x398]
push edx
push 0
push 0
push 0x7b
mov ecx, dword [ebp + 8]
call fcn.00421ef1
mov eax, dword [ebp - 0x30]
mov dword [eax + 0x3a0], 0
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx + 0x398]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x30]
mov dword [eax + 0x398], 0
mov ecx, dword [ebp - 0x30]
cmp dword [ecx + 0x3b8], 0
je 0x40ce91
mov edx, dword [ebp - 0x30]
cmp dword [edx + 0x39c], 0
je 0x40ce91
mov eax, dword [ebp - 0x30]
add eax, 0x23c
push eax
push 0
push 0
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx + 0x39c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x39c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x30]
mov dword [edx + 0x39c], 0
jmp 0x40d05a
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x30]
mov edx, dword [eax + 0x3ac]
cmp edx, dword [ecx + 0x3a8]
jb 0x40cec9
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x398]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x30]
mov dword [edx + 0x398], 0
jmp 0x40ced6
mov eax, dword [ebp - 0x30]
mov dword [eax + 0x3b4], 1
mov ecx, dword [ebp - 0x30]
cmp dword [ecx + 0x390], 0
je 0x40cfc4
mov edx, dword [ebp - 0x30]
cmp dword [edx + 0x3b8], 0
jne 0x40cfc4
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x3a0], 0xa
jbe 0x40cfc4
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_AFX_EXCEPTION_LINK::AFX_EXCEPTION_LINK
mov dword [ebp - 4], 0
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx + 0x390]
push edx
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x3a0]
push ecx
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 0x38c]
push eax
call fcn.00424605
add esp, 0xc
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
mov dword [ecx + 0x3b0], edx
jmp 0x40cf8d
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.0040d890
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x30]
mov eax, dword [ecx + 0x3b0]
cmp eax, dword [edx + 0x3a0]
jb 0x40cfc2
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 0x3a0]
mov dword [ecx + 0x3b0], eax
jmp 0x40cfd6
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 0x3a0]
mov dword [ecx + 0x3b0], eax
mov ecx, dword [ebp - 0x30]
cmp dword [ecx + 0x3b8], 0
jne 0x40d05a
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 0x38c]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x30]
mov eax, dword [ecx + 0x3b0]
cmp eax, dword [edx + 0x3a0]
jae 0x40d00e
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx + 0x390]
mov dword [ebp - 0x2c], edx
push 1
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x3b0]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
push 0
push 0
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x3b4]
push ecx
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 0x3a0]
push eax
push 0
push 0
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx + 0x398]
push edx
push 0
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x3b0]
push ecx
push 0x7b
mov ecx, dword [ebp + 8]
call fcn.00421ef1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4