//
// ThreadViewPopup::checkMessageTap from 0xc77330 to 0xc774d4 (420 bytes)
//
// 2 xrefs:
// > ThreadViewPopup::ccTouchEnded @ 0xc77574
// > ??> @ 0x5fe60
//
// This function is hookable on this platform (idp: arm, 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 13:05:33 +0000
//
__int64 __fastcall ThreadViewPopup::checkMessageTap(cocos2d::CCNode **this, cocos2d::CCTouch *a2)
{
__int64 v4; // x22
signed int v5; // w23
__int64 v6; // x0
__int64 v7; // x0
__int64 v8; // x0
__int64 v9; // [xsp+40h] [xbp+40h] BYREF
__int64 v10; // [xsp+48h] [xbp+48h] BYREF
float v11[2]; // [xsp+50h] [xbp+50h] BYREF
__int64 v12[2]; // [xsp+58h] [xbp+58h] BYREF
if ( *(this + 103) )
{
if ( *(this + 134) != *(this + 135) )
{
cocos2d::CCTouch::getLocation(&v9, a2);
cocos2d::CCNode::convertToWorldSpace(&v10, *(this + 103), (const cocos2d::CCPoint *)&unk_155EE20);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v11, (cocos2d::CCNode *)((char *)*(this + 103) + 424));
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v12, *(float *)&v10, *((float *)&v10 + 1), v11[0], v11[1]);
if ( (unsigned __int8)cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v12, (const cocos2d::CCPoint *)&v9) )
{
v4 = 0;
v5 = 0;
cocos2d::CCNode::convertToNodeSpace(
v12,
*((cocos2d::CCNode **)*(this + 103) + 52),
(const cocos2d::CCPoint *)&v9);
v6 = (__int64)*(this + 134);
if ( (int)(-1227133513 * (((__int64)*(this + 135) - v6) >> 2)) > 0 )
{
while ( !(unsigned __int8)cocos2d::CCRect::containsPoint(
(cocos2d::CCRect *)(v6 + v4 + 8),
(const cocos2d::CCPoint *)v12) )
{
v6 = (__int64)*(this + 134);
++v5;
v4 += 28;
if ( v5 >= (int)(-1227133513 * (((__int64)*(this + 135) - v6) >> 2)) )
return _stack_chk_guard;
}
v7 = (__int64)*(this + 116);
if ( v7 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 1160LL))(v7, 0);
v8 = LevelBadgePopup::create(
(LevelBadgePopup *)*(unsigned int *)((char *)*(this + 134) + v4),
*((_BYTE *)*(this + 134) + v4 + 4));
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 1312LL))(v8);
}
}
}
}
return _stack_chk_guard;
}