Function at 0x40a710
Capabilities:
Check if file exists
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x440648
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
push ebx
push ebp
push esi
push edi
mov esi, ecx
xor ebx, ebx
lea ecx, [esp + 0x50]
mov dword [esp + 0x6c], ebx
call sub.MFC42.DLL_CStdioFile::CStdioFile
lea ecx, [esp + 0x18]
mov byte [esp + 0x6c], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x6c], 2
call sub.MFC42.DLL_CString::CString
mov eax, dword [esi + 0x254]
or ebp, 0xffffffff
cmp eax, ebx
mov byte [esp + 0x6c], 3
jle 0x40a7bc
lea edi, [esi + 0x988]
mov eax, dword [edi - 0x198]
push eax
call dword [sym.imp.MSVCRT.dll_atof]
fadd qword [0x442de0]
add esp, 4
call sub.MSVCRT.dll__ftol
cmp dword [esi + 0xbe4], eax
jne 0x40a7aa
mov eax, dword [edi]
push eax
call dword [sym.imp.MSVCRT.dll_atol]
mov ecx, dword [esi + 0xbe8]
add esp, 4
cmp ecx, eax
je 0x40a7ba
mov eax, dword [esi + 0x254]
inc ebx
add edi, 4
cmp ebx, eax
jl 0x40a771
jmp 0x40a7bc
mov ebp, ebx
lea edi, [esi + 0x200]
push str.profileCurve_s__s_d.CRV
lea eax, [esp + 0x48]
push edi
push eax
call sub.MFC42.DLL_operator
mov ecx, dword [esi + 0xbe4]
mov edx, dword [esi + ebp*4 + 0x724]
mov eax, dword [eax]
push ecx
mov ecx, dword [esi + ebp*4 + 0xa54]
push edx
push ecx
lea edx, [esp + 0x20]
push eax
push edx
mov byte [esp + 0x80], 4
call sub.MFC42.DLL_CString::Format
add esp, 0x14
lea ecx, [esp + 0x44]
mov byte [esp + 0x6c], 3
call fcn.00422b90
mov eax, dword [esp + 0x14]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push eax
call ebx
test eax, eax
jne 0x40a94c
push str.profileCurve_s_d.CRV
lea ecx, [esp + 0x48]
push edi
push ecx
call sub.MFC42.DLL_operator
mov edx, dword [esi + 0xbe4]
mov ecx, dword [esi + ebp*4 + 0x724]
mov eax, dword [eax]
push edx
push ecx
lea edx, [esp + 0x1c]
push eax
push edx
mov byte [esp + 0x7c], 5
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea ecx, [esp + 0x44]
mov byte [esp + 0x6c], 3
call fcn.00422b90
mov eax, dword [esp + 0x14]
push eax
call ebx
test eax, eax
jne 0x40a94c
mov eax, dword [esp + 0x74]
cmp byte [eax], 0x5a
jne 0x40a8b1
push str.profileCurveZCurve.CRV
lea ecx, [esp + 0x48]
push edi
push ecx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
lea edx, [esp + 0x14]
push eax
push edx
mov byte [esp + 0x74], 6
call sub.MFC42.DLL_CString::Format
add esp, 8
mov byte [esp + 0x6c], 3
lea ecx, [esp + 0x44]
jmp 0x40a947
mov cl, byte [eax + 1]
cmp cl, 0x30
mov byte [esp + 0x13], cl
jb 0x40a8ff
cmp cl, 0x39
ja 0x40a8ff
mov bl, byte [eax]
push str.profileCurve_CCurve_J_d.CRV
lea eax, [esp + 0x48]
push edi
push eax
call sub.MFC42.DLL_operator
mov ecx, dword [esi + 0xbe4]
mov eax, dword [eax]
movsx edx, bl
push ecx
push edx
push eax
lea eax, [esp + 0x20]
push eax
mov byte [esp + 0x7c], 7
call sub.MFC42.DLL_CString::Format
add esp, 0x10
mov byte [esp + 0x6c], 3
lea ecx, [esp + 0x44]
jmp 0x40a947
mov cl, byte [eax]
mov bl, byte [eax + 1]
push str.profileCurve_C_CCurve_J_d.CRV
lea edx, [esp + 0x48]
push edi
push edx
mov byte [esp + 0x1e], cl
call sub.MFC42.DLL_operator
mov ecx, dword [esi + 0xbe4]
mov eax, dword [eax]
push ecx
mov byte [esp + 0x70], 8
movsx ecx, byte [esp + 0x16]
movsx edx, bl
push edx
push ecx
lea edx, [esp + 0x20]
push eax
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0x14
mov byte [esp + 0x6c], 3
lea ecx, [esp + 0x44]
call fcn.00422b90
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40ab53
mov al, byte [esp + 0x13]
cmp al, 0x30
jb 0x40aea4
cmp al, 0x39
ja 0x40aea4
mov eax, dword [esi + 0xbe4]
mov ecx, 0xa
cdq
idiv ecx
test edx, edx
je 0x40aac5
cmp edx, 1
je 0x40aac5
cmp edx, 5
je 0x40aac5
cmp edx, 2
je 0x40aa8b
cmp edx, 6
je 0x40aa8b
cmp edx, 8
je 0x40aa8b
cmp edx, 3
je 0x40aa51
cmp edx, 7
je 0x40aa51
cmp edx, 4
je 0x40aa14
cmp edx, 9
je 0x40aa14
lea ecx, [esp + 0x14]
mov byte [esp + 0x6c], 2
call fcn.00422b90
lea ecx, [esp + 0x18]
mov byte [esp + 0x6c], 1
call fcn.00422b90
lea ecx, [esp + 0x50]
mov byte [esp + 0x6c], 0
call fcn.00422d28
lea ecx, [esp + 0x74]
mov dword [esp + 0x6c], 0xffffffff
call fcn.00422b90
xor al, al
jmp 0x40af29
mov edx, dword [esp + 0x74]
push str.profileCurve_CCurve_J49.CRV
lea eax, [esp + 0x4c]
push edi
mov bl, byte [edx]
push eax
call sub.MFC42.DLL_operator
mov eax, dword [eax]
lea edx, [esp + 0x14]
movsx ecx, bl
push ecx
push eax
push edx
mov byte [esp + 0x78], 0xc
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov byte [esp + 0x6c], 3
lea ecx, [esp + 0x48]
jmp 0x40aafd
mov eax, dword [esp + 0x74]
push str.profileCurve_CCurve_J37.CRV
lea ecx, [esp + 0x4c]
push edi
mov bl, byte [eax]
push ecx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
mov byte [esp + 0x6c], 0xb
movsx edx, bl
push edx
push eax
lea eax, [esp + 0x1c]
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov byte [esp + 0x6c], 3
lea ecx, [esp + 0x48]
jmp 0x40aafd
mov ecx, dword [esp + 0x74]
push str.profileCurve_CCurve_J268.CRV
lea edx, [esp + 0x4c]
push edi
mov bl, byte [ecx]
push edx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
lea edx, [esp + 0x14]
movsx ecx, bl
push ecx
push eax
push edx
mov byte [esp + 0x78], 0xa
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov byte [esp + 0x6c], 3
lea ecx, [esp + 0x48]
jmp 0x40aafd
mov eax, dword [esp + 0x74]
push str.profileCurve_CCurve_J015.CRV
lea ecx, [esp + 0x4c]
push edi
mov bl, byte [eax]
push ecx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
mov byte [esp + 0x6c], 9
movsx edx, bl
push edx
push eax
lea eax, [esp + 0x1c]
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov byte [esp + 0x6c], 3
lea ecx, [esp + 0x48]
call fcn.00422b90
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40ab53
lea ecx, [esp + 0x14]
mov byte [esp + 0x6c], 2
call fcn.00422b90
lea ecx, [esp + 0x18]
mov byte [esp + 0x6c], 1
call fcn.00422b90
lea ecx, [esp + 0x50]
mov byte [esp + 0x6c], 0
call fcn.00422d28
lea ecx, [esp + 0x74]
mov dword [esp + 0x6c], 0xffffffff
call fcn.00422b90
xor al, al
jmp 0x40af29
mov edx, dword [esp + 0x14]
push 0
push 0x20
push edx
lea ecx, [esp + 0x5c]
call sub.MFC42.DLL_CStdioFile::Open
test eax, eax
jne 0x40abab
lea ecx, [esp + 0x14]
mov byte [esp + 0x6c], 2
call fcn.00422b90
lea ecx, [esp + 0x18]
mov byte [esp + 0x6c], 1
call fcn.00422b90
lea ecx, [esp + 0x50]
mov byte [esp + 0x6c], 0
call fcn.00422d28
lea ecx, [esp + 0x74]
mov dword [esp + 0x6c], 0xffffffff
call fcn.00422b90
xor al, al
jmp 0x40af29
fld dword [esi + 0xc04]
fild dword [esi + 0x1c48]
fmul qword [0x442e48]
fadd qword [0x442de0]
call sub.MSVCRT.dll__ftol
mov dword [esp + 0x44], eax
lea eax, [esp + 0x18]
fild dword [esp + 0x44]
push eax
lea ecx, [esp + 0x54]
fstp dword [esp + 0x24]
fld dword [esi + 0xc08]
fsub st(1)
fld dword [esp + 0x24]
fsub dword [0x442e40]
fdivp st(1)
fst dword [esp + 0x38]
fmul dword [0x442e40]
fsubr st(1)
fstp dword [esp + 0x44]
fstp st(0)
call sub.MFC42.DLL_CStdioFile::ReadString
test eax, eax
je 0x40aee3
mov ecx, dword [esp + 0x18]
push str.Angle:
push ecx
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
jne 0x40ac53
lea edx, [esp + 0x18]
lea ecx, [esp + 0x50]
push edx
call sub.MFC42.DLL_CStdioFile::ReadString
test eax, eax
je 0x40aee3
lea eax, [esp + 0x18]
lea ecx, [esp + 0x50]
push eax
call sub.MFC42.DLL_CStdioFile::ReadString
test eax, eax
je 0x40aee3
mov ecx, dword [esp + 0x18]
add ecx, 3
push ecx
call dword [sym.imp.MSVCRT.dll_atol]
mov dword [esp + 0x48], eax
add esp, 4
fild dword [esp + 0x44]
lea edx, [esp + 0x18]
lea ecx, [esp + 0x50]
push edx
fstp dword [esp + 0x20]
call sub.MFC42.DLL_CStdioFile::ReadString
test eax, eax
je 0x40aee3
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.MSVCRT.dll_atof]
fcom qword [0x442e38]
add esp, 4
fnstsw ax
test ah, 1
je 0x40aea2
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x18]
fstp dword [esp + 0x38]
mov dword [esp + 0x28], ecx
push edx
lea ecx, [esp + 0x54]
call sub.MFC42.DLL_CStdioFile::ReadString
test eax, eax
je 0x40aee3
mov eax, dword [esp + 0x18]
add eax, 3
push eax
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 4
mov dword [esp + 0x44], eax
fild dword [esp + 0x44]
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x54]
fstp dword [esp + 0x20]
call sub.MFC42.DLL_CStdioFile::ReadString
test eax, eax
je 0x40aee3
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.MSVCRT.dll_atof]
mov al, byte [esi + 0x1baa]
add esp, 4
test al, al
je 0x40ad40
fld dword [esp + 0x1c]
fcomp dword [esp + 0x20]
fnstsw ax
test ah, 0x40
je 0x40ad27
fstp st(0)
fld dword [esp + 0x20]
fld dword [esp + 0x1c]
fcomp dword [0x442e40]
fnstsw ax
test ah, 0x40
je 0x40ad40
fstp st(0)
fld dword [0x442e40]
fld st(0)
fsub dword [esp + 0x38]
fld dword [esp + 0x1c]
fsub dword [esp + 0x28]
fdivp st(1)
fst dword [esp + 0x2c]
fmul dword [esp + 0x28]
fsubr dword [esp + 0x38]
fstp dword [esp + 0x3c]
fld dword [esp + 0x28]
call sub.MSVCRT.dll__ftol
fld dword [esp + 0x1c]
mov ebx, eax
mov dword [esp + 0x44], ebx
call sub.MSVCRT.dll__ftol
mov ebp, eax
cmp ebx, ebp
jge 0x40aca5
lea eax, [ebx + 1]
mov dword [esp + 0x38], eax
fild dword [esp + 0x44]
fld st(0)
fmul qword [0x442e30]
fsubr qword [0x442e28]
fstp dword [esp + 0x24]
fcom dword [esp + 0x20]
fnstsw ax
test ah, 0x40
je 0x40adc3
mov eax, dword [esi + 0x1c48]
mov ecx, 0xff
sub ecx, eax
mov dword [esp + 0x44], ecx
fild dword [esp + 0x44]
fstp dword [esp + 0x24]
fmul dword [esp + 0x2c]
fadd dword [esp + 0x3c]
fmul dword [esp + 0x34]
fadd dword [esp + 0x40]
fstp dword [esp + 0x44]
fild dword [esp + 0x38]
fst dword [esp + 0x30]
fmul qword [0x442e30]
fsubr qword [0x442e28]
fld dword [esp + 0x30]
fcomp dword [esp + 0x20]
fnstsw ax
test ah, 0x40
je 0x40ae11
mov eax, dword [esi + 0x1c48]
mov edx, 0xff
sub edx, eax
fstp st(0)
mov dword [esp + 0x4c], edx
fild dword [esp + 0x4c]
fld dword [esp + 0x2c]
fmul dword [esp + 0x30]
fadd dword [esp + 0x3c]
fmul dword [esp + 0x34]
fadd dword [esp + 0x40]
fsub dword [esp + 0x44]
fld st(1)
fsub dword [esp + 0x24]
fdivp st(1)
fst dword [esp + 0x30]
fmul dword [esp + 0x24]
fsubr dword [esp + 0x44]
fstp dword [esp + 0x4c]
fld dword [esp + 0x24]
fadd qword [0x442de0]
call sub.MSVCRT.dll__ftol
fadd qword [0x442de0]
mov edi, eax
mov dword [esp + 0x44], edi
call sub.MSVCRT.dll__ftol
cmp edi, eax
jl 0x40ae87
lea ecx, [esi + edi*4 + 0x136c]
fild dword [esp + 0x44]
dec edi
sub ecx, 4
cmp edi, eax
mov dword [esp + 0x44], edi
fmul dword [esp + 0x30]
fadd dword [esp + 0x4c]
fstp dword [ecx + 4]
jge 0x40ae6c
mov ecx, dword [esp + 0x38]
inc ebx
inc ecx
cmp ebx, ebp
mov dword [esp + 0x44], ebx
mov dword [esp + 0x38], ecx
jl 0x40ad89
jmp 0x40aca5
fstp st(0)
lea ecx, [esp + 0x14]
mov byte [esp + 0x6c], 2
call fcn.00422b90
lea ecx, [esp + 0x18]
mov byte [esp + 0x6c], 1
call fcn.00422b90
lea ecx, [esp + 0x50]
mov byte [esp + 0x6c], 0
call fcn.00422d28
lea ecx, [esp + 0x74]
mov dword [esp + 0x6c], 0xffffffff
call fcn.00422b90
xor al, al
jmp 0x40af29
lea ecx, [esp + 0x50]
call sub.MFC42.DLL_CStdioFile::Close
lea ecx, [esp + 0x14]
mov byte [esp + 0x6c], 2
call fcn.00422b90
lea ecx, [esp + 0x18]
mov byte [esp + 0x6c], 1
call fcn.00422b90
lea ecx, [esp + 0x50]
mov byte [esp + 0x6c], 0
call fcn.00422d28
lea ecx, [esp + 0x74]
mov dword [esp + 0x6c], 0xffffffff
call fcn.00422b90
mov al, 1
mov ecx, dword [esp + 0x64]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x60
ret 4