// // EditorUI::rotateObjects from 0x10003bd00 to 0x10003c088 (904 bytes) // // 5 xrefs: // > EditorUI::onCreateObject @ 0x100035605 // > EditorUI::createSmartObjectsFromTemplate @ 0x10004312b // > EditorUI::transformObjectCall_1 @ 0x10004ac42 // > EditorUI::transformObject @ 0x10004bbb9 // > EditorUI::angleChanged @ 0x10004e632 // // 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 // // local variable allocation has failed, the output may be wrong! void __fastcall EditorUI::rotateObjects(EditorUI *a1, cocos2d::CCArray *a2, float a3, cocos2d::CCPoint a4) { __int64 v4; // rdx cocos2d::CCArray *v5; // rbx unsigned int v6; // r12d __m128 v7; // xmm0 __int64 v8; // rbx __int64 v9; // rax GameObject *v10; // r13 __int64 v11; // rax __int64 v12; // rbx __m128 v13; // xmm0 GameObject_vtbl *v14; // rax float v15; // xmm0_4 float v16; // xmm0_4 __int64 v17; // rax float v18; // xmm0_4 _BYTE v19[8]; // [rsp+8h] [rbp-88h] BYREF _BYTE v20[8]; // [rsp+10h] [rbp-80h] BYREF _BYTE v21[8]; // [rsp+18h] [rbp-78h] BYREF __m128 v22; // [rsp+20h] [rbp-70h] EditorUI *v23; // [rsp+30h] [rbp-60h] cocos2d::CCArray *v24; // [rsp+38h] [rbp-58h] __m128 v25; // [rsp+40h] [rbp-50h] unsigned __int64 v26; // [rsp+50h] [rbp-40h] BYREF __int64 v27; // [rsp+58h] [rbp-38h] unsigned int v28; // [rsp+60h] [rbp-30h] float v29; // [rsp+64h] [rbp-2Ch] v25 = *(__m128 *)&a3; v5 = a2; v23 = a1; v27 = v4; if ( (unsigned __int8)sub_10028CDB0(v4) ) { EditorUI::getGroupCenter((EditorUI *)&v26, (cocos2d::CCArray *)&qword_10099EC08, (bool)a2); sub_10028CC90(v27, &v26); } if ( (unsigned int)sub_100720070(a2) ) { v7 = _mm_xor_ps((__m128)xmmword_1008150B0, v25); v6 = 0; v7.f32[0] = v7.f32[0] * 0.017453292; v22 = v7; v24 = a2; do { v28 = v6; v10 = (GameObject *)sub_1007200C0(v5, v6); v11 = ((__int64 (__fastcall *)(GameObject *, double, double))v10->getPosition)( v10, *(double *)v7.i64, *(double *)&a4); v12 = v27; sub_10028CD00(&v26, v11, v27); v13 = _mm_mul_ps((__m128)v26, (__m128)v26); v29 = fsqrt(_mm_movehdup_ps(v13).f32[0] + v13.f32[0]); v7 = _mm_movehdup_ps((__m128)v26); v7.f32[0] = atan2f(v7.f32[0], *(float *)&v26); *(__float2 *)v7.f32 = __sincosf_stret(v7.f32[0] + v22.f32[0]); sub_10028CBE0(v21, _mm_movehdup_ps(v7).f32[0], v7.f32[0]); v7.i64[0] = LODWORD(v29); sub_10028CD40(v20, v21, v29); sub_10028CCE0(v19, v12); v29 = ((float (__fastcall *)(GameObject *))v10->getRotationX)(v10); v7.f32[0] = ((float (__fastcall *)(GameObject *))v10->getRotationY)(v10); v14 = v10->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; if ( v29 == v7.f32[0] ) { v18 = ((float (__fastcall *)(GameObject *))v14->getRotation)(v10); ((void (__fastcall *)(GameObject *, float))v10->setRotation)(v10, v18 + v25.f32[0]); v7.f32[0] = ((float (__fastcall *)(GameObject *))v10->getRotation)(v10); v29 = v7.f32[0]; ((void (__fastcall *)(GameObject *))v10->getRotation)(v10); a4 = (cocos2d::CCPoint)LODWORD(v29); if ( v29 >= 360.0 ) { v8 = 344; goto LABEL_6; } a4 = (cocos2d::CCPoint)3283353600LL; if ( v7.f32[0] > -360.0 ) goto LABEL_7; v8 = 344; v17 = 352; goto LABEL_20; } v15 = ((float (__fastcall *)(GameObject *))v14->getRotationX)(v10); ((void (__fastcall *)(GameObject *, float))v10->setRotationX)(v10, v15 + v25.f32[0]); v16 = ((float (__fastcall *)(GameObject *))v10->getRotationY)(v10); ((void (__fastcall *)(GameObject *, float))v10->setRotationY)(v10, v16 + v25.f32[0]); v10->m_isDirty = 1; v7.f32[0] = ((float (__fastcall *)(GameObject *))v10->getRotationX)(v10); v29 = v7.f32[0]; ((void (__fastcall *)(GameObject *))v10->getRotationX)(v10); if ( v29 < 360.0 ) { if ( v7.f32[0] > -360.0 ) goto LABEL_14; v7.f32[0] = ((float (__fastcall *)(GameObject *))v10->getRotationX)(v10); } v7.i32[1] = 0; ((void (__fastcall *)(GameObject *, float))v10->setRotationX)(v10, (float)((int)v7.f32[0] % 360)); LABEL_14: v7.f32[0] = ((float (__fastcall *)(GameObject *))v10->getRotationY)(v10); v29 = v7.f32[0]; ((void (__fastcall *)(GameObject *))v10->getRotationY)(v10); a4 = (cocos2d::CCPoint)LODWORD(v29); if ( v29 < 360.0 ) { a4 = (cocos2d::CCPoint)3283353600LL; if ( v7.f32[0] > -360.0 ) goto LABEL_7; v8 = 376; v17 = 384; LABEL_20: (*(void (__fastcall **)(GameObject *))((char *)&v10->copyWithZone + v17))(v10); goto LABEL_6; } v8 = 376; LABEL_6: v7.i32[1] = 0; v7.f32[0] = (float)((int)v7.f32[0] % 360); (*(void (__fastcall **)(GameObject *, float))((char *)&v10->copyWithZone + v8))(v10, v7.f32[0]); LABEL_7: v9 = ((__int64 (__fastcall *)(GameObject *))v10->getPosition)(v10); sub_10028CD00(v20, v19, v9); EditorUI::moveObject(v23, v10, *(cocos2d::CCPoint *)v7.f32); v6 = v28 + 1; v5 = v24; } while ( v6 < (unsigned int)sub_100720070(v24) ); } }