Function at 0x4c941a
Capabilities:
Get common file path
Read .ini file
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59f4ca
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44c
mov dword [ebp - 0x434], ecx
mov dword [ebp - 4], 0
lea eax, [ebp - 0x138]
push eax
push 0x12c
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea ecx, [ebp - 0x148]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x140]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x434]
mov ecx, dword [ecx + 0x80]
call fcn.00405b20
add eax, 0x484
push eax
lea ecx, [ebp - 0x13c]
call sub.MFC42.DLL_CString::CString_2
mov byte [ebp - 4], 3
push 0x5f3a3c
lea ecx, [ebp - 0x13c]
call fcn.0058e586
lea ecx, [ebp - 0x13c]
call fcn.00403d90
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov dword [ebp - 0x144], 0
push 0x5f3a48
lea edx, [ebp + 8]
push edx
call fcn.0040adf0
and eax, 0xff
test eax, eax
je 0x4c9555
push str.Open_CNC_file
lea ecx, [ebp - 0x148]
call fcn.0058e0f4
push 0x2c0
call fcn.00403600
mov dword [ebp - 0x410], eax
mov byte [ebp - 4], 4
cmp dword [ebp - 0x410], 0
je 0x4c952d
push 0
push 0x5f3a60
push 6
push 0
push 0
push 1
mov ecx, dword [ebp - 0x410]
call fcn.0045d34a
mov dword [ebp - 0x438], eax
jmp 0x4c9537
mov dword [ebp - 0x438], 0
mov eax, dword [ebp - 0x438]
mov dword [ebp - 0x40c], eax
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x40c]
mov dword [ebp - 0x14c], ecx
jmp 0x4c95ca
push str.Open_DGT_file
lea ecx, [ebp - 0x148]
call fcn.0058e0f4
push 0x2c0
call fcn.00403600
mov dword [ebp - 0x418], eax
mov byte [ebp - 4], 5
cmp dword [ebp - 0x418], 0
je 0x4c95a4
push 0
push str.DGT_Files__.dgt_.dgtAll_Files__._.
push 6
push 0
push 0
push 1
mov ecx, dword [ebp - 0x418]
call fcn.0045d34a
mov dword [ebp - 0x43c], eax
jmp 0x4c95ae
mov dword [ebp - 0x43c], 0
mov edx, dword [ebp - 0x43c]
mov dword [ebp - 0x414], edx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x414]
mov dword [ebp - 0x14c], eax
lea ecx, [ebp - 0x148]
call fcn.00403d90
mov ecx, dword [ebp - 0x14c]
mov dword [ecx + 0x90], eax
mov edx, dword [ebp - 0x14c]
add edx, 0x200
push edx
mov ecx, dword [ebp - 0x434]
call fcn.004cc588
mov eax, dword [ebp - 0x14c]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x14c]
call dword [edx + 0xc0]
cmp eax, 1
jne 0x4c9b3a
mov eax, dword [ebp - 0x14c]
add eax, 0x200
push eax
mov ecx, dword [ebp - 0x434]
call fcn.004cc7ad
lea ecx, [ebp - 0x150]
push ecx
mov ecx, dword [ebp - 0x14c]
call sub.MFC42.DLL_CFileDialog::GetFileName
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x434]
mov eax, dword [edx + 0xd4]
cmp dword [eax + 0x8d8], 1
jne 0x4c97e5
push 0x5f3ad0
push 0x40
lea ecx, [ebp - 0x2fc]
push ecx
push str.0.002
push str.NurbsTolerance
call fcn.0040acc0
mov ecx, eax
add ecx, 0x108
call fcn.00403d90
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edx, [ebp - 0x2fc]
push edx
call dword [sym.imp.MSVCRT.dll_atof]
add esp, 4
fstp qword [ebp - 0x304]
lea eax, [ebp - 0x254]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [ebp - 0x408]
push ecx
push 0
push 0x5f3af4
lea edx, [ebp - 0x254]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov ecx, dword [ebp - 0x434]
call sub.MFC42.DLL_CCmdTarget::BeginWaitCursor
push 1
push str.Please_wait...
push str.FIDIA_WS_COMPUTINGSPLINES
call dword [sym.imp.LANGUAGE.dll_char_const____cdecl_ReadLanguageString_char_const___char_const___int_]
add esp, 0xc
push eax
call fcn.0040fa80
push eax
lea ecx, [ebp - 0x2b8]
call fcn.00450f80
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x2b8]
call fcn.0040fb60
lea ecx, [ebp - 0x2b8]
call fcn.0042cb50
mov eax, dword [ebp - 0x300]
push eax
mov ecx, dword [ebp - 0x304]
push ecx
push 0x5f3b24
lea edx, [ebp - 0x150]
push edx
lea eax, [ebp - 0x41c]
push eax
call sub.MFC42.DLL_operator
mov dword [ebp - 0x440], eax
mov ecx, dword [ebp - 0x440]
mov dword [ebp - 0x444], ecx
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0x444]
call fcn.00403d90
push eax
lea ecx, [ebp - 0x150]
call fcn.00403d90
push eax
call fcn.004431e0
add esp, 0x10
mov dword [ebp - 0x2bc], eax
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x41c]
call fcn.0058df86
push str..dat
lea ecx, [ebp - 0x150]
call fcn.0058e586
lea ecx, [ebp - 0x2b8]
call sub.MFC42.DLL_CWnd::DestroyWindow
mov ecx, dword [ebp - 0x434]
call sub.MFC42.DLL_CCmdTarget::EndWaitCursor
cmp dword [ebp - 0x2bc], 0
je 0x4c97d6
push 0
push 0
push str.____Internal_error:_could_not_convert_file
mov edx, dword [ebp - 0x434]
mov ecx, dword [edx + 0x80]
call fcn.00488a88
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x2b8]
call fcn.004510f0
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax + 0xd0]
call dword [sym.imp.GDISPLAY.dll_public:_void___thiscall_CGraphDisplay::HideColorCode_void_]
mov ecx, dword [ebp - 0x434]
call fcn.004cd010
mov ecx, dword [ebp - 0x434]
mov dword [ecx + 0x168], 0
mov edx, dword [ebp - 0x434]
mov eax, dword [edx + 0x168]
push eax
mov ecx, dword [ebp - 0x434]
call fcn.004cd1b7
push 0x5f3b60
lea ecx, [ebp + 8]
push ecx
call fcn.0040adf0
and eax, 0xff
test eax, eax
je 0x4c9874
mov edx, dword [ebp - 0x434]
mov eax, dword [edx + 0xd4]
add eax, 0x48
push eax
mov ecx, dword [ebp - 0x434]
mov edx, dword [ecx + 0xd4]
add edx, 0x2c
push edx
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax + 0xd4]
call fcn.00409e06
jmp 0x4c98a8
mov ecx, dword [ebp - 0x434]
mov edx, dword [ecx + 0xd4]
add edx, 0x80
push edx
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax + 0xd4]
add ecx, 0x64
push ecx
mov edx, dword [ebp - 0x434]
mov ecx, dword [edx + 0xd4]
call fcn.00409e06
push 0
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax + 0xd0]
mov ecx, dword [ecx + 0x140]
call sub.MFC42.DLL_CWnd::ShowWindow
push 0
mov edx, dword [ebp - 0x434]
mov ecx, dword [edx + 0xd4]
call fcn.00408c06
push str.Loading
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax + 0xd0]
push ecx
call sub.MSVCRT.dll_strcpy
add esp, 8
mov edx, dword [ebp - 0x434]
mov eax, dword [edx + 0xd0]
mov ecx, dword [eax + 0x12c]
call sub.MFC42.DLL_CCmdTarget::BeginWaitCursor
push str.FIRST
lea ecx, [ebp + 8]
push ecx
call fcn.0040adf0
and eax, 0xff
test eax, eax
je 0x4c99e0
mov edx, dword [ebp - 0x434]
mov eax, dword [edx + 0xd4]
add eax, 0x534
push eax
mov ecx, dword [ebp - 0x434]
mov edx, dword [ecx + 0xd4]
add edx, 0x48
push edx
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax + 0xd4]
add ecx, 0x2c
push ecx
lea edx, [ebp - 0x150]
push edx
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax + 0xd4]
call fcn.004067a4
lea ecx, [ebp - 0x420]
push ecx
mov ecx, dword [ebp - 0x14c]
call sub.MFC42.DLL_CFileDialog::GetPathName
mov dword [ebp - 0x448], eax
mov edx, dword [ebp - 0x448]
mov dword [ebp - 0x44c], edx
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x44c]
push eax
mov ecx, dword [ebp - 0x434]
mov edx, dword [ecx + 0xd0]
mov ecx, dword [edx + 0x1e4]
add ecx, 0x518
call fcn.0058dfec
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x420]
call fcn.0058df86
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax + 0xd0]
mov dword [ecx + 0x20c], 2
jmp 0x4c9a9e
mov edx, dword [ebp - 0x434]
mov eax, dword [edx + 0xd4]
add eax, 0x538
push eax
mov ecx, dword [ebp - 0x434]
mov edx, dword [ecx + 0xd4]
add edx, 0x80
push edx
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax + 0xd4]
add ecx, 0x64
push ecx
lea edx, [ebp - 0x150]
push edx
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax + 0xd4]
call fcn.004067a4
lea ecx, [ebp - 0x424]
push ecx
mov ecx, dword [ebp - 0x14c]
call sub.MFC42.DLL_CFileDialog::GetPathName
mov dword [ebp - 0x450], eax
mov edx, dword [ebp - 0x450]
mov dword [ebp - 0x454], edx
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x454]
push eax
mov ecx, dword [ebp - 0x434]
mov edx, dword [ecx + 0xd0]
mov ecx, dword [edx + 0x1e4]
add ecx, 0x51c
call fcn.0058dfec
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x424]
call fcn.0058df86
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax + 0xd0]
mov dword [ecx + 0x210], 2
mov edx, dword [ebp - 0x434]
mov eax, dword [edx + 0xd4]
mov dword [eax + 0x10], 0
mov ecx, dword [ebp - 0x434]
mov edx, dword [ecx + 0xd4]
add edx, 0x9c
push edx
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax + 0xd4]
add ecx, 0x9c
push ecx
mov edx, dword [ebp - 0x434]
mov ecx, dword [edx + 0xd4]
call fcn.00409e06
mov eax, dword [ebp - 0x150]
push eax
push str.File__s
mov ecx, dword [ebp - 0x434]
mov edx, dword [ecx + 0xd0]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax + 0xd0]
mov ecx, dword [ecx + 0x12c]
call sub.MFC42.DLL_CCmdTarget::EndWaitCursor
mov dword [ebp - 0x144], 1
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x150]
call fcn.0058df86
mov edx, dword [ebp - 0x14c]
mov dword [ebp - 0x42c], edx
mov eax, dword [ebp - 0x42c]
mov dword [ebp - 0x428], eax
cmp dword [ebp - 0x428], 0
je 0x4c9b76
push 1
mov ecx, dword [ebp - 0x428]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x428]
call dword [edx + 4]
mov dword [ebp - 0x458], eax
jmp 0x4c9b80
mov dword [ebp - 0x458], 0
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ecx, dword [ebp - 0x144]
mov dword [ebp - 0x430], ecx
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x13c]
call fcn.0058df86
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x140]
call fcn.0058df86
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x148]
call fcn.0058df86
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.0058df86
mov eax, dword [ebp - 0x430]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4