Function at 0x1002de2f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x58], 0
push 0x1005646c
mov eax, dword [ebp + 8]
push eax
call sub.JsTools3D.dll_struct__iobuf____cdecl_open_file_char___char__
add esp, 8
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 0
jne 0x1002de5e
jmp 0x1002e05c
mov dword [ebp - 0xc], 0
mov ecx, dword [ebp - 0x64]
call sym.STools.dll_public:_class_CFPoint_const____thiscall_CFCoor::GetOrigin_void_const
mov dword [ebp - 0x54], eax
push 0
mov ecx, dword [ebp - 0x54]
call fcn.1002ee00
push 0xffffffffffffffff
push 0
mov ecx, dword [ebp - 0x54]
call sub.MFC42.DLL_CRichEditCtrl::SetSel
push 0
push 0x1005bd78
mov ecx, dword [ebp - 0x54]
call fcn.1002ed10
push 2
push 0
mov ecx, dword [ebp - 0x58]
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov edx, dword [ebp - 0x58]
push edx
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
mov dword [ebp - 4], eax
push 0
push 0
mov eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x4c]
add edx, 1
push edx
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x1002def8
mov eax, dword [ebp - 0x4c]
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x4c], eax
jmp 0x1002defa
jmp 0x1002df3b
cmp dword [ebp - 0x4c], 0
jne 0x1002df32
cmp dword [ebp - 0x58], 0
je 0x1002df2d
mov ecx, dword [ebp - 0x58]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov edx, dword [sym.imp.JsTools3D.dll_int_JS_OpenFileNum]
mov eax, dword [edx]
sub eax, 1
mov ecx, dword [sym.imp.JsTools3D.dll_int_JS_OpenFileNum]
mov dword [ecx], eax
mov dword [ebp - 0x58], 0
jmp 0x1002e05c
mov edx, 1
test edx, edx
jne 0x1002decd
mov eax, dword [ebp - 0x58]
mov ecx, dword [eax + 0xc]
and ecx, 0x10
test ecx, ecx
jne 0x1002dfd2
mov edx, dword [ebp - 0x58]
push edx
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
mov ecx, dword [ebp - 4]
sub ecx, eax
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
jg 0x1002df69
jmp 0x1002dfd2
mov edx, dword [ebp - 8]
cmp edx, dword [ebp - 0x4c]
jge 0x1002df99
mov eax, dword [ebp - 8]
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x58]
push ecx
mov edx, dword [ebp - 0x50]
push edx
push 1
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x50]
mov byte [ecx], 0
jmp 0x1002dfbf
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x50], edx
mov eax, dword [ebp - 0x58]
push eax
mov ecx, dword [ebp - 0x50]
push ecx
push 1
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x50]
mov byte [eax], 0
push 0
mov ecx, dword [ebp - 0xc]
push ecx
mov ecx, dword [ebp - 0x54]
call fcn.1002ed10
jmp 0x1002df3b
cmp dword [ebp - 0xc], 0
je 0x1002dff1
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0x60]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [ebp - 0xc], 0
cmp dword [ebp - 0x58], 0
je 0x1002e01e
mov ecx, dword [ebp - 0x58]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov edx, dword [sym.imp.JsTools3D.dll_int_JS_OpenFileNum]
mov eax, dword [edx]
sub eax, 1
mov ecx, dword [sym.imp.JsTools3D.dll_int_JS_OpenFileNum]
mov dword [ecx], eax
mov dword [ebp - 0x58], 0
push 0
mov ecx, dword [ebp - 0x54]
call fcn.1002ec80
push 0xffffffffffffffff
push 0
mov ecx, dword [ebp - 0x54]
call sub.MFC42.DLL_CRichEditCtrl::SetSel
lea edx, [ebp - 0x48]
push edx
mov ecx, dword [ebp - 0x54]
call sub.MFC42.DLL_CRichEditCtrl::GetSelectionCharFormat
mov byte [ebp - 0x30], 0x86
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x54]
call sub.MFC42.DLL_CRichEditCtrl::SetSelectionCharFormat
push 0
push 0
mov ecx, dword [ebp - 0x54]
call sub.MFC42.DLL_CRichEditCtrl::SetSel
mov esp, ebp
pop ebp
ret 4