{"type": "func", "start": 4668232, "end": 4668504, "name": "GJBaseGameLayer::updateObjectSection", "pseudocode": "// \n// GJBaseGameLayer::updateObjectSection from 0x473b48 to 0x473c58 (272 bytes)\n// \n// 1 xrefs:\n// > LevelEditorLayer::updateObjectSection @ 0x364e18\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; // r2\n  double m_positionX; // d7\n  double v6; // d6\n  float *p_m_sectionXFactor; // r3\n  bool v8; // nf\n  int v9; // s12\n  double m_positionY; // d7\n  double v11; // d5\n  float *p_m_sectionYFactor; // r3\n  bool v13; // nf\n  int v14; // s14\n  int v15; // r3\n  int m_middleSectionIndex; // r3\n\n  m_outerSectionIndex = a2->m_outerSectionIndex;\n  if ( m_outerSectionIndex >= 0 )\n  {\n    m_positionX = a2->m_positionX;\n    if ( m_positionX <= 0.0 )\n    {\n      v9 = 0;\n    }\n    else\n    {\n      HIDWORD(v6) = 1097011920;\n      p_m_sectionXFactor = &a1->m_sectionXFactor;\n      v8 = m_positionX < 10000000.0;\n      if ( m_positionX >= 10000000.0 )\n        LODWORD(v6) = 1259902592;\n      else\n        *(float *)&v6 = *p_m_sectionXFactor;\n      if ( m_positionX >= 10000000.0 )\n        *((float *)&m_positionX + 1) = *p_m_sectionXFactor;\n      else\n        v6 = *(float *)&v6;\n      if ( v8 )\n        v6 = m_positionX * v6;\n      else\n        *(float *)&v6 = *((float *)&m_positionX + 1) * *(float *)&v6;\n      if ( v8 )\n        v9 = (int)v6;\n      else\n        v9 = (int)*(float *)&v6;\n    }\n    m_positionY = a2->m_positionY;\n    if ( m_positionY <= 0.0 )\n    {\n      v14 = 0;\n    }\n    else\n    {\n      v11 = 10000000.0;\n      p_m_sectionYFactor = &a1->m_sectionYFactor;\n      v13 = m_positionY < 10000000.0;\n      if ( m_positionY >= 10000000.0 )\n        *(float *)&m_positionY = *p_m_sectionYFactor;\n      else\n        *(float *)&v11 = *p_m_sectionYFactor;\n      if ( v13 )\n        v11 = *(float *)&v11;\n      else\n        HIDWORD(m_positionY) = 1259902592;\n      if ( v13 )\n        m_positionY = m_positionY * v11;\n      else\n        *(float *)&m_positionY = *(float *)&m_positionY * *((float *)&m_positionY + 1);\n      if ( v13 )\n        v14 = (int)m_positionY;\n      else\n        v14 = (int)*(float *)&m_positionY;\n    }\n    if ( v9 != m_outerSectionIndex || v14 != a2->m_middleSectionIndex )\n    {\n      GJBaseGameLayer::reorderObjectSection(a1, a2);\n      if ( a2->m_isActivated )\n      {\n        v15 = a2->m_outerSectionIndex;\n        if ( v15 > a1->m_rightSectionIndex\n          || v15 < 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, a2->m_uniqueID);\n          a2->m_unk3ee = 1;\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::updateObjectSection from 0x473b48 to 0x473c58 (272 bytes)\n; \n; 1 xrefs:\n; > LevelEditorLayer::updateObjectSection @ 0x364e18\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           R2, [R1,#0x210]                                        ; +0x0, 0x473b48\nPUSH            {R3-R5,LR}                                             ; +0x4, 0x473b4c\nCMP             R2, #0                                                 ; +0x6, 0x473b4e\nMOV             R5, R0                                                 ; +0x8, 0x473b50\nMOV             R4, R1                                                 ; +0xa, 0x473b52\nBLT             locret_473C56                                          ; +0xc, 0x473b54\nVLDR            D7, [R1,#0x320]                                        ; +0xe, 0x473b56\nVCMPE.F64       D7, #0.0                                               ; +0x12, 0x473b5a\nVMRS            APSR_nzcv, FPSCR                                       ; +0x16, 0x473b5e\nBLS             loc_473B9C                                             ; +0x1a, 0x473b62\nVLDR            D6, =1.0e7                                             ; +0x1c, 0x473b64\nADD.W           R3, R0, #0x2D00                                        ; +0x20, 0x473b68\nADDS            R3, #0x30 ; '0'                                        ; +0x24, 0x473b6c\nVCMPE.F64       D7, D6                                                 ; +0x26, 0x473b6e\nVMRS            APSR_nzcv, FPSCR                                       ; +0x2a, 0x473b72\nITETE LT                                                               ; +0x2e, 0x473b76\nVLDRLT          S12, [R3]                                              ; +0x30, 0x473b78\nVLDRGE          S12, =1.0e7                                            ; +0x34, 0x473b7c\nVCVTLT.F64.F32  D6, S12                                                ; +0x38, 0x473b80\nVLDRGE          S15, [R3]                                              ; +0x3c, 0x473b84\nITETE LT                                                               ; +0x40, 0x473b88\nVMULLT.F64      D6, D7, D6                                             ; +0x42, 0x473b8a\nVMULGE.F32      S12, S15, S12                                          ; +0x46, 0x473b8e\nVCVTLT.S32.F64  S12, D6                                                ; +0x4a, 0x473b92\nVCVTGE.S32.F32  S12, S12                                               ; +0x4e, 0x473b96\nB               loc_473BA0                                             ; +0x52, 0x473b9a\nVLDR            S12, =0.0                                              ; +0x54, 0x473b9c\nVLDR            D7, [R4,#0x328]                                        ; +0x58, 0x473ba0\nVCMPE.F64       D7, #0.0                                               ; +0x5c, 0x473ba4\nVMRS            APSR_nzcv, FPSCR                                       ; +0x60, 0x473ba8\nBLS             loc_473BE6                                             ; +0x64, 0x473bac\nVLDR            D5, =1.0e7                                             ; +0x66, 0x473bae\nADD.W           R3, R5, #0x2D00                                        ; +0x6a, 0x473bb2\nADDS            R3, #0x34 ; '4'                                        ; +0x6e, 0x473bb6\nVCMPE.F64       D7, D5                                                 ; +0x70, 0x473bb8\nVMRS            APSR_nzcv, FPSCR                                       ; +0x74, 0x473bbc\nITETE LT                                                               ; +0x78, 0x473bc0\nVLDRLT          S10, [R3]                                              ; +0x7a, 0x473bc2\nVLDRGE          S14, [R3]                                              ; +0x7e, 0x473bc6\nVCVTLT.F64.F32  D5, S10                                                ; +0x82, 0x473bca\nVLDRGE          S15, =1.0e7                                            ; +0x86, 0x473bce\nITETE LT                                                               ; +0x8a, 0x473bd2\nVMULLT.F64      D7, D7, D5                                             ; +0x8c, 0x473bd4\nVMULGE.F32      S14, S14, S15                                          ; +0x90, 0x473bd8\nVCVTLT.S32.F64  S14, D7                                                ; +0x94, 0x473bdc\nVCVTGE.S32.F32  S14, S14                                               ; +0x98, 0x473be0\nB               loc_473BEA                                             ; +0x9c, 0x473be4\nVLDR            S14, =0.0                                              ; +0x9e, 0x473be6\nVMOV            R3, S12                                                ; +0xa2, 0x473bea\nCMP             R3, R2                                                 ; +0xa6, 0x473bee\nBNE             loc_473C00                                             ; +0xa8, 0x473bf0\nVMOV            R2, S14                                                ; +0xaa, 0x473bf2\nLDR.W           R3, [R4,#0x214]                                        ; +0xae, 0x473bf6\nCMP             R2, R3                                                 ; +0xb2, 0x473bfa\nBNE             loc_473C00                                             ; +0xb4, 0x473bfc\nPOP             {R3-R5,PC}                                             ; +0xb6, 0x473bfe\nMOV             R0, R5; this                                           ; +0xb8, 0x473c00\nMOV             R1, R4; GameObject *                                   ; +0xba, 0x473c02\nBL              _ZN15GJBaseGameLayer20reorderObjectSectionEP10GameObject; GJBaseGameLayer::reorderObjectSection(GameObject *) ; +0xbc, 0x473c04\nLDRB.W          R3, [R4,#0x291]                                        ; +0xc0, 0x473c08\nCBZ             R3, locret_473C40                                      ; +0xc4, 0x473c0c\nMOVW            R2, #0x2A04                                            ; +0xc6, 0x473c0e\nLDR.W           R3, [R4,#0x210]                                        ; +0xca, 0x473c12\nLDR             R2, [R5,R2]                                            ; +0xce, 0x473c16\nCMP             R3, R2                                                 ; +0xd0, 0x473c18\nBGT             loc_473C42                                             ; +0xd2, 0x473c1a\nADD.W           R2, R5, #0x2A00                                        ; +0xd4, 0x473c1c\nLDR             R2, [R2]                                               ; +0xd8, 0x473c20\nCMP             R3, R2                                                 ; +0xda, 0x473c22\nBLT             loc_473C42                                             ; +0xdc, 0x473c24\nMOVW            R2, #0x2A0C                                            ; +0xde, 0x473c26\nLDR.W           R3, [R4,#0x214]                                        ; +0xe2, 0x473c2a\nLDR             R2, [R5,R2]                                            ; +0xe6, 0x473c2e\nCMP             R3, R2                                                 ; +0xe8, 0x473c30\nBGT             loc_473C42                                             ; +0xea, 0x473c32\nMOVW            R2, #0x2A08                                            ; +0xec, 0x473c34\nLDR             R2, [R5,R2]                                            ; +0xf0, 0x473c38\nCMP             R3, R2                                                 ; +0xf2, 0x473c3a\nBLT             loc_473C42                                             ; +0xf4, 0x473c3c\nPOP             {R3-R5,PC}                                             ; +0xf6, 0x473c3e\nPOP             {R3-R5,PC}                                             ; +0xf8, 0x473c40\nLDR.W           R0, [R5,#0xA14]; this                                  ; +0xfa, 0x473c42\nMOV             R1, R4; cocos2d::CCObject *                            ; +0xfe, 0x473c46\nLDR.W           R2, [R4,#0x304]; int                                   ; +0x100, 0x473c48\nBL              _ZN7cocos2d12CCDictionary9setObjectEPNS_8CCObjectEi; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,int) ; +0x104, 0x473c4c\nMOVS            R3, #1                                                 ; +0x108, 0x473c50\nSTRB.W          R3, [R4,#0x356]                                        ; +0x10a, 0x473c52\nPOP             {R3-R5,PC}                                             ; +0x10e, 0x473c56", "xrefs": ["LevelEditorLayer::updateObjectSection @ 0x364e18"], "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"}