//
// BoomScrollLayer::ccTouchMoved from 0x14003e820 to 0x14003eb58 (824 bytes)
//
// 2 xrefs:
// > ??> @ 0x14052b698
// > ??> @ 0x1406c40d4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=1
void BoomScrollLayer::ccTouchMoved(BoomScrollLayer *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
cocos2d::CCDirector *v6; // rax
struct cocos2d::CCPoint v7; // rax
cocos2d::CCSet *v8; // rbx
__int64 v9; // rax
__int64 v10; // rax
__int64 v11; // rax
cocos2d::CCTouchDispatcher *v12; // rax
cocos2d::CCTargetedTouchHandler *Handler; // rbx
cocos2d::CCSet *ClaimedTouches; // rax
cocos2d::CCSet *v15; // rax
cocos2d::CCNode *m_pParent; // rcx
cocos2d::CCComponentContainer **p_m_pComponentContainer; // rbx
float *v18; // rax
float v19; // xmm9_4
cocos2d::CCPoint v20; // rdx
int v21; // esi
float *v22; // rax
float v23; // xmm7_4
cocos2d::CCArray *v24; // rcx
float v25; // xmm6_4
cocos2d::CCDirector *v26; // rax
float v27; // xmm7_4
__int64 v28; // rbx
__int64 v29; // rax
float v30; // [rsp+80h] [rbp+8h] BYREF
cocos2d::CCSet *v31; // [rsp+88h] [rbp+10h] BYREF
if ( *(cocos2d::CCTouch **)&a1->m_sTransform.b == a2 && !LOBYTE(a1->m_eScriptType) )
{
cocos2d::CCTouch::getLocationInView(a2);
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector();
v7 = cocos2d::CCDirector::convertToGL(v6, (const struct cocos2d::CCPoint *)&v31);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v30, v7);
if ( LODWORD(a1->m_sAdditionalTransform.tx) == 1 )
goto LABEL_11;
if ( fabs(v30 - a1->m_obAnchorPoint.x) >= *((float *)&a1->m_pUserData + 1) )
{
cocos2d::CCNode::stopActionByTag(*(cocos2d::CCNode **)&a1->m_sInverse.d, 2);
LOBYTE(a1->m_pUserData) = 0;
LODWORD(a1->m_sAdditionalTransform.tx) = 1;
a1->m_obAnchorPoint.x = v30;
if ( LOBYTE(a1->m_pShaderProgram) )
{
v8 = (cocos2d::CCSet *)operator new(0x40u);
v31 = v8;
cocos2d::CCSet::CCSet(v8);
v8->__vftable = (cocos2d::CCSet_vtbl *)&cocos2d::CCSet::`vftable';
cocos2d::CCSet::addObject(v8, a2);
cocos2d::CCObject::autorelease(v8);
LOBYTE(a1->m_sAdditionalTransform.ty) = 1;
v9 = cocos2d::CCDirector::sharedDirector();
v10 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 144LL))(v9);
(*(void (__fastcall **)(__int64, cocos2d::CCSet *, cocos2d::CCEvent *))(*(_QWORD *)(v10 + 56) + 24LL))(
v10 + 56,
v8,
a3);
LOBYTE(a1->m_sAdditionalTransform.ty) = 0;
v11 = cocos2d::CCDirector::sharedDirector();
v12 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 144LL))(v11);
Handler = (cocos2d::CCTargetedTouchHandler *)cocos2d::CCTouchDispatcher::findHandler(
v12,
(struct cocos2d::CCTouchDelegate *)a1);
ClaimedTouches = cocos2d::CCTargetedTouchHandler::getClaimedTouches(Handler);
if ( !cocos2d::CCSet::containsObject(ClaimedTouches, a2) )
{
v15 = cocos2d::CCTargetedTouchHandler::getClaimedTouches(Handler);
cocos2d::CCSet::addObject(v15, a2);
}
}
m_pParent = a1->m_pParent;
if ( m_pParent )
m_pParent->copyWithZone(m_pParent, (cocos2d::CCZone *)&a1[-1].m_pComponentContainer);
}
if ( LODWORD(a1->m_sAdditionalTransform.tx) == 1 )
{
LABEL_11:
p_m_pComponentContainer = &a1[-1].m_pComponentContainer;
v18 = (float *)((__int64 (__fastcall *)(cocos2d::CCComponentContainer **))a1[-1].m_pComponentContainer[12].m_pOwner)(&a1[-1].m_pComponentContainer);
v19 = (float)(v30 - (float)((float)(*v18 - *(float *)&a1->m_pActionManager) * (float)SHIDWORD(a1->m_pScheduler)))
- a1->m_obAnchorPoint.x;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v31, v19, 0.0);
v21 = BoomScrollLayer::pageNumberForPosition((BoomScrollLayer *)((char *)a1 - 320), v20);
v22 = (float *)((__int64 (__fastcall *)(cocos2d::CCComponentContainer **))a1[-1].m_pComponentContainer[12].m_pOwner)(&a1[-1].m_pComponentContainer);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v31,
(float)(*v22 - *((float *)&(&a1[-1].m_pComponentContainer)[3] + 2)) * (float)-v21,
0.0);
v23 = v19 - *(float *)&v31;
if ( (v21 || v23 <= 0.0)
&& (!*((_BYTE *)p_m_pComponentContainer + 448)
? (v24 = (cocos2d::CCArray *)p_m_pComponentContainer[59])
: (v24 = (cocos2d::CCArray *)p_m_pComponentContainer[55]),
v21 != cocos2d::CCArray::count(v24) - 1 || v23 >= 0.0) )
{
v27 = 0.0;
}
else
{
v25 = *((float *)&a1->m_pUserObject + 1);
v26 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector();
v27 = v23 - (float)((float)(v25 * v23) / **(float **)&cocos2d::CCDirector::getWinSize(v26));
}
v28 = **(_QWORD **)&a1->m_sInverse.d;
v29 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v31, v19 - v27, 0.0);
(*(void (__fastcall **)(_QWORD, __int64))(v28 + 184))(*(_QWORD *)&a1->m_sInverse.d, v29);
}
}
}