// // ControllerInputNode::init from 0x1004aad5c to 0x1004ab194 (1080 bytes) // // 1 xrefs: // > ControllerInputNode::create @ 0x1004ab584 // // 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 11:06:07 +0000 // __int64 __fastcall ControllerInputNode::init(_QWORD *a1, __int64 a2, float32x2_t *a3) { __int64 result; // x0 float32x2_t v7; // d0 float v8; // s9 float v9; // s8 __int64 v10; // x20 float v11; // s8 __int64 v12; // x0 __int64 v13; // x20 __int64 v14; // x0 __int64 v15; // x0 __int64 v16; // x0 __int64 v17; // x0 __int64 v18; // x21 int *i; // x26 int v20; // w8 void *v21; // x24 __int64 v22; // x0 void *v23; // x24 _QWORD *v24; // x0 __int64 v25; // x27 void *v26; // x24 __int64 v27; // x0 void *v28; // x24 float32x2_t v29; // [xsp+8h] [xbp-A8h] BYREF float32x2_t v30; // [xsp+10h] [xbp-A0h] BYREF __int64 v31; // [xsp+18h] [xbp-98h] BYREF __int64 v32; // [xsp+20h] [xbp-90h] BYREF float32x2_t v33; // [xsp+28h] [xbp-88h] BYREF result = cocos2d::CCNode::init(); if ( (_DWORD)result ) { a1[40] = a2; result = (__int64)cocos2d::CCSprite::create((__int64)"controller_outline.png"); a1[43] = result; if ( result ) { v7 = vdiv_f32(*a3, (float32x2_t)0x438A000043C80000LL); if ( v7.f32[0] <= v7.f32[1] ) v8 = v7.f32[0]; else v8 = v7.f32[1]; sub_1000262C4((float *)&v33, v8 * 400.0, v8 * 276.0); (*(void (__fastcall **)(_QWORD *, float32x2_t *))(*a1 + 320LL))(a1, &v33); sub_1000262BC((float *)&v33, 0.5, 0.5); (*(void (__fastcall **)(_QWORD *, float32x2_t *))(*a1 + 296LL))(a1, &v33); v9 = *(float *)(*(__int64 (__fastcall **)(_QWORD *))(*a1 + 328LL))(a1); *((float *)a1 + 84) = v9 / *(float *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[43] + 328LL))(a1[43]); (*(void (__fastcall **)(_QWORD))(*(_QWORD *)a1[43] + 160LL))(a1[43]); (*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)a1[43] + 960LL))(a1[43], &unk_10076F7C8); v10 = a1[43]; v11 = *(float *)(*(__int64 (__fastcall **)(_QWORD *))(*a1 + 328LL))(a1) * 0.5; v12 = (*(__int64 (__fastcall **)(_QWORD *))(*a1 + 328LL))(a1); sub_1000262BC((float *)&v33, v11, (float)(*(float *)(v12 + 4) * 0.5) + 10.0); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v10 + 184LL))(v10, &v33); (*(void (__fastcall **)(_QWORD *, _QWORD))(*a1 + 456LL))(a1, a1[43]); v13 = cocos2d::CCMenu::create(); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v13 + 184LL))(v13, &unk_1009F7D00); (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v13, 2); v14 = cocos2d::CCDirector::sharedDirector(); v15 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 160LL))(v14); if ( cocos2d::CCTouchDispatcher::isUsingForcePrio(v15) ) { v16 = cocos2d::CCDirector::sharedDirector(); v17 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v16 + 160LL))(v16); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v13 + 1024LL))( v13, (unsigned int)(*(_DWORD *)(v17 + 128) - 1)); } v18 = 0; for ( i = (int *)&unk_1009811B4; ; i += 8 ) { sub_1000262BC((float *)&v33, v8 * *((float *)i - 3), v8 * *((float *)i - 2)); sub_1000262F4(&v32, (double *)&v33); v20 = *(i - 6); if ( v20 == 1 ) break; if ( v20 ) { v25 = v20; v26 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_select_001.png"); v31 = (__int64)v26; v27 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v26 + 328LL))(v26); (*(void (__fastcall **)(void *, float))(*(_QWORD *)v26 + 160LL))(v26, 14.0 / *(float *)(v27 + 4)); sub_1000262BC((float *)&v29, (float)*(i - 1) * 20.0, (float)*i * 20.0); sub_100026318(&v33, &v29, &v30); sub_10002630C(&v32, (double *)&v30); v24 = &a1[v25 + 51]; goto LABEL_14; } v21 = cocos2d::CCSprite::createWithSpriteFrameName(*(_QWORD *)(i - 5)); v31 = (__int64)v21; v22 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v21 + 328LL))(v21); (*(void (__fastcall **)(void *, float))(*(_QWORD *)v21 + 160LL))(v21, 22.0 / *(float *)(v22 + 4)); LABEL_15: sub_100011A50((__int64)(a1 + 44), &v31); v28 = CCMenuItemSpriteExtra::create(v31, 0, (__int64)a1, (__int64)sub_1004AB194, 0); (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v28 + 72LL))(v28, v18); (*(void (__fastcall **)(void *, __int64 *))(*(_QWORD *)v28 + 184LL))(v28, &v32); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v13 + 456LL))(v13, v28); if ( ++v18 == 21 ) { ControllerInputNode::refreshVisuals(a1); return 1; } } v23 = cocos2d::CCSprite::create_1(); v31 = (__int64)v23; sub_1000262C4((float *)&v30, 17.0, 17.0); (*(void (__fastcall **)(void *, float32x2_t *))(*(_QWORD *)v23 + 320LL))(v23, &v30); sub_1000262BC((float *)&v29, (float)*(i - 1) * 15.0, (float)*i * 15.0); sub_100026318(&v33, &v29, &v30); sub_10002630C(&v32, (double *)&v30); v24 = a1 + 52; LABEL_14: sub_10002630C(v24, (double *)&v33); goto LABEL_15; } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source