{"type": "func", "start": 8787144, "end": 8787452, "name": "GJBaseGameLayer::updateObjectSection", "pseudocode": "// \n// GJBaseGameLayer::updateObjectSection from 0x8614c8 to 0x8615fc (308 bytes)\n// \n// 4 xrefs:\n// > LevelEditorLayer::updateObjectSection @ 0x65b4f0\n// > <???> @ 0x59b98\n// > <???> @ 0x1148a48\n// > <???> @ 0x1190738\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::updateObjectSection(GJBaseGameLayer *a1, GameObject *a2)\n{\n  int m_outerSectionIndex; // w3\n  double m_positionX; // d0\n  int v4; // w19\n  double m_positionY; // d0\n  int v6; // w2\n  int v9; // w0\n  int m_middleSectionIndex; // w0\n\n  m_outerSectionIndex = a2->m_outerSectionIndex;\n  if ( m_outerSectionIndex < 0 )\n    return;\n  m_positionX = a2->m_positionX;\n  if ( m_positionX <= 0.0 )\n  {\n    v4 = 0;\nLABEL_5:\n    m_positionY = a2->m_positionY;\n    if ( m_positionY > 0.0 )\n      goto LABEL_6;\n    goto LABEL_14;\n  }\n  if ( m_positionX < 10000000.0 )\n  {\n    v4 = (int)(m_positionX * a1->m_sectionXFactor);\n    goto LABEL_5;\n  }\n  v4 = (int)(float)(a1->m_sectionXFactor * 10000000.0);\n  m_positionY = a2->m_positionY;\n  if ( m_positionY > 0.0 )\n  {\nLABEL_6:\n    if ( m_positionY < 10000000.0 )\n      v6 = (int)(m_positionY * a1->m_sectionYFactor);\n    else\n      v6 = (int)(float)(a1->m_sectionYFactor * 10000000.0);\n    if ( v4 != m_outerSectionIndex )\n      goto LABEL_9;\nLABEL_15:\n    if ( v6 == a2->m_middleSectionIndex )\n      return;\n    goto LABEL_9;\n  }\nLABEL_14:\n  v6 = 0;\n  if ( v4 == m_outerSectionIndex )\n    goto LABEL_15;\nLABEL_9:\n  GJBaseGameLayer::reorderObjectSection(a1, a2);\n  if ( a2->m_isActivated )\n  {\n    v9 = a2->m_outerSectionIndex;\n    if ( v9 > a1->m_rightSectionIndex\n      || v9 < a1->m_leftSectionIndex\n      || (m_middleSectionIndex = a2->m_middleSectionIndex, m_middleSectionIndex > a1->m_topSectionIndex)\n      || m_middleSectionIndex < a1->m_bottomSectionIndex )\n    {\n      cocos2d::CCDictionary::setObject(a1->m_objectsToDeactivate, a2, (unsigned int)a2->m_uniqueID);\n      a2->m_unk3ee = 1;\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::updateObjectSection from 0x8614c8 to 0x8615fc (308 bytes)\n; \n; 4 xrefs:\n; > LevelEditorLayer::updateObjectSection @ 0x65b4f0\n; > <???> @ 0x59b98\n; > <???> @ 0x1148a48\n; > <???> @ 0x1190738\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,#-0x20+var_s0]!                          ; +0x0, 0x8614c8\nMOV             X29, SP                                                ; +0x4, 0x8614cc\nLDR             W3, [X1,#0x274]                                        ; +0x8, 0x8614d0\nSTP             X19, X20, [SP,#var_s10]                                ; +0xc, 0x8614d4\nTBNZ            W3, #0x1F, loc_861570                                  ; +0x10, 0x8614d8\nLDR             D0, [X1,#0x3A0]                                        ; +0x14, 0x8614dc\nFCMPE           D0, #0.0                                               ; +0x18, 0x8614e0\nB.LS            loc_8615C8                                             ; +0x1c, 0x8614e4\nLDR             D1, =0x416312D000000000                                ; +0x20, 0x8614e8\nFCMPE           D0, D1                                                 ; +0x24, 0x8614ec\nB.GE            loc_86157C                                             ; +0x28, 0x8614f0\nLDR             S1, [X0,#0x3688]                                       ; +0x2c, 0x8614f4\nFCVT            D1, S1                                                 ; +0x30, 0x8614f8\nFMUL            D0, D0, D1                                             ; +0x34, 0x8614fc\nFCVTZS          W19, D0                                                ; +0x38, 0x861500\nLDR             D0, [X1,#0x3A8]                                        ; +0x3c, 0x861504\nFCMPE           D0, #0.0                                               ; +0x40, 0x861508\nB.LS            loc_861598                                             ; +0x44, 0x86150c\nLDR             D1, =0x416312D000000000                                ; +0x48, 0x861510\nFCMPE           D0, D1                                                 ; +0x4c, 0x861514\nB.LT            loc_8615B4                                             ; +0x50, 0x861518\nLDR             S0, [X0,#0x368C]                                       ; +0x54, 0x86151c\nLDR             S1, =0x4B189680                                        ; +0x58, 0x861520\nFMUL            S0, S0, S1                                             ; +0x5c, 0x861524\nFCVTZS          W2, S0                                                 ; +0x60, 0x861528\nCMP             W19, W3                                                ; +0x64, 0x86152c\nB.EQ            loc_8615A4                                             ; +0x68, 0x861530\nMOV             X19, X1                                                ; +0x6c, 0x861534\nMOV             X20, X0                                                ; +0x70, 0x861538\nBL              _ZN15GJBaseGameLayer20reorderObjectSectionEP10GameObject; GJBaseGameLayer::reorderObjectSection(GameObject *) ; +0x74, 0x86153c\nLDRB            W0, [X19,#0x305]                                       ; +0x78, 0x861540\nCBZ             W0, loc_861570                                         ; +0x7c, 0x861544\nLDR             W0, [X19,#0x274]                                       ; +0x80, 0x861548\nLDR             W1, [X20,#0x3100]                                      ; +0x84, 0x86154c\nCMP             W0, W1                                                 ; +0x88, 0x861550\nB.LE            loc_8615D0                                             ; +0x8c, 0x861554\nLDR             X0, [X20,#0x1078]; this                                ; +0x90, 0x861558\nMOV             X1, X19; cocos2d::CCObject *                           ; +0x94, 0x86155c\nLDR             W2, [X19,#0x384]; __int64                              ; +0x98, 0x861560\nBL              _ZN7cocos2d12CCDictionary9setObjectEPNS_8CCObjectEl; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,long) ; +0x9c, 0x861564\nMOV             W0, #1                                                 ; +0xa0, 0x861568\nSTRB            W0, [X19,#0x3D6]                                       ; +0xa4, 0x86156c\nLDP             X19, X20, [SP,#var_s10]                                ; +0xa8, 0x861570\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0xac, 0x861574\nRET                                                                    ; +0xb0, 0x861578\nLDR             S0, [X0,#0x3688]                                       ; +0xb4, 0x86157c\nLDR             S1, =0x4B189680                                        ; +0xb8, 0x861580\nFMUL            S0, S0, S1                                             ; +0xbc, 0x861584\nFCVTZS          W19, S0                                                ; +0xc0, 0x861588\nLDR             D0, [X1,#0x3A8]                                        ; +0xc4, 0x86158c\nFCMPE           D0, #0.0                                               ; +0xc8, 0x861590\nB.HI            loc_861510                                             ; +0xcc, 0x861594\nCMP             W19, W3                                                ; +0xd0, 0x861598\nMOV             W2, #0                                                 ; +0xd4, 0x86159c\nB.NE            loc_861534                                             ; +0xd8, 0x8615a0\nLDR             W3, [X1,#0x278]                                        ; +0xdc, 0x8615a4\nCMP             W2, W3                                                 ; +0xe0, 0x8615a8\nB.NE            loc_861534                                             ; +0xe4, 0x8615ac\nB               loc_861570                                             ; +0xe8, 0x8615b0\nLDR             S1, [X0,#0x368C]                                       ; +0xec, 0x8615b4\nFCVT            D1, S1                                                 ; +0xf0, 0x8615b8\nFMUL            D0, D0, D1                                             ; +0xf4, 0x8615bc\nFCVTZS          W2, D0                                                 ; +0xf8, 0x8615c0\nB               loc_86152C                                             ; +0xfc, 0x8615c4\nMOV             W19, #0                                                ; +0x100, 0x8615c8\nB               loc_861504                                             ; +0x104, 0x8615cc\nLDR             W1, [X20,#0x30FC]                                      ; +0x108, 0x8615d0\nCMP             W0, W1                                                 ; +0x10c, 0x8615d4\nB.LT            loc_861558                                             ; +0x110, 0x8615d8\nLDR             W0, [X19,#0x278]                                       ; +0x114, 0x8615dc\nLDR             W1, [X20,#0x3108]                                      ; +0x118, 0x8615e0\nCMP             W0, W1                                                 ; +0x11c, 0x8615e4\nB.GT            loc_861558                                             ; +0x120, 0x8615e8\nLDR             W1, [X20,#0x3104]                                      ; +0x124, 0x8615ec\nCMP             W0, W1                                                 ; +0x128, 0x8615f0\nB.LT            loc_861558                                             ; +0x12c, 0x8615f4\nB               loc_861570                                             ; +0x130, 0x8615f8", "xrefs": ["LevelEditorLayer::updateObjectSection @ 0x65b4f0", "<???> @ 0x59b98", "<???> @ 0x1148a48", "<???> @ 0x1190738"], "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"}