//
// EditorWindowPopup::ccTouchEnded from 0x14017f7c0 to 0x14017f971 (433 bytes)
//
// 7 xrefs:
// > ??> @ 0x1407327a8
// > ??> @ 0x140733350
// > ??> @ 0x140748d70
// > ??> @ 0x140749558
// > ??> @ 0x1407663e0
// > ??> @ 0x140766af0
// > ??> @ 0x140918af4
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:27:36 +0000
//
void __fastcall EditorWindowPopup::ccTouchEnded(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v3; // rdi
__int64 v5; // rsi
bool v7; // zf
__int64 v8; // rcx
const struct cocos2d::CCPoint *Location; // rax
float *v10; // rax
cocos2d::CCPoint *v11; // rax
__int64 v12; // rcx
char v13; // di
__int64 v14; // rcx
__int64 *v15; // rcx
__int64 v16; // rax
char v17; // [rsp+40h] [rbp+8h] BYREF
char v18; // [rsp+48h] [rbp+10h] BYREF
v3 = a1 - 320;
v5 = a2;
if ( *(_DWORD *)(a2 + 56) != *(_DWORD *)(a1 + 740) )
return;
v7 = *(_BYTE *)(a1 + 757) == 0;
*(_DWORD *)(a1 + 740) = -1;
if ( !v7 )
{
*(_BYTE *)(a1 + 757) = 0;
(*(void (__fastcall **)(__int64))(*(_QWORD *)(*(_QWORD *)(a1 + 232) + 320LL) + 24LL))(*(_QWORD *)(a1 + 232) + 320LL);
return;
}
if ( *(_BYTE *)(a1 + 758) )
{
*(_BYTE *)(a1 + 758) = 0;
v8 = *(_QWORD *)(a1 + 696);
if ( v8 )
{
LOBYTE(a2) = -1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)(v8 + 320) + 40LL))(v8 + 320, a2);
}
Location = (const struct cocos2d::CCPoint *)cocos2d::CCTouch::getLocation(v5, &v17);
if ( EditorWindowPopup::isInCloseButton(v3, Location) )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 1104LL))(v3, 0);
return;
}
if ( *(_DWORD *)(a1 + 760) )
{
*(_DWORD *)(a1 + 760) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v17, (const struct cocos2d::CCPoint *)(a1 + 732));
v11 = EditorWindowPopup::clampWindowCenter(v3, (cocos2d::CCPoint *)&v18, v10);
cocos2d::CCPoint::operator=(v3 + 1052, v11);
EditorWindowPopup::layoutWindow(v3);
return;
}
if ( *(_BYTE *)(a1 + 744) )
{
*(_BYTE *)(v3 + 1064) = 0;
return;
}
v12 = *(_QWORD *)(v3 + 1024);
if ( v12 && *(_BYTE *)(v12 + 480) )
{
v13 = 1;
LABEL_17:
ScrollableContentLayer::handleTouchEnded(v12, a2);
goto LABEL_18;
}
v13 = 0;
if ( v12 )
goto LABEL_17;
LABEL_18:
if ( *(_BYTE *)(a1 + 756) )
{
v14 = *(_QWORD *)(a1 + 712);
if ( v14 )
{
v15 = (__int64 *)(v14 + 320);
v16 = *v15;
if ( v13 )
(*(void (__fastcall **)(__int64 *, __int64, __int64))(v16 + 32))(v15, v5, a3);
else
(*(void (__fastcall **)(__int64 *, __int64, __int64))(v16 + 24))(v15, v5, a3);
*(_BYTE *)(a1 + 756) = 0;
}
}
}