// // ControllerInputNode::init from 0xc965a8 to 0xc96a9c (1268 bytes) // // 2 xrefs: // > ControllerInputNode::create @ 0xc96b4c // > @ 0x6c910 // // 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:53 +0000 // __int64 __fastcall ControllerInputNode::init( ControllerInputNode *this, InputCaptureDelegate *a2, const cocos2d::CCSize *a3) { __int64 v6; // x0 float v7; // s8 void (__fastcall *v8)(ControllerInputNode *, __int64 *); // x19 void (__fastcall *v9)(ControllerInputNode *, __int64 *); // x19 float v10; // s10 float v11; // s0 __int64 v12; // x0 __int64 v13; // x19 void (__fastcall *v14)(__int64, __int64 *); // x21 __int64 v15; // x0 cocos2d::CCMenu *v16; // x0 cocos2d::CCDirector **v17; // x24 cocos2d::CCDirector *v18; // x0 __int64 v19; // x0 cocos2d::CCTouchDispatcher *v20; // x0 unsigned int v21; // w19 char *v22; // x28 __int64 v23; // x0 __int64 *v24; // x1 __int64 v25; // x0 __int64 v26; // x27 __int64 v27; // x1 __int64 v28; // x1 bool *v29; // x2 cocos2d::CCSprite *v30; // x0 const char *v31; // x1 float v32; // w27 void (__fastcall *v33)(__int64, float); // x27 __int64 v34; // x0 void (__fastcall *v35)(__int64, __int64 *); // x27 void (__fastcall *v36)(cocos2d::CCDirector **, _QWORD); // x19 __int64 v37; // x0 __int64 v38; // x0 unsigned __int8 v39; // [xsp+94h] [xbp+94h] __int64 v40; // [xsp+98h] [xbp+98h] float v42; // [xsp+A0h] [xbp+A0h] void (__fastcall *v43)(__int64, float); // [xsp+A0h] [xbp+A0h] __int64 v44; // [xsp+A0h] [xbp+A0h] __int64 v45; // [xsp+A0h] [xbp+A0h] _BYTE v46[8]; // [xsp+B0h] [xbp+B0h] BYREF _BYTE v47[8]; // [xsp+B8h] [xbp+B8h] BYREF __int64 v48; // [xsp+C0h] [xbp+C0h] BYREF _BYTE v49[8]; // [xsp+C8h] [xbp+C8h] BYREF __int64 v50; // [xsp+D0h] [xbp+D0h] BYREF v39 = cocos2d::CCNode::init(this); if ( v39 ) { *((_QWORD *)this + 40) = a2; v6 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"controller_outline.png", (const char *)a2); *((_QWORD *)this + 43) = v6; if ( v6 ) { v7 = *((float *)a3 + 1) / 276.0; if ( (float)(*(float *)a3 / 400.0) <= v7 ) v7 = *(float *)a3 / 400.0; v8 = *(void (__fastcall **)(ControllerInputNode *, __int64 *))(*(_QWORD *)this + 320LL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v50, v7 * 400.0, v7 * 276.0); v8(this, &v50); v9 = *(void (__fastcall **)(ControllerInputNode *, __int64 *))(*(_QWORD *)this + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v50, 0.5, 0.5); v9(this, &v50); v10 = *(float *)(*(__int64 (__fastcall **)(ControllerInputNode *))(*(_QWORD *)this + 328LL))(this); v11 = v10 / *(float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 43) + 328LL))(*((_QWORD *)this + 43)); v12 = *((_QWORD *)this + 43); *((float *)this + 84) = v11; (*(void (__fastcall **)(__int64))(*(_QWORD *)v12 + 160LL))(v12); (*(void (__fastcall **)(_QWORD, void *))(**((_QWORD **)this + 43) + 960LL))(*((_QWORD *)this + 43), &unk_11A1BD8); v13 = *((_QWORD *)this + 43); v14 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v13 + 184LL); v42 = *(float *)(*(__int64 (__fastcall **)(ControllerInputNode *))(*(_QWORD *)this + 328LL))(this) * 0.5; v15 = (*(__int64 (__fastcall **)(ControllerInputNode *))(*(_QWORD *)this + 328LL))(this); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v50, v42, (float)(*(float *)(v15 + 4) * 0.5) + 10.0); v14(v13, &v50); v16 = (cocos2d::CCMenu *)(*(__int64 (__fastcall **)(ControllerInputNode *, _QWORD))(*(_QWORD *)this + 456LL))( this, *((_QWORD *)this + 43)); v17 = (cocos2d::CCDirector **)cocos2d::CCMenu::create(v16); (*((void (__fastcall **)(cocos2d::CCDirector **, void *))*v17 + 23))(v17, &unk_155EF10); v18 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(ControllerInputNode *, cocos2d::CCDirector **, __int64))(*(_QWORD *)this + 464LL))( this, v17, 2); v19 = cocos2d::CCDirector::sharedDirector(v18); v20 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v19 + 160LL))(v19); if ( (unsigned __int8)cocos2d::CCTouchDispatcher::isUsingForcePrio(v20) ) { v36 = *((void (__fastcall **)(cocos2d::CCDirector **, _QWORD))*v17 + 128); v37 = cocos2d::CCDirector::sharedDirector(*v17); v38 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v37 + 160LL))(v37); v36(v17, (unsigned int)(*(_DWORD *)(v38 + 128) - 1)); } v21 = 0; v22 = (char *)&unk_13FB144; while ( 1 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, v7 * *((float *)v22 + 3), v7 * *((float *)v22 + 4)); v30 = (cocos2d::CCSprite *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, (const cocos2d::CCPoint *)v46); v32 = *(float *)v22; if ( *(_DWORD *)v22 ) { if ( LODWORD(v32) == 1 ) { v48 = cocos2d::CCSprite::create(v30); v45 = v48; v35 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v48 + 320LL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v50, 17.0, 17.0); v35(v45, &v50); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v49, (float)*((int *)v22 + 5) * 15.0, (float)*((int *)v22 + 6) * 15.0); cocos2d::CCPoint::operator+(&v50, v46); cocos2d::CCPoint::operator=(v47, &v50); cocos2d::CCPoint::operator=((char *)this + 416, v46); } else { v48 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_select_001.png", v31); v40 = v48; v43 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v48 + 160LL); v23 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v48 + 328LL))(v48); v43(v40, 14.0 / *(float *)(v23 + 4)); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v49, (float)*((int *)v22 + 5) * 20.0, (float)*((int *)v22 + 6) * 20.0); cocos2d::CCPoint::operator+(&v50, v46); cocos2d::CCPoint::operator=(v47, &v50); cocos2d::CCPoint::operator=((char *)this + 8 * SLODWORD(v32) + 408, v46); } v24 = *((__int64 **)this + 45); if ( *((__int64 **)this + 46) != v24 ) { LABEL_13: v25 = v48; if ( v24 ) { *v24 = v48; v24 = *((__int64 **)this + 45); v25 = v48; } *((_QWORD *)this + 45) = v24 + 1; goto LABEL_16; } } else { v48 = cocos2d::CCSprite::createWithSpriteFrameName(*(cocos2d::CCSprite **)(v22 + 4), v31); v44 = v48; v33 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v48 + 160LL); v34 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v48 + 328LL))(v48); v33(v44, 22.0 / *(float *)(v34 + 4)); v24 = *((__int64 **)this + 45); if ( *((__int64 **)this + 46) != v24 ) goto LABEL_13; } std::vector::__push_back_slow_path((__int64)this + 352, &v48); v25 = v48; LABEL_16: v22 += 32; v26 = CCMenuItemSpriteExtra::create(v25, 0, (__int64)this, (__int64)ControllerInputNode::onButton, 0); v27 = v21++; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v26 + 72LL))(v26, v27); (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v26 + 184LL))(v26, v47); (*((void (__fastcall **)(cocos2d::CCDirector **, __int64))*v17 + 57))(v17, v26); if ( v21 == 21 ) { ControllerInputNode::refreshVisuals(this, v28, v29); return v39; } } } } return 0; }