{"type": "func", "start": 4666176, "end": 4666524, "name": "GJBaseGameLayer::removeObjectFromSection", "pseudocode": "// \n// GJBaseGameLayer::removeObjectFromSection from 0x473340 to 0x47349c (348 bytes)\n// \n// 10 xrefs:\n// > PlayLayer::removeCheckpoint @ 0x314988\n// > LevelEditorLayer::removePlayerCollisionBlock @ 0x36876a\n// > LevelEditorLayer::removePlayerCollisionBlock @ 0x36877a\n// > LevelEditorLayer::removeObject @ 0x36ac2c\n// > LevelEditorLayer::handleAction @ 0x37172e\n// > LevelEditorLayer::handleAction @ 0x37178a\n// > GJBaseGameLayer::reorderObjectSection @ 0x4734a2\n// > GJBaseGameLayer::updateExtendedCollision @ 0x473c78\n// > GJBaseGameLayer::addUIObject @ 0x4823be\n// > SetupObjectOptionsPopup::onDisableObject @ 0x508ae8\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid GJBaseGameLayer::removeObjectFromSection(GJBaseGameLayer *a1, GameObject *a2)\n{\n  int m_outerSectionIndex; // r3\n  int m_middleSectionIndex; // r2\n  int m_someOtherIndex; // r7\n  int *m_start; // r6\n  std::vector<GameObject *> *v6; // r4\n  GameObject **v7; // r5\n  int v8; // r3\n  int m_innerSectionIndex; // r6\n  int v10; // r2\n  int v11; // r5\n  GameObject **v12; // r4\n  int v13; // r3\n  std::vector<GameObject *> **v14; // r4\n  int v15; // r2\n  int *v16; // r0\n  int *v17; // r4\n  int v18; // r5\n  int v19; // r3\n  int v20; // r3\n  int v21; // r2\n  GJBaseGameLayer_vtbl *v22; // r3\n  int v23; // r3\n  int v24; // r2\n  int *v25; // r7\n  std::vector<GameObject *> *v26; // r4\n  GameObject **v27; // r5\n  int v28; // r3\n  unsigned int v29; // r2\n  std::uintptr_t *m_bitptr; // r1\n\n  m_outerSectionIndex = a2->m_outerSectionIndex;\n  if ( m_outerSectionIndex >= 0 )\n  {\n    m_middleSectionIndex = a2->m_middleSectionIndex;\n    m_someOtherIndex = a2->m_someOtherIndex;\n    m_start = a1->m_sectionSizes.m_start[m_outerSectionIndex]->m_start;\n    v6 = a1->m_sections.m_start[m_outerSectionIndex]->m_start[m_middleSectionIndex];\n    v7 = v6->m_start;\n    v8 = m_start[m_middleSectionIndex] - 1;\n    m_start[m_middleSectionIndex] = v8;\n    v7[m_someOtherIndex] = v7[v8];\n    v6->m_start[a2->m_someOtherIndex]->m_someOtherIndex = a2->m_someOtherIndex;\n    if ( a2->m_objectID == 1816 )\n    {\n      m_innerSectionIndex = a2->m_innerSectionIndex;\n      if ( !a2->m_hasExtendedCollision )\n      {\n        v13 = a2->m_outerSectionIndex;\n        v14 = a1->m_collisionBlockSections.m_start;\n        v15 = a2->m_middleSectionIndex;\n        v16 = a1->m_collisionBlockSectionSizes.m_start[v13]->m_start;\n        v17 = (int *)v14[v13]->m_start[v15];\n        v18 = *v17;\n        v19 = v16[v15] - 1;\n        v16[v15] = v19;\n        *(_DWORD *)(v18 + 4 * m_innerSectionIndex) = *(_DWORD *)(v18 + 4 * v19);\n        v20 = a2->m_innerSectionIndex;\n        v21 = *v17;\nLABEL_10:\n        *(_DWORD *)(*(_DWORD *)(v21 + 4 * v20) + 524) = v20;\n        return;\n      }\n      v10 = 11488;\n      v11 = 11500;\n      v12 = a1->m_calcCollisionBlockObjects.m_start;\nLABEL_9:\n      v22 = (GJBaseGameLayer_vtbl *)(*(char **)((char *)&a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable\n                                              + v11)\n                                   - 1);\n      *(GJBaseGameLayer_vtbl **)((char *)&a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable\n                               + v11) = v22;\n      v12[m_innerSectionIndex] = v12[(_DWORD)v22];\n      v20 = a2->m_innerSectionIndex;\n      v21 = *(int *)((char *)&a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable\n                   + v10);\n      goto LABEL_10;\n    }\n    if ( a2->m_objectType == Decoration )\n      return;\n    m_innerSectionIndex = a2->m_innerSectionIndex;\n    if ( a2->m_hasExtendedCollision )\n    {\n      v10 = 11472;\n      v11 = 11484;\n      v12 = a1->m_calcNonEffectObjects.m_start;\n      goto LABEL_9;\n    }\n    v23 = a2->m_outerSectionIndex;\n    v24 = a2->m_middleSectionIndex;\n    v25 = a1->m_nonEffectObjectsSizes.m_start[v23]->m_start;\n    v26 = a1->m_nonEffectObjects.m_start[v23]->m_start[v24];\n    v27 = v26->m_start;\n    v28 = v25[v24] - 1;\n    v25[v24] = v28;\n    v27[m_innerSectionIndex] = v27[v28];\n    v26->m_start[a2->m_innerSectionIndex]->m_innerSectionIndex = a2->m_innerSectionIndex;\n    v29 = a2->m_middleSectionIndex;\n    m_bitptr = a1->m_nonEffectObjectsFlags.m_start[a2->m_outerSectionIndex]->m_start.m_bitptr;\n    m_bitptr[v29 >> 5] |= 1 << (v29 & 0x1F);\n  }\n}", "assembly": "; \n; GJBaseGameLayer::removeObjectFromSection from 0x473340 to 0x47349c (348 bytes)\n; \n; 10 xrefs:\n; > PlayLayer::removeCheckpoint @ 0x314988\n; > LevelEditorLayer::removePlayerCollisionBlock @ 0x36876a\n; > LevelEditorLayer::removePlayerCollisionBlock @ 0x36877a\n; > LevelEditorLayer::removeObject @ 0x36ac2c\n; > LevelEditorLayer::handleAction @ 0x37172e\n; > LevelEditorLayer::handleAction @ 0x37178a\n; > GJBaseGameLayer::reorderObjectSection @ 0x4734a2\n; > GJBaseGameLayer::updateExtendedCollision @ 0x473c78\n; > GJBaseGameLayer::addUIObject @ 0x4823be\n; > SetupObjectOptionsPopup::onDisableObject @ 0x508ae8\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nLDR.W           R3, [R1,#0x210]                                        ; +0x0, 0x473340\nPUSH            {R4-R7,LR}                                             ; +0x4, 0x473344\nCMP             R3, #0                                                 ; +0x6, 0x473346\nBLT.W           locret_47349A                                          ; +0x8, 0x473348\nMOVW            R4, #0x2CAC                                            ; +0xc, 0x47334c\nADD.W           R6, R0, #0x2D00                                        ; +0x10, 0x473350\nLDR             R4, [R0,R4]                                            ; +0x14, 0x473354\nLDR             R6, [R6]                                               ; +0x16, 0x473356\nLDR.W           R2, [R1,#0x214]                                        ; +0x18, 0x473358\nLDR.W           R4, [R4,R3,LSL#2]                                      ; +0x1c, 0x47335c\nLDR.W           R3, [R6,R3,LSL#2]                                      ; +0x20, 0x473360\nLDR.W           R7, [R1,#0x208]                                        ; +0x24, 0x473364\nLDR             R4, [R4]                                               ; +0x28, 0x473368\nLDR             R6, [R3]                                               ; +0x2a, 0x47336a\nLDR.W           R4, [R4,R2,LSL#2]                                      ; +0x2c, 0x47336c\nLDR.W           R3, [R6,R2,LSL#2]                                      ; +0x30, 0x473370\nLDR             R5, [R4]                                               ; +0x34, 0x473374\nSUBS            R3, #1                                                 ; +0x36, 0x473376\nSTR.W           R3, [R6,R2,LSL#2]                                      ; +0x38, 0x473378\nLDR.W           R3, [R5,R3,LSL#2]                                      ; +0x3c, 0x47337c\nSTR.W           R3, [R5,R7,LSL#2]                                      ; +0x40, 0x473380\nLDR.W           R3, [R1,#0x208]                                        ; +0x44, 0x473384\nLDR             R2, [R4]                                               ; +0x48, 0x473388\nLDR.W           R2, [R2,R3,LSL#2]                                      ; +0x4a, 0x47338a\nSTR.W           R3, [R2,#0x208]                                        ; +0x4e, 0x47338e\nLDR.W           R3, [R1,#0x374]                                        ; +0x52, 0x473392\nCMP.W           R3, #0x718                                             ; +0x56, 0x473396\nBNE             loc_4733F2                                             ; +0x5a, 0x47339a\nLDRB.W          R3, [R1,#0x218]                                        ; +0x5c, 0x47339c\nLDR.W           R6, [R1,#0x20C]                                        ; +0x60, 0x4733a0\nCBZ             R3, loc_4733B2                                         ; +0x64, 0x4733a4\nMOVW            R2, #0x2CE0                                            ; +0x66, 0x4733a6\nMOVW            R5, #0x2CEC                                            ; +0x6a, 0x4733aa\nLDR             R4, [R0,R2]                                            ; +0x6e, 0x4733ae\nB               loc_47340E                                             ; +0x70, 0x4733b0\nMOVW            R4, #0x2CC4                                            ; +0x72, 0x4733b2\nLDR.W           R3, [R1,#0x210]                                        ; +0x76, 0x4733b6\nLDR             R4, [R0,R4]                                            ; +0x7a, 0x4733ba\nMOVW            R7, #0x2D18                                            ; +0x7c, 0x4733bc\nLDR             R0, [R0,R7]                                            ; +0x80, 0x4733c0\nLDR.W           R2, [R1,#0x214]                                        ; +0x82, 0x4733c2\nLDR.W           R4, [R4,R3,LSL#2]                                      ; +0x86, 0x4733c6\nLDR.W           R3, [R0,R3,LSL#2]                                      ; +0x8a, 0x4733ca\nLDR             R4, [R4]                                               ; +0x8e, 0x4733ce\nLDR             R0, [R3]                                               ; +0x90, 0x4733d0\nLDR.W           R4, [R4,R2,LSL#2]                                      ; +0x92, 0x4733d2\nLDR.W           R3, [R0,R2,LSL#2]                                      ; +0x96, 0x4733d6\nLDR             R5, [R4]                                               ; +0x9a, 0x4733da\nSUBS            R3, #1                                                 ; +0x9c, 0x4733dc\nSTR.W           R3, [R0,R2,LSL#2]                                      ; +0x9e, 0x4733de\nLDR.W           R3, [R5,R3,LSL#2]                                      ; +0xa2, 0x4733e2\nSTR.W           R3, [R5,R6,LSL#2]                                      ; +0xa6, 0x4733e6\nLDR.W           R3, [R1,#0x20C]                                        ; +0xaa, 0x4733ea\nLDR             R2, [R4]                                               ; +0xae, 0x4733ee\nB               loc_473422                                             ; +0xb0, 0x4733f0\nLDR.W           R3, [R1,#0x308]                                        ; +0xb2, 0x4733f2\nCMP             R3, #7                                                 ; +0xb6, 0x4733f6\nBEQ             locret_47349A                                          ; +0xb8, 0x4733f8\nLDRB.W          R3, [R1,#0x218]                                        ; +0xba, 0x4733fa\nLDR.W           R6, [R1,#0x20C]                                        ; +0xbe, 0x4733fe\nCBZ             R3, loc_47342C                                         ; +0xc2, 0x473402\nMOVW            R2, #0x2CD0                                            ; +0xc4, 0x473404\nMOVW            R5, #0x2CDC                                            ; +0xc8, 0x473408\nLDR             R4, [R0,R2]                                            ; +0xcc, 0x47340c\nLDR             R3, [R0,R5]                                            ; +0xce, 0x47340e\nSUBS            R3, #1                                                 ; +0xd0, 0x473410\nSTR             R3, [R0,R5]                                            ; +0xd2, 0x473412\nLDR.W           R3, [R4,R3,LSL#2]                                      ; +0xd4, 0x473414\nSTR.W           R3, [R4,R6,LSL#2]                                      ; +0xd8, 0x473418\nLDR.W           R3, [R1,#0x20C]                                        ; +0xdc, 0x47341c\nLDR             R2, [R0,R2]                                            ; +0xe0, 0x473420\nLDR.W           R2, [R2,R3,LSL#2]                                      ; +0xe2, 0x473422\nSTR.W           R3, [R2,#0x20C]                                        ; +0xe6, 0x473426\nPOP             {R4-R7,PC}                                             ; +0xea, 0x47342a\nMOVW            R4, #0x2CB8                                            ; +0xec, 0x47342c\nLDR.W           R3, [R1,#0x210]                                        ; +0xf0, 0x473430\nLDR             R4, [R0,R4]                                            ; +0xf4, 0x473434\nMOVW            R7, #0x2D0C                                            ; +0xf6, 0x473436\nLDR             R7, [R0,R7]                                            ; +0xfa, 0x47343a\nLDR.W           R2, [R1,#0x214]                                        ; +0xfc, 0x47343c\nLDR.W           R4, [R4,R3,LSL#2]                                      ; +0x100, 0x473440\nLDR.W           R3, [R7,R3,LSL#2]                                      ; +0x104, 0x473444\nLDR             R4, [R4]                                               ; +0x108, 0x473448\nLDR             R7, [R3]                                               ; +0x10a, 0x47344a\nLDR.W           R4, [R4,R2,LSL#2]                                      ; +0x10c, 0x47344c\nLDR.W           R3, [R7,R2,LSL#2]                                      ; +0x110, 0x473450\nLDR             R5, [R4]                                               ; +0x114, 0x473454\nSUBS            R3, #1                                                 ; +0x116, 0x473456\nSTR.W           R3, [R7,R2,LSL#2]                                      ; +0x118, 0x473458\nLDR.W           R3, [R5,R3,LSL#2]                                      ; +0x11c, 0x47345c\nSTR.W           R3, [R5,R6,LSL#2]                                      ; +0x120, 0x473460\nLDR.W           R3, [R1,#0x20C]                                        ; +0x124, 0x473464\nLDR             R2, [R4]                                               ; +0x128, 0x473468\nLDR.W           R2, [R2,R3,LSL#2]                                      ; +0x12a, 0x47346a\nSTR.W           R3, [R2,#0x20C]                                        ; +0x12e, 0x47346e\nMOVW            R3, #0x2D24                                            ; +0x132, 0x473472\nLDR.W           R2, [R1,#0x214]                                        ; +0x136, 0x473476\nLDR             R3, [R0,R3]                                            ; +0x13a, 0x47347a\nLDR.W           R1, [R1,#0x210]                                        ; +0x13c, 0x47347c\nLSRS            R0, R2, #5                                             ; +0x140, 0x473480\nAND.W           R2, R2, #0x1F                                          ; +0x142, 0x473482\nLDR.W           R3, [R3,R1,LSL#2]                                      ; +0x146, 0x473486\nLDR             R1, [R3]                                               ; +0x14a, 0x47348a\nMOVS            R3, #1                                                 ; +0x14c, 0x47348c\nLSLS            R3, R2                                                 ; +0x14e, 0x47348e\nLDR.W           R2, [R1,R0,LSL#2]                                      ; +0x150, 0x473490\nORRS            R3, R2                                                 ; +0x154, 0x473494\nSTR.W           R3, [R1,R0,LSL#2]                                      ; +0x156, 0x473496\nPOP             {R4-R7,PC}                                             ; +0x15a, 0x47349a", "xrefs": ["PlayLayer::removeCheckpoint @ 0x314988", "LevelEditorLayer::removePlayerCollisionBlock @ 0x36876a", "LevelEditorLayer::removePlayerCollisionBlock @ 0x36877a", "LevelEditorLayer::removeObject @ 0x36ac2c", "LevelEditorLayer::handleAction @ 0x37172e", "LevelEditorLayer::handleAction @ 0x37178a", "GJBaseGameLayer::reorderObjectSection @ 0x4734a2", "GJBaseGameLayer::updateExtendedCollision @ 0x473c78", "GJBaseGameLayer::addUIObject @ 0x4823be", "SetupObjectOptionsPopup::onDisableObject @ 0x508ae8"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}