// // cocos2d::CCTouchDispatcher::touches from 0x1800b6ec0 to 0x1800b7366 (1190 bytes) // // 8 xrefs: // > cocos2d::CCTouchDispatcher::touchesBegan @ 0x1800b73f7 // > cocos2d::CCTouchDispatcher::touchesCancelled @ 0x1800b7460 // > cocos2d::CCTouchDispatcher::touchesEnded @ 0x1800b7480 // > cocos2d::CCTouchDispatcher::touchesMoved @ 0x1800b74a0 // > @ 0x18014a278 // > @ 0x18014a2b8 // > @ 0x18014cf68 // > @ 0x1801c29dc // // 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:22:22 +0000 // void __fastcall cocos2d::CCTouchDispatcher::touches( cocos2d::CCTouchDispatcher *this, struct cocos2d::CCSet *a2, struct cocos2d::CCEvent *a3, unsigned int a4) { cocos2d::CCSet *v5; // rsi __int64 v7; // rdi cocos2d::CCDirector *v8; // rax cocos2d::CCArray *v9; // rcx int v10; // ebx int v11; // eax char v12; // r12 cocos2d::CCSet *v13; // r14 int v14; // edi _QWORD *v15; // rbx __int64 v16; // rax struct cocos2d::CCObject *v17; // rbp unsigned int *v18; // r14 __int64 v19; // rax cocos2d::CCNotificationObserver **v20; // r14 cocos2d::CCNotificationObserver **v21; // r12 cocos2d::CCNotificationObserver *v22; // rsi cocos2d::CCNotificationObserver *v23; // rcx struct cocos2d::CCObject *Target; // rax cocos2d::CCSet *Object; // rax cocos2d::CCSet *v26; // rax struct cocos2d::CCObject *v27; // rax cocos2d::CCSet *v28; // rax struct cocos2d::CCObject *v29; // rax cocos2d::CCSet *v30; // rax struct cocos2d::CCObject *v31; // rax __int64 **v32; // rcx __int64 i; // rax __int64 *j; // rcx __int64 v35; // rax unsigned int *v36; // rbx __int64 v37; // rax cocos2d::CCNotificationObserver **v38; // rbx cocos2d::CCNotificationObserver **k; // rsi cocos2d::CCNotificationObserver *v40; // rcx struct cocos2d::CCObject *v41; // rax struct cocos2d::CCObject *v42; // rax struct cocos2d::CCObject *v43; // rax struct cocos2d::CCObject *v44; // rax Concurrency::details::_NonReentrantLock *v45; // rcx unsigned int v46; // ebx __int64 v47; // rax unsigned int *v48; // rbx __int64 v49; // rax struct cocos2d::CCTouchHandler **v50; // rbx struct cocos2d::CCTouchHandler **m; // rsi struct cocos2d::CCTouchHandler *v52; // rdi __int64 v53; // rax __int64 v54; // r8 cocos2d::CCArray *v55; // rcx int v56; // [rsp+30h] [rbp-58h] cocos2d::CCSet *v57; // [rsp+38h] [rbp-50h] __int64 v58; // [rsp+40h] [rbp-48h] BYREF __int64 v59; // [rsp+48h] [rbp-40h] BYREF char v60; // [rsp+90h] [rbp+8h] v5 = a2; v7 = a4; v8 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::noteInput(v8); v9 = *((cocos2d::CCArray **)this + 8); *((_BYTE *)this + 80) = 1; v10 = cocos2d::CCArray::count(v9); v11 = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 9)); v56 = v11; if ( v10 && v11 ) { v12 = 1; v60 = 1; v13 = cocos2d::CCSet::mutableCopy(v5); } else { v12 = 0; v13 = v5; v60 = 0; } v14 = *((_DWORD *)this + v7 + 27); v57 = v13; if ( !v10 ) goto LABEL_37; v15 = (_QWORD *)*cocos2d::CCSet::begin((__int64)v5, &v59); if ( v15 == (_QWORD *)*cocos2d::CCSet::end((__int64)v5, &v58) ) goto LABEL_37; do { v16 = *((_QWORD *)this + 8); v17 = (struct cocos2d::CCObject *)v15[4]; if ( !v16 ) goto LABEL_25; v18 = *(unsigned int **)(v16 + 56); v19 = *v18; if ( !(_DWORD)v19 ) { v13 = v57; goto LABEL_25; } v20 = *((cocos2d::CCNotificationObserver ***)v18 + 2); v21 = &v20[v19 - 1]; if ( v20 > v21 ) { v13 = v57; v12 = v60; goto LABEL_25; } while ( 1 ) { v22 = *v20; if ( !*v20 ) { LABEL_23: v13 = v57; v12 = v60; goto LABEL_24; } v23 = *v20; if ( a4 ) break; Target = cocos2d::CCNotificationObserver::getTarget(v23); if ( (*(unsigned __int8 (__fastcall **)(struct cocos2d::CCObject *, struct cocos2d::CCObject *, struct cocos2d::CCEvent *))(*(_QWORD *)Target + 8LL))( Target, v17, a3) ) { Object = cocos2d::CCNotificationObserver::getObject(v22); cocos2d::CCSet::addObject(Object, v17); goto LABEL_21; } LABEL_22: if ( ++v20 > v21 ) goto LABEL_23; } v26 = cocos2d::CCNotificationObserver::getObject(v23); if ( !cocos2d::CCSet::containsObject(v26, v17) ) goto LABEL_22; switch ( v14 ) { case 1: v31 = cocos2d::CCNotificationObserver::getTarget(v22); (*(void (__fastcall **)(struct cocos2d::CCObject *, struct cocos2d::CCObject *, struct cocos2d::CCEvent *))(*(_QWORD *)v31 + 16LL))( v31, v17, a3); break; case 2: v29 = cocos2d::CCNotificationObserver::getTarget(v22); (*(void (__fastcall **)(struct cocos2d::CCObject *, struct cocos2d::CCObject *, struct cocos2d::CCEvent *))(*(_QWORD *)v29 + 24LL))( v29, v17, a3); v30 = cocos2d::CCNotificationObserver::getObject(v22); cocos2d::CCSet::removeObject(v30, v17); break; case 3: v27 = cocos2d::CCNotificationObserver::getTarget(v22); (*(void (__fastcall **)(struct cocos2d::CCObject *, struct cocos2d::CCObject *, struct cocos2d::CCEvent *))(*(_QWORD *)v27 + 32LL))( v27, v17, a3); v28 = cocos2d::CCNotificationObserver::getObject(v22); cocos2d::CCSet::removeObject(v28, v17); break; } LABEL_21: if ( !(unsigned __int8)cocos2d::CCTargetedTouchHandler::isSwallowsTouches(v22) ) goto LABEL_22; v12 = v60; v13 = v57; if ( v60 ) cocos2d::CCSet::removeObject(v57, v17); LABEL_24: v5 = a2; LABEL_25: v32 = (__int64 **)v15[2]; if ( *((_BYTE *)v32 + 25) ) { for ( i = v15[1]; !*(_BYTE *)(i + 25); i = *(_QWORD *)(i + 8) ) { if ( v15 != *(_QWORD **)(i + 16) ) break; v15 = (_QWORD *)i; } v15 = (_QWORD *)i; } else { v15 = (_QWORD *)v15[2]; for ( j = *v32; !*((_BYTE *)j + 25); j = (__int64 *)*j ) v15 = j; } } while ( v15 != (_QWORD *)*cocos2d::CCSet::end((__int64)v5, &v58) ); LABEL_37: if ( v56 ) { if ( (int)cocos2d::CCSet::count(v13) > 0 ) { v35 = *((_QWORD *)this + 9); if ( v35 ) { v36 = *(unsigned int **)(v35 + 56); v37 = *v36; if ( (_DWORD)v37 ) { v38 = *((cocos2d::CCNotificationObserver ***)v36 + 2); for ( k = &v38[v37 - 1]; v38 <= k; ++v38 ) { v40 = *v38; if ( !*v38 ) break; if ( v14 ) { switch ( v14 ) { case 1: v43 = cocos2d::CCNotificationObserver::getTarget(v40); (*(void (__fastcall **)(struct cocos2d::CCObject *, cocos2d::CCSet *, struct cocos2d::CCEvent *))(*(_QWORD *)v43 + 48LL))( v43, v13, a3); break; case 2: v42 = cocos2d::CCNotificationObserver::getTarget(v40); (*(void (__fastcall **)(struct cocos2d::CCObject *, cocos2d::CCSet *, struct cocos2d::CCEvent *))(*(_QWORD *)v42 + 56LL))( v42, v13, a3); break; case 3: v41 = cocos2d::CCNotificationObserver::getTarget(v40); (*(void (__fastcall **)(struct cocos2d::CCObject *, cocos2d::CCSet *, struct cocos2d::CCEvent *))(*(_QWORD *)v41 + 64LL))( v41, v13, a3); break; } } else { v44 = cocos2d::CCNotificationObserver::getTarget(v40); (*(void (__fastcall **)(struct cocos2d::CCObject *, cocos2d::CCSet *, struct cocos2d::CCEvent *))(*(_QWORD *)v44 + 40LL))( v44, v13, a3); } } } } } } if ( v12 ) cocos2d::CCObject::release(v13); *((_BYTE *)this + 80) = 0; if ( *((_BYTE *)this + 82) ) { v45 = *((Concurrency::details::_NonReentrantLock **)this + 12); v46 = 0; for ( *((_BYTE *)this + 82) = 0; v46 < *(_DWORD *)v45; ++v46 ) { cocos2d::CCTouchDispatcher::forceRemoveDelegate( this, *(struct cocos2d::CCTouchDelegate **)(*((_QWORD *)v45 + 2) + 8LL * v46)); v45 = *((Concurrency::details::_NonReentrantLock **)this + 12); } Concurrency::details::_NonReentrantLock::_Release(v45); } if ( *((_BYTE *)this + 81) ) { v47 = *((_QWORD *)this + 11); *((_BYTE *)this + 81) = 0; if ( v47 ) { v48 = *(unsigned int **)(v47 + 56); v49 = *v48; if ( (_DWORD)v49 ) { v50 = *((struct cocos2d::CCTouchHandler ***)v48 + 2); for ( m = &v50[v49 - 1]; v50 <= m; ++v50 ) { v52 = *v50; if ( !*v50 ) break; v53 = _RTDynamicCast( v52, 0, &cocos2d::CCTouchHandler `RTTI Type Descriptor', &cocos2d::CCTargetedTouchHandler `RTTI Type Descriptor', 0); v54 = 64; if ( !v53 ) v54 = 72; cocos2d::CCTouchDispatcher::forceAddHandler(this, v52, *(struct cocos2d::CCArray **)((char *)this + v54)); } } } cocos2d::CCArray::removeAllObjects(*((cocos2d::CCArray **)this + 11)); } if ( *((_BYTE *)this + 104) ) { v55 = *((cocos2d::CCArray **)this + 9); *((_BYTE *)this + 104) = 0; cocos2d::CCArray::removeAllObjects(v55); cocos2d::CCArray::removeAllObjects(*((cocos2d::CCArray **)this + 8)); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source