{"type": "func", "start": 8309884, "end": 8310024, "name": "GJMGLayer::updateGroundColor", "pseudocode": "// \n// GJMGLayer::updateGroundColor from 0x7ecc7c to 0x7ecd08 (140 bytes)\n// \n// 7 xrefs:\n// > LevelEditorLayer::updateEditorMode @ 0x6625e8\n// > LevelEditorLayer::updateEditorMode @ 0x662608\n// > GJMGLayer::init @ 0x7ecf04\n// > GJMGLayer::init @ 0x7ed05c\n// > GJBaseGameLayer::updateLevelColors @ 0x857f48\n// > GJBaseGameLayer::updateLevelColors @ 0x857f80\n// > <???> @ 0x80430\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\n// local variable allocation has failed, the output may be wrong!\nvoid GJMGLayer::updateGroundColor(GJMGLayer *a1, cocos2d::ccColor3B a2, bool a3)\n{\n  cocos2d::CCSprite *m_ground1Sprite; // x1\n  cocos2d::CCSprite *m_ground2Sprite; // x0\n  unsigned int v5; // w19\n  cocos2d::CCArray *v6; // x20\n  __int64 v7; // x0\n  bool v8; // cf\n  unsigned int v9; // w1\n  __int64 v10; // [xsp+38h] [xbp+38h] BYREF\n\n  v10 = *(_QWORD *)&a2.r;\n  m_ground1Sprite = a1->m_ground1Sprite;\n  m_ground2Sprite = a1->m_ground2Sprite;\n  if ( !a3 )\n    m_ground1Sprite = m_ground2Sprite;\n  if ( m_ground1Sprite )\n  {\n    v5 = 0;\n    v6 = m_ground1Sprite->getChildren(m_ground1Sprite);\n    while ( 1 )\n    {\n      v8 = v5 >= (unsigned int)cocos2d::CCArray::count(v6);\n      v9 = v5++;\n      if ( v8 )\n        break;\n      v7 = cocos2d::CCArray::objectAtIndex(v6, v9);\n      (*(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v7 + 944LL))(v7, &v10);\n    }\n  }\n}", "assembly": "; \n; GJMGLayer::updateGroundColor from 0x7ecc7c to 0x7ecd08 (140 bytes)\n; \n; 7 xrefs:\n; > LevelEditorLayer::updateEditorMode @ 0x6625e8\n; > LevelEditorLayer::updateEditorMode @ 0x662608\n; > GJMGLayer::init @ 0x7ecf04\n; > GJMGLayer::init @ 0x7ed05c\n; > GJBaseGameLayer::updateLevelColors @ 0x857f48\n; > GJBaseGameLayer::updateLevelColors @ 0x857f80\n; > <???> @ 0x80430\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\nSTP             X29, X30, [SP,#var_40]!                                ; +0x0, 0x7ecc7c\nUXTB            W2, W2                                                 ; +0x4, 0x7ecc80\nMOV             X29, SP                                                ; +0x8, 0x7ecc84\nCMP             W2, WZR                                                ; +0xc, 0x7ecc88\nSTR             X21, [SP,#0x40+var_20]                                 ; +0x10, 0x7ecc8c\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x14, 0x7ecc90\nSTR             X1, [X29,#0x40+var_8]                                  ; +0x18, 0x7ecc94\nLDR             X1, [X0,#0x198]                                        ; +0x1c, 0x7ecc98\nLDR             X0, [X0,#0x1A0]                                        ; +0x20, 0x7ecc9c\nCSEL            X1, X1, X0, NE                                         ; +0x24, 0x7ecca0\nCBZ             X1, loc_7ECCF8                                         ; +0x28, 0x7ecca4\nLDR             X2, [X1]                                               ; +0x2c, 0x7ecca8\nMOV             X0, X1                                                 ; +0x30, 0x7eccac\nMOV             W19, #0                                                ; +0x34, 0x7eccb0\nADD             X21, X29, #0x40+var_8                                  ; +0x38, 0x7eccb4\nLDR             X1, [X2,#0x1D8]                                        ; +0x3c, 0x7eccb8\nBLR             X1                                                     ; +0x40, 0x7eccbc\nMOV             X20, X0                                                ; +0x44, 0x7eccc0\nB               loc_7ECCDC                                             ; +0x48, 0x7eccc4\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x4c, 0x7eccc8\nLDR             X2, [X0]                                               ; +0x50, 0x7ecccc\nMOV             X1, X21                                                ; +0x54, 0x7eccd0\nLDR             X2, [X2,#0x3B0]                                        ; +0x58, 0x7eccd4\nBLR             X2                                                     ; +0x5c, 0x7eccd8\nMOV             X0, X20; this                                          ; +0x60, 0x7eccdc\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x64, 0x7ecce0\nCMP             W19, W0                                                ; +0x68, 0x7ecce4\nMOV             W1, W19; unsigned int                                  ; +0x6c, 0x7ecce8\nMOV             X0, X20; this                                          ; +0x70, 0x7eccec\nADD             W19, W19, #1                                           ; +0x74, 0x7eccf0\nB.CC            loc_7ECCC8                                             ; +0x78, 0x7eccf4\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x7c, 0x7eccf8\nLDR             X21, [SP,#0x40+var_20]                                 ; +0x80, 0x7eccfc\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x84, 0x7ecd00\nRET                                                                    ; +0x88, 0x7ecd04", "xrefs": ["LevelEditorLayer::updateEditorMode @ 0x6625e8", "LevelEditorLayer::updateEditorMode @ 0x662608", "GJMGLayer::init @ 0x7ecf04", "GJMGLayer::init @ 0x7ed05c", "GJBaseGameLayer::updateLevelColors @ 0x857f48", "GJBaseGameLayer::updateLevelColors @ 0x857f80", "<???> @ 0x80430"], "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"}