// // EditorUI::createSmartObjectsFromType from 0x1401b7870 to 0x1401b7d4e (1246 bytes) // // 4 xrefs: // > SetupSmartBlockLayer::onCreate @ 0x1405ee16d // > @ 0x1408a1da0 // > @ 0x1408a1e04 // > @ 0x14091a270 // // 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:27:58 +0000 // void __fastcall EditorUI::createSmartObjectsFromType( __int64 a1, unsigned int a2, cocos2d::CCArray *a3, char a4, char a5) { float v5; // xmm0_4 __int64 v6; // r14 __int64 v9; // rcx unsigned int v10; // r15d cocos2d::CCArray *v11; // r12 int v12; // r13d unsigned int i; // edi int v14; // ebx __int64 v15; // rcx __int64 v16; // rcx unsigned int v17; // esi struct cocos2d::CCObject *v18; // r12 int j; // ebx struct cocos2d::CCObject *v20; // rdi float v21; // xmm2_4 cocos2d::CCPoint *v22; // rcx float v23; // xmm1_4 __int64 v24; // rax __int64 v25; // rax cocos2d::CCArray *v26; // rax int v27; // edi __int64 v28; // rcx __int64 v29; // rbx __int64 v30; // rcx cocos2d::CCArray *v31; // rsi unsigned int v32; // ebx __int16 v33; // r13 struct cocos2d::CCObject *v34; // rax struct cocos2d::CCArray *RockEdges; // rax struct cocos2d::CCArray *RockBases; // rax struct cocos2d::CCArray *Outlines; // rax __int64 v38; // rcx __int64 v39; // rcx unsigned int v40; // ebx struct cocos2d::CCArray *k; // rdi struct cocos2d::CCObject *v42; // rax __int64 v43; // rdx __int64 v44; // r8 struct cocos2d::CCObject *v45; // rax struct cocos2d::CCObject *v46; // rdi __int64 v47; // rdx __int64 v48; // rbx cocos2d::CCArray *v49; // [rsp+30h] [rbp-A8h] _BYTE v50[8]; // [rsp+38h] [rbp-A0h] BYREF __int64 v51; // [rsp+40h] [rbp-98h] char v52; // [rsp+48h] [rbp-90h] BYREF char v53; // [rsp+50h] [rbp-88h] BYREF char v54; // [rsp+58h] [rbp-80h] BYREF char v55; // [rsp+60h] [rbp-78h] BYREF char v58; // [rsp+F0h] [rbp+18h] BYREF char v59; // [rsp+F8h] [rbp+20h] if ( a3 ) { v59 = a4; v6 = a1; if ( cocos2d::CCArray::count(a3) ) { EditorUI::deselectAll(v6); v10 = 0; v49 = a3; v51 = cocos2d::CCArray::create(v9); v11 = (cocos2d::CCArray *)v51; v12 = 0; for ( i = 0; i < cocos2d::CCArray::count(a3); ++i ) { v14 = v12; v12 = *((__int16 *)cocos2d::CCArray::objectAtIndex(a3, i) + 605); if ( v12 <= v14 ) v12 = v14; } ObjectToolbox::sharedState(); ObjectToolbox::gridNodeSizeForKey(v15, a2); if ( v5 == 15.0 ) { v49 = (cocos2d::CCArray *)cocos2d::CCArray::create(v16); v17 = 0; if ( cocos2d::CCArray::count(a3) ) { while ( 1 ) { v18 = cocos2d::CCArray::objectAtIndex(a3, v17); for ( j = 0; j < 4; ++j ) { v20 = (struct cocos2d::CCObject *)cocos2d::CCNode::create(); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v58, (const struct cocos2d::CCPoint *)&dword_14090A6E8); switch ( j ) { case 0: v21 = 7.5; v22 = (cocos2d::CCPoint *)&v55; goto LABEL_18; case 1: v21 = 7.5; v22 = (cocos2d::CCPoint *)&v54; v23 = 7.5; break; case 2: v21 = -7.5; v22 = (cocos2d::CCPoint *)&v53; LABEL_18: v23 = -7.5; break; case 3: v21 = -7.5; v22 = (cocos2d::CCPoint *)&v52; v23 = 7.5; break; default: goto LABEL_20; } cocos2d::CCPoint::CCPoint(v22, v23, v21); cocos2d::CCPoint::operator=(&v58, v24); LABEL_20: v25 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v18 + 200LL))(v18); cocos2d::CCPoint::operator+(&v58, v50, v25); (*(void (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v20 + 184LL))(v20, v50); cocos2d::CCArray::addObject(v49, v20); } if ( ++v17 >= cocos2d::CCArray::count(a3) ) { v6 = a1; v11 = (cocos2d::CCArray *)v51; break; } } } } v26 = (cocos2d::CCArray *)cocos2d::CCArray::create(v16); v27 = (int)v26; cocos2d::CCArray::addObjectsFromArray(v26, v49); v29 = cocos2d::CCArray::create(v28); v31 = (cocos2d::CCArray *)cocos2d::CCArray::create(v30); EditorUI::processSmartObjectsFromType(v6, a2, (_DWORD)v49, v27, v29, (__int64)v31); v32 = 0; if ( cocos2d::CCArray::count(v31) ) { v33 = v12 + 1; do { v34 = cocos2d::CCArray::objectAtIndex(v31, v32++); *((_WORD *)v34 + 606) = v33; } while ( v32 < cocos2d::CCArray::count(v31) ); } cocos2d::CCArray::addObjectsFromArray(v11, v31); if ( cocos2d::CCArray::count(v11) ) { RockEdges = (struct cocos2d::CCArray *)EditorUI::createRockEdges(v6, v11); if ( RockEdges ) cocos2d::CCArray::addObjectsFromArray(v11, RockEdges); RockBases = (struct cocos2d::CCArray *)EditorUI::createRockBases(v6, v11); if ( RockBases ) cocos2d::CCArray::addObjectsFromArray(v11, RockBases); Outlines = (struct cocos2d::CCArray *)EditorUI::createOutlines(v6, v11); if ( Outlines ) cocos2d::CCArray::addObjectsFromArray(v11, Outlines); if ( v59 && a2 - 2703 <= 1 && v11 && cocos2d::CCArray::count(v11) ) { cocos2d::CCArray::create(v38); v40 = 0; for ( k = (struct cocos2d::CCArray *)cocos2d::CCArray::create(v39); v40 < cocos2d::CCArray::count(v11); ++v40 ) { v42 = cocos2d::CCArray::objectAtIndex(v11, v40); v43 = *((unsigned int *)v42 + 259); if ( (int)v43 >= 2808 && (int)v43 <= 2837 ) EditorUI::createExtrasForObject(v6, v43, v42, k); } if ( k ) cocos2d::CCArray::addObjectsFromArray(v11, k); } EditorUI::deselectAll(v6); if ( a5 ) { v11 = a3; } else if ( cocos2d::CCArray::count(a3) ) { do { v45 = cocos2d::CCArray::objectAtIndex(a3, v10); v46 = v45; if ( v45 ) { *((_BYTE *)v45 + 1140) = *((_BYTE *)v45 + 1141); EditorUI::deselectObject(v6, v45); LOBYTE(v47) = 1; v48 = *(_QWORD *)(v6 + 1512); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v46 + 1160LL))(v46, v47); GJBaseGameLayer::removeObjectFromSection(v48, v46); LevelEditorLayer::removeSpecial(v48, v46); *(_BYTE *)(v48 + 15666) = 1; EditorUI::deactivateRotationControl(v6); EditorUI::deactivateScaleControl(v6); EditorUI::deactivateTransformControl(v6); } ++v10; } while ( v10 < cocos2d::CCArray::count(a3) ); } LOBYTE(v44) = 1; EditorUI::selectObjects(v6, v11, v44); EditorUI::updateButtons(v6); EditorUI::updateSpecialUIElements(v6); } } } }