// // EditorUI::createRockBases from 0x14012f5f0 to 0x14012ff19 (2345 bytes) // // 5 xrefs: // > EditorPauseLayer::onCreateExtras @ 0x1400dccb7 // > EditorUI::createSmartObjectsFromType @ 0x140118211 // > @ 0x140670edc // > @ 0x140670f20 // > @ 0x1406c9e10 // // 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 // cocos2d::CCArray *EditorUI::createRockBases(EditorUI *a1, cocos2d::CCArray *a2) { __int64 v3; // rcx cocos2d::CCArray *v4; // r12 __int64 v5; // rcx cocos2d::CCArray *v6; // r13 unsigned int v7; // r15d char v8; // r13 bool v9; // r14 bool v10; // di bool v11; // si bool v12; // bl __int64 v13; // rax __int64 v14; // rax __int64 v15; // rax float v16; // xmm2_4 cocos2d::CCPoint *v17; // rcx __int64 v18; // rax __int64 v19; // rax __int64 v20; // rax float v21; // xmm1_4 __int64 v22; // rax __int64 v23; // rax __int64 v24; // rax __int64 v25; // rax __int64 v26; // rax __int64 v27; // rax __int64 v28; // rax unsigned int v29; // r15d struct cocos2d::CCObject *v30; // rax const struct cocos2d::CCRect *v31; // rax int v32; // esi struct cocos2d::CCObject *v33; // r14 int v34; // edi __int64 v35; // rax cocos2d::CCPoint v36; // rax GameObject *Object; // rdi GameObject_vtbl *v38; // rbx GameObject_vtbl *v39; // rbx char v40; // al GameObject_vtbl *v41; // rbx char v42; // al cocos2d::CCArray *v43; // rcx cocos2d::CCPoint v44; // rax GameObject *v45; // rdi GameObject_vtbl *v46; // rbx GameObject_vtbl *v47; // rbx char v48; // al GameObject_vtbl *v49; // rbx char v50; // al cocos2d::CCPoint v52; // [rsp+20h] [rbp-E0h] BYREF cocos2d::CCPoint v53; // [rsp+28h] [rbp-D8h] BYREF char v54; // [rsp+30h] [rbp-D0h] BYREF char v55; // [rsp+38h] [rbp-C8h] BYREF struct cocos2d::CCObject *v56; // [rsp+40h] [rbp-C0h] cocos2d::CCArray *v57; // [rsp+48h] [rbp-B8h] cocos2d::CCPoint v58; // [rsp+50h] [rbp-B0h] BYREF cocos2d::CCRect v59; // [rsp+58h] [rbp-A8h] BYREF struct cocos2d::CCPoint v60; // [rsp+68h] [rbp-98h] BYREF struct cocos2d::CCPoint v61; // [rsp+70h] [rbp-90h] BYREF struct cocos2d::CCPoint v62; // [rsp+78h] [rbp-88h] BYREF struct cocos2d::CCPoint v63; // [rsp+80h] [rbp-80h] BYREF char v64[8]; // [rsp+88h] [rbp-78h] BYREF char v65[8]; // [rsp+90h] [rbp-70h] BYREF cocos2d::CCPoint v66; // [rsp+98h] [rbp-68h] BYREF cocos2d::CCPoint v67; // [rsp+A0h] [rbp-60h] BYREF cocos2d::CCPoint v68; // [rsp+A8h] [rbp-58h] BYREF char v69; // [rsp+B0h] [rbp-50h] BYREF cocos2d::CCPoint v70; // [rsp+B8h] [rbp-48h] BYREF cocos2d::CCPoint v71; // [rsp+C0h] [rbp-40h] BYREF char v72; // [rsp+C8h] [rbp-38h] BYREF cocos2d::CCPoint v73; // [rsp+D0h] [rbp-30h] BYREF cocos2d::CCPoint v74; // [rsp+D8h] [rbp-28h] BYREF cocos2d::CCPoint v75; // [rsp+E0h] [rbp-20h] BYREF char v76; // [rsp+E8h] [rbp-18h] BYREF cocos2d::CCPoint v77; // [rsp+F0h] [rbp-10h] BYREF cocos2d::CCPoint v78; // [rsp+F8h] [rbp-8h] BYREF cocos2d::CCPoint v79; // [rsp+100h] [rbp+0h] BYREF char v80; // [rsp+108h] [rbp+8h] BYREF cocos2d::CCPoint v81; // [rsp+110h] [rbp+10h] BYREF char v82[8]; // [rsp+118h] [rbp+18h] BYREF char v83; // [rsp+120h] [rbp+20h] BYREF cocos2d::CCPoint v84; // [rsp+128h] [rbp+28h] BYREF cocos2d::CCPoint v85; // [rsp+130h] [rbp+30h] BYREF unsigned int v87; // [rsp+1B8h] [rbp+B8h] cocos2d::CCPoint v88; // [rsp+1C0h] [rbp+C0h] BYREF cocos2d::CCPoint v89; // [rsp+1C8h] [rbp+C8h] BYREF if ( !a2 || !cocos2d::CCArray::count(a2) ) return nullptr; v4 = (cocos2d::CCArray *)cocos2d::CCArray::create(v3); v6 = (cocos2d::CCArray *)cocos2d::CCArray::create(v5); v57 = v6; cocos2d::CCArray::addObjectsFromArray(v4, a2); v7 = 0; v87 = 0; if ( cocos2d::CCArray::count(v4) ) { while ( 1 ) { v56 = cocos2d::CCArray::objectAtIndex(v4, v7); v56->__vftable[16].encodeWithCoder(v56, (DS_Dictionary *)&v55); v8 = 0; v9 = 0; v10 = 0; v11 = 0; v12 = 0; if ( (unsigned int)(v56[18].m_eObjType - 1348) <= 3 ) break; LABEL_33: v32 = 0; cocos2d::CCPoint::CCPoint(&v58); v33 = v56; switch ( v56[18].m_eObjType ) { case 0x544: if ( v8 ) { v34 = 1352; } else { v34 = 1387; if ( v12 ) { v32 = 1391; cocos2d::CCPoint::CCPoint(&v81, 0.0, -30.0); cocos2d::CCPoint::operator=(&v58, v35); } } goto LABEL_64; case 0x545: if ( v8 ) { v34 = 1353; } else { v34 = 1388; if ( v12 ) v32 = 1392; } goto LABEL_64; case 0x546: if ( v8 ) { v34 = 1354; } else { v34 = 1389; if ( v12 ) v32 = 1394; } goto LABEL_64; case 0x547: if ( v8 ) { v34 = 1355; } else { v34 = 1390; if ( v12 ) v32 = 1393; } goto LABEL_64; case 0x597: v34 = 1442; goto LABEL_64; case 0x598: v34 = 1443; goto LABEL_64; case 0x599: v34 = 1444; goto LABEL_64; case 0x59A: v34 = 1445; goto LABEL_64; case 0x59B: v34 = 1446; goto LABEL_64; case 0x59C: v34 = 1447; goto LABEL_64; case 0x59D: v34 = 1448; goto LABEL_64; case 0x59E: v34 = 1449; goto LABEL_64; case 0x59F: v34 = 1450; goto LABEL_64; case 0x5A0: v34 = 1451; goto LABEL_64; case 0x5A1: v34 = 1452; goto LABEL_64; case 0x5E6: v34 = 1513; goto LABEL_64; case 0x5E7: v34 = 1514; goto LABEL_64; case 0x5E8: v34 = 1515; LABEL_64: v36 = (cocos2d::CCPoint)((__int64 (__fastcall *)(struct cocos2d::CCObject *, char *))v33->__vftable[16].encodeWithCoder)( v33, v82); Object = EditorUI::createObject(a1, v34, v36); v38 = Object->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v33->__vftable[4].getTag(v33); ((void (__fastcall *)(GameObject *))v38->setRotation)(Object); v39 = Object->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v40 = ((__int64 (__fastcall *)(struct cocos2d::CCObject *))v33->__vftable[17].update)(v33); v39->setFlipX(Object, v40); v41 = Object->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v42 = ((__int64 (__fastcall *)(struct cocos2d::CCObject *))v33->__vftable[17].encodeWithCoder)(v33); v41->setFlipY(Object, v42); GameObject::updateCustomScaleX(Object, *(float *)&v33[20].m_unknown2); GameObject::updateCustomScaleY(Object, *(float *)&v33[20].m_nZOrder); v6 = v57; v43 = v57; Object->m_editorLayer2 = HIWORD(v33[21].m_uIndexInArray) + 2; cocos2d::CCArray::addObject(v43, Object); if ( v32 > 0 ) { v33->__vftable[16].encodeWithCoder(v33, (DS_Dictionary *)&v54); EditorUI::offsetForKey(a1, (int)&v83); cocos2d::CCPoint::operator+(&v54, v64); cocos2d::CCPoint::operator=(&v54, v64); cocos2d::CCPoint::operator+(&v54, v65); cocos2d::CCPoint::operator=(&v54, v65); cocos2d::CCPoint::CCPoint(&v84); v45 = EditorUI::createObject(a1, v32, v44); v46 = v45->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v33->__vftable[4].getTag(v33); ((void (__fastcall *)(GameObject *))v46->setRotation)(v45); v47 = v45->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v48 = ((__int64 (__fastcall *)(struct cocos2d::CCObject *))v33->__vftable[17].update)(v33); v47->setFlipX(v45, v48); v49 = v45->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v50 = ((__int64 (__fastcall *)(struct cocos2d::CCObject *))v33->__vftable[17].encodeWithCoder)(v33); v49->setFlipY(v45, v50); GameObject::updateCustomScaleX(v45, *(float *)&v33[20].m_unknown2); GameObject::updateCustomScaleY(v45, *(float *)&v33[20].m_nZOrder); v45->m_editorLayer2 = HIWORD(v33[21].m_uIndexInArray) + 2; cocos2d::CCArray::addObject(v6, v45); } break; default: v6 = v57; break; } v87 = ++v7; if ( v7 >= cocos2d::CCArray::count(v4) ) return v6; } cocos2d::CCPoint::CCPoint(&v88); cocos2d::CCPoint::CCPoint(&v89); cocos2d::CCPoint::CCPoint(&v52); cocos2d::CCPoint::CCPoint(&v53); if ( v56[18].m_eObjType != 1348 ) { switch ( v56[18].m_eObjType ) { case 0x545: cocos2d::CCPoint::CCPoint(&v73, -30.0, 0.0); cocos2d::CCPoint::operator=(&v88, v22); cocos2d::CCPoint::CCPoint(&v74, -30.0, -30.0); cocos2d::CCPoint::operator=(&v89, v23); cocos2d::CCPoint::CCPoint(&v75, 0.0, -30.0); cocos2d::CCPoint::operator=(&v52, v24); v16 = 0.0; v17 = (cocos2d::CCPoint *)&v76; v21 = -30.0; break; case 0x546: cocos2d::CCPoint::CCPoint(&v85, 0.0, 30.0); cocos2d::CCPoint::operator=(&v88, v18); cocos2d::CCPoint::CCPoint(&v70, 30.0, 30.0); cocos2d::CCPoint::operator=(&v89, v19); cocos2d::CCPoint::CCPoint(&v71, 30.0, 0.0); cocos2d::CCPoint::operator=(&v52, v20); v16 = 0.0; v17 = (cocos2d::CCPoint *)&v72; v21 = 30.0; break; case 0x547: cocos2d::CCPoint::CCPoint(&v66, 0.0, 30.0); cocos2d::CCPoint::operator=(&v88, v13); cocos2d::CCPoint::CCPoint(&v67, -30.0, 30.0); cocos2d::CCPoint::operator=(&v89, v14); cocos2d::CCPoint::CCPoint(&v68, -30.0, 0.0); cocos2d::CCPoint::operator=(&v52, v15); v16 = 30.0; v17 = (cocos2d::CCPoint *)&v69; goto LABEL_13; default: LABEL_15: cocos2d::CCPoint::operator+(&v55, &v60); cocos2d::CCPoint::operator+(&v55, &v61); cocos2d::CCPoint::operator+(&v55, &v62); cocos2d::CCPoint::operator+(&v55, &v63); v29 = 0; if ( cocos2d::CCArray::count(v4) ) { while ( 1 ) { if ( v29 != v87 ) { v30 = cocos2d::CCArray::objectAtIndex(v4, v29); v31 = (const struct cocos2d::CCRect *)((__int64 (__fastcall *)(struct cocos2d::CCObject *))v30->__vftable[16].isEqual)(v30); cocos2d::CCRect::CCRect(&v59, v31); if ( !v9 ) v9 = cocos2d::CCRect::containsPoint(&v59, &v60); if ( !v10 ) v10 = cocos2d::CCRect::containsPoint(&v59, &v61); if ( !v11 ) v11 = cocos2d::CCRect::containsPoint(&v59, &v62); if ( !v12 ) v12 = cocos2d::CCRect::containsPoint(&v59, &v63); } if ( v9 && v10 && v11 ) break; if ( v8 ) goto LABEL_30; LABEL_31: if ( ++v29 >= cocos2d::CCArray::count(v4) ) goto LABEL_32; } v8 = 1; LABEL_30: if ( v12 ) goto LABEL_32; goto LABEL_31; } LABEL_32: v7 = v87; goto LABEL_33; } LABEL_14: cocos2d::CCPoint::CCPoint(v17, v21, v16); cocos2d::CCPoint::operator=(&v53, v28); goto LABEL_15; } cocos2d::CCPoint::CCPoint(&v77, 30.0, 0.0); cocos2d::CCPoint::operator=(&v88, v25); cocos2d::CCPoint::CCPoint(&v78, 30.0, -30.0); cocos2d::CCPoint::operator=(&v89, v26); cocos2d::CCPoint::CCPoint(&v79, 0.0, -30.0); cocos2d::CCPoint::operator=(&v52, v27); v16 = -30.0; v17 = (cocos2d::CCPoint *)&v80; LABEL_13: v21 = 0.0; goto LABEL_14; } return v6; }
GD Web Decomp Icon

GD Web Decomp

Raw Source