{"type": "func", "start": 4297015728, "end": 4297016044, "name": "GJBaseGameLayer::updateObjectSection", "pseudocode": "// \n// GJBaseGameLayer::updateObjectSection from 0x1001f41b0 to 0x1001f42ec (316 bytes)\n// \n// 3 xrefs:\n// > LevelEditorLayer::updateObjectSection @ 0x1003628b4\n// > <???> @ 0x10078fdb0\n// > <???> @ 0x1007c0bc8\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 __fastcall GJBaseGameLayer::updateObjectSection(GJBaseGameLayer *a1, GameObject *a2)\n{\n  int m_outerSectionIndex; // w8\n  double m_positionX; // d1\n  double v6; // d0\n  double v7; // d2\n  float m_sectionXFactor; // s2\n  double m_positionY; // d1\n  float m_sectionYFactor; // s0\n  int v11; // w8\n  int m_middleSectionIndex; // w8\n\n  m_outerSectionIndex = a2->m_outerSectionIndex;\n  if ( (m_outerSectionIndex & 0x80000000) == 0 )\n  {\n    m_positionX = a2->m_positionX;\n    v6 = 0.0;\n    v7 = 0.0;\n    if ( m_positionX > 0.0 )\n    {\n      m_sectionXFactor = a1->m_sectionXFactor;\n      if ( m_positionX >= 10000000.0 )\n        v7 = (float)(m_sectionXFactor * 10000000.0);\n      else\n        v7 = m_positionX * m_sectionXFactor;\n    }\n    m_positionY = a2->m_positionY;\n    if ( m_positionY > 0.0 )\n    {\n      m_sectionYFactor = a1->m_sectionYFactor;\n      if ( m_positionY >= 10000000.0 )\n        v6 = (float)(m_sectionYFactor * 10000000.0);\n      else\n        v6 = m_positionY * m_sectionYFactor;\n    }\n    if ( m_outerSectionIndex != (int)v7 || a2->m_middleSectionIndex != (int)v6 )\n    {\n      GJBaseGameLayer::removeObjectFromSection(a1, a2);\n      ((void (__fastcall *)(GJBaseGameLayer *, GameObject *))a1->addToSection)(a1, a2);\n      if ( a2->m_isActivated )\n      {\n        v11 = a2->m_outerSectionIndex;\n        if ( v11 > a1->m_rightSectionIndex\n          || v11 < 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    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::updateObjectSection from 0x1001f41b0 to 0x1001f42ec (316 bytes)\n; \n; 3 xrefs:\n; > LevelEditorLayer::updateObjectSection @ 0x1003628b4\n; > <???> @ 0x10078fdb0\n; > <???> @ 0x1007c0bc8\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             W8, [X1,#0x274]                                        ; +0x0, 0x1001f41b0\nTBNZ            W8, #0x1F, locret_1001F42E8                            ; +0x4, 0x1001f41b4\nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x8, 0x1001f41b8\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0xc, 0x1001f41bc\nADD             X29, SP, #0x10                                         ; +0x10, 0x1001f41c0\nMOV             X19, X1                                                ; +0x14, 0x1001f41c4\nMOV             X20, X0                                                ; +0x18, 0x1001f41c8\nLDR             D1, [X1,#0x3B0]                                        ; +0x1c, 0x1001f41cc\nFMOV            D0, XZR                                                ; +0x20, 0x1001f41d0\nFCMP            D1, #0.0                                               ; +0x24, 0x1001f41d4\nADRP            X9, #qword_100636F90@PAGE                              ; +0x28, 0x1001f41d8\nFMOV            D2, XZR                                                ; +0x2c, 0x1001f41dc\nB.LS            loc_1001F4210                                          ; +0x30, 0x1001f41e0\nLDR             S2, [X20,#0x34B8]                                      ; +0x34, 0x1001f41e4\nLDR             D3, [X9,#qword_100636F90@PAGEOFF]                      ; +0x38, 0x1001f41e8\nFCMP            D1, D3                                                 ; +0x3c, 0x1001f41ec\nB.GE            loc_1001F4200                                          ; +0x40, 0x1001f41f0\nFCVT            D2, S2                                                 ; +0x44, 0x1001f41f4\nFMUL            D2, D1, D2                                             ; +0x48, 0x1001f41f8\nB               loc_1001F4210                                          ; +0x4c, 0x1001f41fc\nADRP            X10, #dword_100636FBC@PAGE                             ; +0x50, 0x1001f4200\nLDR             S1, [X10,#dword_100636FBC@PAGEOFF]                     ; +0x54, 0x1001f4204\nFMUL            S1, S2, S1                                             ; +0x58, 0x1001f4208\nFCVT            D2, S1                                                 ; +0x5c, 0x1001f420c\nFCVTZS          W10, D2                                                ; +0x60, 0x1001f4210\nLDR             D1, [X19,#0x3B8]                                       ; +0x64, 0x1001f4214\nFCMP            D1, #0.0                                               ; +0x68, 0x1001f4218\nB.LS            loc_1001F424C                                          ; +0x6c, 0x1001f421c\nLDR             S0, [X20,#0x34BC]                                      ; +0x70, 0x1001f4220\nLDR             D2, [X9,#qword_100636F90@PAGEOFF]                      ; +0x74, 0x1001f4224\nFCMP            D1, D2                                                 ; +0x78, 0x1001f4228\nB.GE            loc_1001F423C                                          ; +0x7c, 0x1001f422c\nFCVT            D0, S0                                                 ; +0x80, 0x1001f4230\nFMUL            D0, D1, D0                                             ; +0x84, 0x1001f4234\nB               loc_1001F424C                                          ; +0x88, 0x1001f4238\nADRP            X9, #dword_100636FBC@PAGE                              ; +0x8c, 0x1001f423c\nLDR             S1, [X9,#dword_100636FBC@PAGEOFF]                      ; +0x90, 0x1001f4240\nFMUL            S0, S0, S1                                             ; +0x94, 0x1001f4244\nFCVT            D0, S0                                                 ; +0x98, 0x1001f4248\nCMP             W8, W10                                                ; +0x9c, 0x1001f424c\nB.NE            loc_1001F4264                                          ; +0xa0, 0x1001f4250\nFCVTZS          W8, D0                                                 ; +0xa4, 0x1001f4254\nLDR             W9, [X19,#0x278]                                       ; +0xa8, 0x1001f4258\nCMP             W9, W8                                                 ; +0xac, 0x1001f425c\nB.EQ            loc_1001F42E0                                          ; +0xb0, 0x1001f4260\nMOV             X0, X20                                                ; +0xb4, 0x1001f4264\nMOV             X1, X19                                                ; +0xb8, 0x1001f4268\nBL              GJBaseGameLayer__removeObjectFromSection               ; +0xbc, 0x1001f426c\nLDR             X8, [X20]                                              ; +0xc0, 0x1001f4270\nLDR             X8, [X8,#0x510]                                        ; +0xc4, 0x1001f4274\nMOV             X0, X20                                                ; +0xc8, 0x1001f4278\nMOV             X1, X19                                                ; +0xcc, 0x1001f427c\nBLR             X8                                                     ; +0xd0, 0x1001f4280\nLDRB            W8, [X19,#0x305]                                       ; +0xd4, 0x1001f4284\nCMP             W8, #1                                                 ; +0xd8, 0x1001f4288\nB.NE            loc_1001F42E0                                          ; +0xdc, 0x1001f428c\nLDR             W8, [X19,#0x274]                                       ; +0xe0, 0x1001f4290\nLDR             W9, [X20,#0x2F50]                                      ; +0xe4, 0x1001f4294\nCMP             W8, W9                                                 ; +0xe8, 0x1001f4298\nB.GT            loc_1001F42C8                                          ; +0xec, 0x1001f429c\nLDR             W9, [X20,#0x2F4C]                                      ; +0xf0, 0x1001f42a0\nCMP             W8, W9                                                 ; +0xf4, 0x1001f42a4\nB.LT            loc_1001F42C8                                          ; +0xf8, 0x1001f42a8\nLDR             W8, [X19,#0x278]                                       ; +0xfc, 0x1001f42ac\nLDR             W9, [X20,#0x2F58]                                      ; +0x100, 0x1001f42b0\nCMP             W8, W9                                                 ; +0x104, 0x1001f42b4\nB.GT            loc_1001F42C8                                          ; +0x108, 0x1001f42b8\nLDR             W9, [X20,#0x2F54]                                      ; +0x10c, 0x1001f42bc\nCMP             W8, W9                                                 ; +0x110, 0x1001f42c0\nB.GE            loc_1001F42E0                                          ; +0x114, 0x1001f42c4\nLDR             X0, [X20,#0xF28]                                       ; +0x118, 0x1001f42c8\nLDR             W2, [X19,#0x394]                                       ; +0x11c, 0x1001f42cc\nMOV             X1, X19                                                ; +0x120, 0x1001f42d0\nBL              cocos2d__CCDictionary__setObject                       ; +0x124, 0x1001f42d4\nMOV             W8, #1                                                 ; +0x128, 0x1001f42d8\nSTRB            W8, [X19,#0x3E6]                                       ; +0x12c, 0x1001f42dc\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x130, 0x1001f42e0\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x134, 0x1001f42e4\nRET                                                                    ; +0x138, 0x1001f42e8", "xrefs": ["LevelEditorLayer::updateObjectSection @ 0x1003628b4", "<???> @ 0x10078fdb0", "<???> @ 0x1007c0bc8"], "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"}