// // LevelEditorLayer::removeSpecial from 0x1403f5290 to 0x1403f581b (1419 bytes) // // 22 xrefs: // > EditorUI::onDeleteAll @ 0x1401b08ff // > EditorUI::onDeleteSelected @ 0x1401b0b05 // > EditorUI::onDeleteSelected @ 0x1401b0dc6 // > EditorUI::onCreateObject @ 0x1401b2d3f // > EditorUI::addObjectsToSmartTemplate @ 0x1401b65a6 // > EditorUI::createSmartObjectsFromTemplate @ 0x1401b7206 // > EditorUI::deleteSmartBlocksFromObjects @ 0x1401b7802 // > EditorUI::createSmartObjectsFromType @ 0x1401b7cc6 // > EditorUI::createNewKeyframeAnim @ 0x1401b9249 // > EditorUI::createLoop @ 0x1401b9686 // > EditorUI::createLoop @ 0x1401b99ca // > EditorUI::createGradientFromSelection @ 0x1401b9fc9 // > EditorUI::spriteFromObjectString @ 0x1401f0bc4 // > EditorUI::spriteFromObjectString @ 0x1401f0c5f // > EditorUI::spriteFromObjectString @ 0x1401f0d1f // > LevelEditorLayer::removeObject @ 0x1403f22cc // > LevelEditorLayer::removeAllObjectsOfType @ 0x1403f2547 // > LevelEditorLayer::handleAction @ 0x1403f26bb // > LevelEditorLayer::handleAction @ 0x1403f272f // > @ 0x1408c5eb0 // > @ 0x1408c5ee4 // > @ 0x1409254d8 // // 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:31:49 +0000 // __int64 __fastcall LevelEditorLayer::removeSpecial(__int64 a1, __int64 a2, __int64 a3) { int v5; // ebx float v6; // xmm0_4 int v7; // eax cocos2d::CCArray *v8; // rax int v9; // ebx float v10; // xmm0_4 cocos2d::CCObject *v11; // r14 __int64 v12; // rbx __int64 v13; // rbx int v14; // ecx cocos2d::CCArray *v15; // rcx bool v16; // zf int v17; // ecx int v18; // ecx int v19; // ecx int v20; // ecx unsigned int v21; // r8d _QWORD *v22; // r11 _DWORD *v23; // r10 unsigned __int64 v24; // rax __int64 v25; // r9 unsigned __int64 v26; // rdx _DWORD *v27; // rbx _QWORD *v28; // rcx _QWORD *v29; // rax _QWORD *v30; // rax __int64 v31; // rdx __int64 v32; // rcx __int64 result; // rax cocos2d::CCArray *v34; // rax __int64 v35; // rcx char v36[40]; // [rsp+20h] [rbp-28h] BYREF int v37; // [rsp+58h] [rbp+10h] BYREF char v38; // [rsp+60h] [rbp+18h] BYREF if ( !*(_BYTE *)(a2 + 1266) ) { v5 = *(_DWORD *)(a1 + 14928) - *(_DWORD *)(a1 + 14932) - 1; *(_DWORD *)(a1 + 14936) = v5; v6 = (float)((float)rand() / 32767.0) * 1000.0; *(_DWORD *)(a1 + 14932) = (int)v6; *(_DWORD *)(a1 + 14928) = v5 + (int)v6; } v7 = *(_DWORD *)(a2 + 1036); switch ( v7 ) { case 747: v11 = *(cocos2d::CCObject **)(a2 + 1864); if ( v11 ) { cocos2d::CCObject::retain(*(cocos2d::CCObject **)(a2 + 1864)); v12 = (*(__int64 (__fastcall **)(cocos2d::CCObject *, int *))(*(_QWORD *)v11 + 1664LL))(v11, &v37); *(float *)(a2 + 1876) = *(float *)(v12 + 4) - *(float *)((*(__int64 (__fastcall **)(__int64, char *))(*(_QWORD *)a2 + 1664LL))( a2, &v38) + 4); if ( !*(_BYTE *)(a1 + 15512) ) LevelEditorLayer::removeObject(a1, (__int64)v11, 1); *(_QWORD *)(a2 + 1864) = 0; cocos2d::CCObject::release(v11); } break; case 1329: v9 = *(_DWORD *)(a1 + 14812) - *(_DWORD *)(a1 + 14816) - 1; *(_DWORD *)(a1 + 14820) = v9; v10 = (float)((float)rand() / 32767.0) * 1000.0; *(_DWORD *)(a1 + 14816) = (int)v10; *(_DWORD *)(a1 + 14812) = v9 + (int)v10; break; case 2065: cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(a1 + 14744), (struct cocos2d::CCObject *)a2, 1); break; case 3032: v8 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(a1 + 13872), *(int *)(a2 + 1872)); if ( v8 ) { cocos2d::CCArray::removeObject(v8, (struct cocos2d::CCObject *)a2, 1); GJBaseGameLayer::updateKeyframeOrder(a1, *(_DWORD *)(a2 + 1872)); } cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(a1 + 14752), (struct cocos2d::CCObject *)a2, 1); break; } if ( *(_BYTE *)(a2 + 1263) ) cocos2d::CCPoint::operator=(a2 + 1816, &dword_14090AF10); if ( *(_BYTE *)(a2 + 1260) ) { v13 = *(_QWORD *)(a1 + 14944); cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(v13 + 576), (struct cocos2d::CCObject *)a2, 1); *(_BYTE *)(v13 + 516) = 1; } if ( *(_DWORD *)(a2 + 1256) == 1 ) { LOBYTE(a3) = 1; LevelEditorLayer::tryUpdateSpeedObject(a1, a2, a3); } v14 = *(_DWORD *)(a2 + 1036); if ( v14 > 1814 ) { if ( v14 <= 2068 ) { if ( v14 == 2068 || v14 == 1912 ) goto LABEL_44; if ( v14 == 2016 ) { v15 = *(cocos2d::CCArray **)(a1 + 14736); goto LABEL_69; } v16 = v14 == 2067; goto LABEL_33; } if ( v14 == 3016 ) goto LABEL_68; if ( v14 != 3642 ) goto LABEL_47; v21 = *(_DWORD *)(a2 + 924); v22 = *(_QWORD **)(a1 + 14944); v23 = (_DWORD *)v22[55]; v24 = (unsigned __int64)v21 >> 24; v25 = v22[57]; v26 = 2 * (v22[60] & (0x100000001B3LL * (v24 ^ (0x100000001B3LL * (BYTE2(v21) ^ (0x100000001B3LL * ((0x100000001B3LL * ((unsigned __int8)v21 ^ 0xCBF29CE484222325uLL)) ^ BYTE1(v21)))))))); v27 = *(_DWORD **)(v25 + 16 * (v22[60] & (0x100000001B3LL * (v24 ^ (0x100000001B3LL * (BYTE2(v21) ^ (0x100000001B3LL * ((0x100000001B3LL * ((unsigned __int8)v21 ^ 0xCBF29CE484222325uLL)) ^ BYTE1(v21)))))))) + 8); v28 = v27; if ( v27 != v23 ) { v29 = *(_QWORD **)(v25 + 16 * (v22[60] & (0x100000001B3LL * (v24 ^ (0x100000001B3LL * ((unsigned __int8)BYTE2(*(_DWORD *)(a2 + 924)) ^ (0x100000001B3LL * ((0x100000001B3LL * ((unsigned __int8)v21 ^ 0xCBF29CE484222325uLL)) ^ (unsigned __int8)BYTE1(*(_DWORD *)(a2 + 924)))))))))); if ( v21 == v27[4] ) goto LABEL_59; while ( v28 != v29 ) { v28 = (_QWORD *)v28[1]; if ( v21 == *((_DWORD *)v28 + 4) ) goto LABEL_59; } } v28 = nullptr; LABEL_59: if ( v28 ) { v30 = *(_QWORD **)(v25 + 8 * v26); if ( v27 == (_DWORD *)v28 ) { if ( v30 == v28 ) *(_QWORD *)(v25 + 8 * v26) = v23; else v23 = (_DWORD *)v28[1]; *(_QWORD *)(v25 + 8 * v26 + 8) = v23; } else if ( v30 == v28 ) { *(_QWORD *)(v25 + 8 * v26) = *v28; } v31 = *v28; --v22[56]; *(_QWORD *)v28[1] = v31; *(_QWORD *)(v31 + 8) = v28[1]; j_j_free(v28); } goto LABEL_70; } if ( v14 == 1814 ) goto LABEL_68; if ( v14 <= 1268 ) { if ( v14 != 1268 ) { if ( v14 != 901 ) { if ( v14 == 1006 ) { v15 = *(cocos2d::CCArray **)(a1 + 14696); goto LABEL_69; } if ( v14 == 1007 ) { v15 = *(cocos2d::CCArray **)(a1 + 14712); LABEL_69: cocos2d::CCArray::removeObject(v15, (struct cocos2d::CCObject *)a2, 1); goto LABEL_70; } LABEL_47: if ( v14 <= 744 ) { if ( v14 != 744 ) { v19 = v14 - 29; if ( v19 ) { v20 = v19 - 1; if ( v20 ) { if ( v20 != 75 ) goto LABEL_70; } } } LABEL_37: v15 = *(cocos2d::CCArray **)(a1 + 14704); goto LABEL_69; } goto LABEL_34; } LABEL_68: v15 = *(cocos2d::CCArray **)(a1 + 14728); goto LABEL_69; } LABEL_44: v15 = *(cocos2d::CCArray **)(a1 + 14720); goto LABEL_69; } if ( v14 == 1346 ) goto LABEL_68; v16 = v14 == 1347; LABEL_33: if ( v16 ) goto LABEL_68; LABEL_34: v17 = v14 - 899; if ( !v17 ) goto LABEL_37; v18 = v17 - 1; if ( !v18 || v18 == 15 ) goto LABEL_37; LABEL_70: if ( *(_BYTE *)(a2 + 1261) ) { cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(a1 + 14832), (struct cocos2d::CCObject *)a2, 1); *(_BYTE *)(a1 + 14840) = 1; } if ( *(_BYTE *)(a2 + 1265) || (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1536LL))(a2) ) cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(a1 + 14768), (struct cocos2d::CCObject *)a2, 1); if ( *(_BYTE *)(a2 + 1263) ) cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(a1 + 14688), (struct cocos2d::CCObject *)a2, 1); v32 = *(_QWORD *)(a1 + 15520); if ( v32 && *(_DWORD *)(v32 + 924) == *(_DWORD *)(a2 + 924) ) *(_QWORD *)(a1 + 15520) = 0; if ( *(_QWORD *)(a1 + 15528) == a2 ) *(_QWORD *)(a1 + 15528) = 0; if ( *(_QWORD *)(a1 + 15536) == a2 ) *(_QWORD *)(a1 + 15536) = 0; if ( *(_QWORD *)(a1 + 15680) == a2 ) *(_QWORD *)(a1 + 15680) = 0; if ( *(_QWORD *)(a1 + 15688) == a2 ) *(_QWORD *)(a1 + 15688) = 0; cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(a1 + 3536), (struct cocos2d::CCObject *)a2, 1); GJBaseGameLayer::removeFromGroupParents(a1, a2); GJBaseGameLayer::removeFromGroups(a1, a2); result = *(int *)(a2 + 880); if ( (_DWORD)result ) { v34 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(a1 + 4256), *(int *)(a2 + 880)); if ( v34 ) cocos2d::CCArray::removeObject(v34, (struct cocos2d::CCObject *)a2, 1); v37 = *(_DWORD *)(a2 + 924); v35 = *(_QWORD *)sub_1402749A0((_QWORD *)(a1 + 14256), (__int64)v36, (unsigned __int8 *)&v37); result = *(unsigned int *)(a2 + 880); *(_DWORD *)(v35 + 20) = result; *(_DWORD *)(a2 + 880) = 0; } *(_BYTE *)(a1 + 15666) = 1; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source