Function at 0x40c787
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f7514
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x218
push esi
push edi
mov dword [ebp - 0x1e8], ecx
call dword [sym.imp.DataMgr.dll_class_CDataMgr____cdecl_gf_GetDataMgr_void_]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40c7c1
jmp 0x40cf5e
call dword [sym.imp.DataMgr.dll_class_CFrameWnd____cdecl_gf_GetMainFrame_void_]
mov ecx, eax
call fcn.0040e520
push eax
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x40cf5e
mov dword [ebp - 0x14], 0
call dword [sym.imp.DataMgr.dll_unsigned_int___cdecl_gf_GetClipboardFormat_void_]
push eax
call dword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
je 0x40cbce
call dword [sym.imp.DataMgr.dll_unsigned_int___cdecl_gf_GetClipboardFormat_void_]
push eax
call dword [sym.imp.USER32.dll_GetClipboardData]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40cbce
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40cbc4
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov dword [ebp - 0x1c], eax
push 0
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x18]
push eax
lea ecx, [ebp - 0x48]
call sub.MFC42u.DLL_CMemFile::CMemFile_1
mov dword [ebp - 4], 0
push 0x150
call sub.MFC42u.DLL_operatornew
add esp, 4
mov dword [ebp - 0x154], eax
mov byte [ebp - 4], 1
cmp dword [ebp - 0x154], 0
je 0x40c896
mov ecx, dword [ebp - 0x154]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CEntGroup::constructor_void_]
mov ecx, dword [ebp - 0x154]
mov dword [ecx], 0x508f6c
mov edx, dword [ebp - 0x154]
mov dword [ebp - 0x1ec], edx
jmp 0x40c8a0
mov dword [ebp - 0x1ec], 0
mov eax, dword [ebp - 0x1ec]
mov dword [ebp - 0x150], eax
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x150]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
push edx
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.DataMgr.dll_int___cdecl_ImportEzdFile_class_CFile___class_CEntity__]
add esp, 8
test eax, eax
je 0x40c922
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x20]
call dword [edx + 4]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x15c], eax
mov ecx, dword [ebp - 0x15c]
mov dword [ebp - 0x158], ecx
cmp dword [ebp - 0x158], 0
je 0x40c911
push 1
mov edx, dword [ebp - 0x158]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x158]
call dword [eax]
mov dword [ebp - 0x1f0], eax
jmp 0x40c91b
mov dword [ebp - 0x1f0], 0
mov dword [ebp - 0x20], 0
cmp dword [ebp - 0x20], 0
je 0x40cbb5
push 2
call dword [sym.imp.DataMgr.dll_class_CDrawDC____cdecl_gf_GetDrawDC_void_]
mov ecx, eax
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CDrawDC::SetCurBuffer_int_]
mov ecx, dword [ebp - 0x10]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CDataMgr::ResetPickParam_void_]
push ecx
mov ecx, esp
mov dword [ebp - 0x160], esp
push str.paste
call sub.MFC42u.DLL_CString::CString_1
mov dword [ebp - 0x1f4], eax
mov ecx, dword [ebp - 0x1f4]
mov dword [ebp - 0x1f8], ecx
mov byte [ebp - 4], 2
push ecx
mov ecx, esp
mov dword [ebp - 0x164], esp
push 0x537ee0
call sub.MFC42u.DLL_CString::CString_1
mov dword [ebp - 0x1fc], eax
lea edx, [ebp - 0x168]
push edx
mov byte [ebp - 4], 0
call dword [sym.imp.DataMgr.dll_class_CString___cdecl_gf_Str_class_CString__class_CString_]
add esp, 0xc
mov dword [ebp - 0x200], eax
mov eax, dword [ebp - 0x200]
mov dword [ebp - 0x204], eax
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x204]
call fcn.0040e380
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x10]
call dword [edx + 0x64]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x168]
call fcn.004f5766
mov ecx, dword [ebp - 0x10]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CDataMgr::BeginPick_void_]
call dword [sym.imp.DataMgr.dll_class_CEzcadCfg____cdecl_gf_GetCfg_void_]
mov dword [ebp - 0x98], eax
lea ecx, [ebp - 0xe0]
call dword [sym.imp.QLib.dll_public:_void___thiscall_CMatrix2d::constructor_void_]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x90]
call dword [sym.imp.QLib.dll_public:_void___thiscall_CMatrix2d::constructor_void_]
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x98]
add eax, 0x490
push eax
mov ecx, dword [ebp - 0x98]
add ecx, 0x488
push ecx
lea edx, [ebp - 0x1b0]
push edx
lea ecx, [ebp - 0xe0]
call dword [sym.imp.mathlib.dll_public:_class_CMatrix2d___thiscall_CMatrix2d::Move_double_const___double_const__]
lea ecx, [ebp - 0x1b0]
call dword [sym.imp.mathlib.dll_public:_void___thiscall_CMatrix2d::destructor_void_]
mov ecx, dword [ebp - 0x20]
call dword [sym.imp.DataMgr.dll_public:_class_CEntity____thiscall_CEntity::GetChildHead_void_]
mov dword [ebp - 0x94], eax
cmp dword [ebp - 0x94], 0
je 0x40cb1a
mov ecx, dword [ebp - 0x94]
call dword [sym.imp.DataMgr.dll_public:_class_CEntity____thiscall_CEntity::GetNext_void_]
mov dword [ebp - 0xe4], eax
mov ecx, dword [ebp - 0x94]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CEntity::Remove_void_]
push 1
lea eax, [ebp - 0xe0]
push eax
mov ecx, dword [ebp - 0x94]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x94]
call dword [edx + 0x54]
push 0
mov eax, dword [ebp - 0x94]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x94]
call dword [edx + 0x14]
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x94]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CEntity::UD_AddToChildTail_class_CEntity__]
push 0
mov ecx, dword [ebp - 0x94]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CEntity::Pick_int_]
push 1
mov ecx, dword [ebp - 0x94]
push ecx
mov ecx, dword [ebp - 0x10]
call dword [sym.imp.DataMgr.dll_public:_int___thiscall_CDataMgr::PickEntity_class_CEntity___int_]
push 0
sub esp, 0x48
mov ecx, 0x12
lea esi, [ebp - 0x90]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
push 0
call dword [sym.imp.DataMgr.dll_class_CDrawDC____cdecl_gf_GetDrawDC_void_]
push eax
mov edx, dword [ebp - 0x94]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x94]
call dword [eax + 0x4c]
mov ecx, dword [ebp - 0xe4]
mov dword [ebp - 0x94], ecx
jmp 0x40ca53
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x1b8], edx
mov eax, dword [ebp - 0x1b8]
mov dword [ebp - 0x1b4], eax
cmp dword [ebp - 0x1b4], 0
je 0x40cb52
push 1
mov ecx, dword [ebp - 0x1b4]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x1b4]
call dword [edx]
mov dword [ebp - 0x208], eax
jmp 0x40cb5c
mov dword [ebp - 0x208], 0
push 0
mov ecx, dword [ebp - 0x10]
call dword [sym.imp.DataMgr.dll_public:_int___thiscall_CDataMgr::UpdataBoundBox_int_]
mov ecx, dword [ebp - 0x10]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CDataMgr::EndPick_void_]
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x10]
call dword [edx + 0x68]
push 0
call dword [sym.imp.DataMgr.dll_class_CDrawDC____cdecl_gf_GetDrawDC_void_]
push eax
mov eax, dword [ebp - 0x1e8]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x1e8]
call dword [edx + 0x68]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x90]
call dword [sym.imp.mathlib.dll_public:_void___thiscall_CMatrix2d::destructor_void_]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xe0]
call dword [sym.imp.mathlib.dll_public:_void___thiscall_CMatrix2d::destructor_void_]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.004f57d2
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push 8
call dword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
je 0x40cf58
push 8
call dword [sym.imp.USER32.dll_GetClipboardData]
mov dword [ebp - 0xf0], eax
mov ecx, dword [ebp - 0xf0]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov dword [ebp - 0xec], eax
mov edx, dword [ebp - 0xec]
push edx
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0xe8], eax
cmp dword [ebp - 0xe8], 0
je 0x40cc7a
mov eax, dword [ebp - 0xe8]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0xfc], eax
mov ecx, dword [ebp - 0xf0]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0xf8], eax
mov edx, dword [ebp - 0xec]
push edx
mov eax, dword [ebp - 0xf8]
push eax
mov ecx, dword [ebp - 0xfc]
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0xe8]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0xf0]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [ebp - 0xe8]
mov dword [ebp - 0xf4], ecx
cmp dword [ebp - 0xf4], 0
je 0x40cf58
call dword [sym.imp.DataMgr.dll_class_CEzcadCfg____cdecl_gf_GetCfg_void_]
mov dword [ebp - 0x100], eax
push 0x3d0
call sub.MFC42u.DLL_operatornew
add esp, 4
mov dword [ebp - 0x1c0], eax
mov dword [ebp - 4], 6
cmp dword [ebp - 0x1c0], 0
je 0x40cce8
mov ecx, dword [ebp - 0x1c0]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CEntBitmap::constructor_void_]
mov edx, dword [ebp - 0x1c0]
mov dword [edx], 0x508f08
mov eax, dword [ebp - 0x1c0]
mov dword [ebp - 0x20c], eax
jmp 0x40ccf2
mov dword [ebp - 0x20c], 0
mov ecx, dword [ebp - 0x20c]
mov dword [ebp - 0x1bc], ecx
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1bc]
mov dword [ebp - 0x104], edx
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x1d0]
call dword [sym.imp.QLib.dll_public:_void___thiscall_Pt2d::constructor_double__double_]
push eax
mov eax, dword [ebp - 0xf4]
push eax
mov ecx, dword [ebp - 0x104]
call dword [sym.imp.DataMgr.dll_public:_int___thiscall_CEntBitmap::Create_void___class_Pt2d_const__]
test eax, eax
jne 0x40cd91
mov ecx, dword [ebp - 0x104]
mov dword [ebp - 0x1d8], ecx
mov edx, dword [ebp - 0x1d8]
mov dword [ebp - 0x1d4], edx
cmp dword [ebp - 0x1d4], 0
je 0x40cd78
push 1
mov eax, dword [ebp - 0x1d4]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x1d4]
call dword [edx]
mov dword [ebp - 0x210], eax
jmp 0x40cd82
mov dword [ebp - 0x210], 0
mov dword [ebp - 0x104], 0
jmp 0x40cf41
lea ecx, [ebp - 0x14c]
call dword [sym.imp.QLib.dll_public:_void___thiscall_CMatrix2d::constructor_void_]
mov dword [ebp - 4], 7
push 2
call dword [sym.imp.DataMgr.dll_class_CDrawDC____cdecl_gf_GetDrawDC_void_]
mov ecx, eax
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CDrawDC::SetCurBuffer_int_]
mov eax, dword [ebp - 0x100]
mov ecx, dword [eax + 0x438]
push ecx
mov ecx, dword [ebp - 0x104]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CEntity::SetPen_int_]
mov ecx, dword [ebp - 0x10]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CDataMgr::ResetPickParam_void_]
push ecx
mov ecx, esp
mov dword [ebp - 0x1dc], esp
push str.Paste
call sub.MFC42u.DLL_CString::CString_1
mov dword [ebp - 0x214], eax
mov edx, dword [ebp - 0x214]
mov dword [ebp - 0x218], edx
mov byte [ebp - 4], 8
push ecx
mov ecx, esp
mov dword [ebp - 0x1e0], esp
push str.PICK_PASTE
call sub.MFC42u.DLL_CString::CString_1
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x1e4]
push eax
mov byte [ebp - 4], 7
call dword [sym.imp.DataMgr.dll_class_CString___cdecl_gf_Str_class_CString__class_CString_]
add esp, 0xc
mov dword [ebp - 0x220], eax
mov ecx, dword [ebp - 0x220]
mov dword [ebp - 0x224], ecx
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x224]
call fcn.0040e380
push eax
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x10]
call dword [eax + 0x64]
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x1e4]
call fcn.004f5766
mov ecx, dword [ebp - 0x10]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CDataMgr::BeginPick_void_]
push 0
mov ecx, dword [ebp - 0x104]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CEntity::Pick_int_]
push 1
mov ecx, dword [ebp - 0x104]
push ecx
mov ecx, dword [ebp - 0x10]
call dword [sym.imp.DataMgr.dll_public:_int___thiscall_CDataMgr::PickEntity_class_CEntity___int_]
mov edx, dword [ebp - 0x10]
push edx
mov ecx, dword [ebp - 0x104]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CEntity::UD_AddToChildTail_class_CEntity__]
push 0
mov eax, dword [ebp - 0x104]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x104]
call dword [edx + 0x14]
push 2
mov eax, dword [ebp - 0x104]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x104]
call dword [edx + 0x14]
push 0
sub esp, 0x48
mov ecx, 0x12
lea esi, [ebp - 0x14c]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
push 0
call dword [sym.imp.DataMgr.dll_class_CDrawDC____cdecl_gf_GetDrawDC_void_]
push eax
mov eax, dword [ebp - 0x104]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x104]
call dword [edx + 0x4c]
push 0
mov ecx, dword [ebp - 0x10]
call dword [sym.imp.DataMgr.dll_public:_int___thiscall_CDataMgr::UpdataBoundBox_int_]
mov ecx, dword [ebp - 0x10]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CDataMgr::EndPick_void_]
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x10]
call dword [edx + 0x68]
push 0
call dword [sym.imp.DataMgr.dll_class_CDrawDC____cdecl_gf_GetDrawDC_void_]
push eax
mov eax, dword [ebp - 0x1e8]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x1e8]
call dword [edx + 0x68]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14c]
call dword [sym.imp.mathlib.dll_public:_void___thiscall_CMatrix2d::destructor_void_]
mov eax, dword [ebp - 0xf4]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [ebp - 0xf4], 0
call dword [sym.imp.USER32.dll_CloseClipboard]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret