// // EditorUI::createRockEdges from 0x1401f9df0 to 0x1401fa160 (880 bytes) // // 5 xrefs: // > EditorUI::createSmartObjectsFromType @ 0x1401b7b4f // > @ 0x1408a3848 // > @ 0x1408a38a8 // > @ 0x1408a38b8 // > @ 0x14091ab64 // // 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:28:10 +0000 // cocos2d::CCArray *__fastcall EditorUI::createRockEdges(__int64 a1, cocos2d::CCArray *a2) { __int64 v4; // rcx cocos2d::CCArray *v5; // rsi __int64 v6; // rcx cocos2d::CCArray *v7; // r14 unsigned int i; // ebp struct cocos2d::CCObject *v9; // r15 char v10; // r13 int j; // edi float v12; // xmm2_4 cocos2d::CCPoint *v13; // rcx float v14; // xmm1_4 __int64 v15; // rax unsigned int v16; // ebx struct cocos2d::CCObject *v17; // rax cocos2d::CCRect *v18; // rax struct cocos2d::CCObject *EdgeForObject; // rax struct cocos2d::CCObject *v20; // rax __int64 v21; // r8 struct cocos2d::CCObject *v22; // rax struct cocos2d::CCObject *v23; // rsi unsigned int *v24; // rdi __int64 v25; // rax _QWORD *v26; // rdi _QWORD *k; // rbp __int64 v28; // rbx _BYTE v30[8]; // [rsp+20h] [rbp-88h] BYREF _BYTE v31[8]; // [rsp+28h] [rbp-80h] BYREF char v32; // [rsp+30h] [rbp-78h] BYREF char v33; // [rsp+38h] [rbp-70h] BYREF char v34; // [rsp+40h] [rbp-68h] BYREF char v35; // [rsp+48h] [rbp-60h] BYREF char v36; // [rsp+B8h] [rbp+10h] char v37; // [rsp+C0h] [rbp+18h] char v38; // [rsp+C8h] [rbp+20h] BYREF if ( !a2 || !cocos2d::CCArray::count(a2) ) return nullptr; v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(v4); v7 = (cocos2d::CCArray *)cocos2d::CCArray::create(v6); cocos2d::CCArray::addObjectsFromArray(v5, a2); for ( i = 0; i < cocos2d::CCArray::count(v5); ++i ) { v9 = cocos2d::CCArray::objectAtIndex(v5, i); (*(void (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v9 + 1208LL))(v9, v30); v10 = 0; v37 = 0; v36 = 0; for ( j = 0; j < 4; ++j ) { while ( 1 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v38, (const struct cocos2d::CCPoint *)&unk_14090A788); switch ( j ) { case 0: v12 = 30.0; v13 = (cocos2d::CCPoint *)&v35; goto LABEL_13; case 1: v12 = 0.0; v13 = (cocos2d::CCPoint *)&v34; v14 = 30.0; break; case 2: v12 = -30.0; v13 = (cocos2d::CCPoint *)&v33; LABEL_13: v14 = 0.0; break; case 3: v12 = 0.0; v13 = (cocos2d::CCPoint *)&v32; v14 = -30.0; break; default: goto LABEL_15; } cocos2d::CCPoint::CCPoint(v13, v14, v12); cocos2d::CCPoint::operator=(&v38, v15); LABEL_15: cocos2d::CCPoint::operator+(v30, v31, &v38); v16 = 0; if ( cocos2d::CCArray::count(v5) ) { do { if ( v16 != i ) { v17 = cocos2d::CCArray::objectAtIndex(v5, v16); v18 = (cocos2d::CCRect *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v17 + 1184LL))(v17); if ( cocos2d::CCRect::containsPoint(v18, (const struct cocos2d::CCPoint *)v31) ) goto LABEL_36; } } while ( ++v16 < cocos2d::CCArray::count(v5) ); } EdgeForObject = (struct cocos2d::CCObject *)EditorUI::createEdgeForObject(a1, v9, (unsigned int)j); if ( EdgeForObject ) cocos2d::CCArray::addObject(v7, EdgeForObject); if ( j ) break; v10 = 1; j = 1; } switch ( j ) { case 1: v37 = 1; if ( !v10 ) continue; v21 = 4; goto LABEL_34; case 2: v36 = 1; if ( !v37 ) continue; v21 = 5; goto LABEL_34; case 3: if ( v36 ) { v20 = (struct cocos2d::CCObject *)EditorUI::createEdgeForObject(a1, v9, 6); if ( v20 ) cocos2d::CCArray::addObject(v7, v20); } if ( v10 ) { v21 = 7; LABEL_34: v22 = (struct cocos2d::CCObject *)EditorUI::createEdgeForObject(a1, v9, v21); if ( v22 ) cocos2d::CCArray::addObject(v7, v22); continue; } break; } LABEL_36: ; } } if ( cocos2d::CCArray::count(v7) ) { v23 = cocos2d::CCArray::objectAtIndex(v5, 0); if ( v23 ) { if ( v7 ) { v24 = *((unsigned int **)v7 + 7); v25 = *v24; if ( (_DWORD)v25 ) { v26 = *((_QWORD **)v24 + 2); for ( k = &v26[v25 - 1]; v26 <= k; *(_BYTE *)(v28 + 1156) = 1 ) { v28 = *v26; if ( !*v26 ) break; GameObject::duplicateColorMode(*v26, v23); GameObject::duplicateAttributes(v28, v23); ++v26; } } } } } return v7; }