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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x424a27
mov eax, dword fs:[0]
push eax
sub esp, 0xf4
mov eax, dword [0x431074]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x3c], eax
call dword [sym.imp.mfc140.dll_Ordinal_316]
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0
call dword [sym.imp.mfc140.dll_Ordinal_316]
push str.jcdrawingLog
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 1
call dword [sym.imp.mfc140.dll_Ordinal_1529]
lea ecx, [ebp - 0x2c]
call dword [sym.imp.mfc140.dll_Ordinal_316]
lea ecx, [ebp - 0x30]
call dword [sym.imp.mfc140.dll_Ordinal_316]
push str..txt
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 3
call dword [sym.imp.mfc140.dll_Ordinal_1529]
lea eax, [ebp - 0x28]
push eax
call fcn.0040dd70
add esp, 4
cmp dword [eax + 0x14], 0x10
mov byte [ebp - 4], 4
jb 0x40e52b
mov eax, dword [eax]
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push eax
lea eax, [ebp - 0x2c]
push str._sjcff_s_s
push eax
call dword [sym.imp.mfc140.dll_Ordinal_4807]
mov edx, dword [ebp - 0x14]
add esp, 0x14
mov byte [ebp - 4], 3
cmp edx, 0x10
jb 0x40e57e
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40e574
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40e574
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00421e33
add esp, 8
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x38]
call dword [sym.imp.mfc140.dll_Ordinal_300]
lea ecx, [ebp - 0x38]
call dword [sym.imp.mfc140.dll_Ordinal_1661]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40e5a8
test al, 0x10
jne 0x40e5a8
mov bl, 1
jmp 0x40e5aa
xor bl, bl
lea ecx, [ebp - 0x38]
call dword [sym.imp.mfc140.dll_Ordinal_1044]
test bl, bl
je 0x40e69d
push 1
lea ecx, [ebp - 0x100]
call fcn.0040d0e0
push 0x40
push 0x21
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 5
call dword [sym.imp.mfc140.dll_Ordinal_5096]
push eax
lea ecx, [ebp - 0x100]
call fcn.0040e060
cmp dword [ebp - 0x9c], 0
lea ecx, [ebp - 0x100]
je 0x40e698
push 2
push 0
push 0
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::seekg_long_long___int64___int_]
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x100]
call dword [sym.imp.MSVCP140.dll_public:_class_std::fpos_struct__Mbstatet____thiscall_std::basic_istream_char__struct_std::char_traits_char__::tellg_void_]
push 0
push 0
push 0
mov edi, dword [eax + 8]
lea ecx, [ebp - 0x100]
add edi, dword [eax]
mov esi, dword [eax + 0xc]
adc esi, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::seekg_long_long___int64___int_]
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
lea ecx, [ebp - 0x100]
mov ebx, eax
push esi
push edi
push ebx
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::read_char___long_long___int64__]
lea ecx, [ebp - 0xe8]
call fcn.0040db60
test eax, eax
jne 0x40e675
push eax
mov eax, dword [ebp - 0x100]
lea ecx, [ebp - 0x100]
push 2
mov eax, dword [eax + 4]
add ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov ecx, dword [ebp - 0x3c]
push ebx
call dword [sym.imp.mfc140.dll_Ordinal_1530]
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
lea ecx, [ebp - 0x100]
call fcn.0040d4d0
mov bl, 1
jmp 0x40e69f
call fcn.0040d4d0
xor bl, bl
lea ecx, [ebp - 0x30]
call dword [sym.imp.mfc140.dll_Ordinal_1044]
lea ecx, [ebp - 0x2c]
call dword [sym.imp.mfc140.dll_Ordinal_1044]
lea ecx, [ebp - 0x40]
call dword [sym.imp.mfc140.dll_Ordinal_1044]
lea ecx, [ebp - 0x34]
call dword [sym.imp.mfc140.dll_Ordinal_1044]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00421e64
mov esp, ebp
pop ebp
ret