{"type": "func", "start": 5371722032, "end": 5371722336, "name": "LevelEditorLayer::updateObjectSection", "pseudocode": "// \n// LevelEditorLayer::updateObjectSection from 0x1402df930 to 0x1402dfa60 (304 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x140586390\n// > <???> @ 0x1406d3548\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 LevelEditorLayer::updateObjectSection(LevelEditorLayer *a1, GameObject *a2)\n{\n  int m_outerSectionIndex; // eax\n  double m_positionX; // xmm3_8\n  double v6; // xmm0_8\n  double v7; // xmm1_8\n  float m_sectionXFactor; // xmm2_4\n  double m_positionY; // xmm2_8\n  int v10; // ecx\n  float m_sectionYFactor; // xmm1_4\n  int v12; // eax\n  int m_middleSectionIndex; // eax\n\n  if ( !a1->m_startOptimization || a2->m_objectID == 1816 )\n  {\n    m_outerSectionIndex = a2->m_outerSectionIndex;\n    if ( m_outerSectionIndex >= 0 )\n    {\n      m_positionX = a2->m_positionX;\n      v6 = 0.0;\n      if ( m_positionX > 0.0 )\n      {\n        m_sectionXFactor = a1->m_sectionXFactor;\n        if ( m_positionX < 10000000.0 )\n          v7 = m_sectionXFactor * m_positionX;\n        else\n          v7 = (float)(m_sectionXFactor * 10000000.0);\n      }\n      else\n      {\n        v7 = 0.0;\n      }\n      m_positionY = a2->m_positionY;\n      v10 = (int)v7;\n      if ( m_positionY > 0.0 )\n      {\n        m_sectionYFactor = a1->m_sectionYFactor;\n        if ( m_positionY < 10000000.0 )\n          v6 = m_sectionYFactor * m_positionY;\n        else\n          v6 = (float)(m_sectionYFactor * 10000000.0);\n      }\n      if ( v10 != m_outerSectionIndex || (int)v6 != a2->m_middleSectionIndex )\n      {\n        GJBaseGameLayer::removeObjectFromSection(a1, a2);\n        a1->addToSection(a1, a2);\n        if ( a2->m_isActivated )\n        {\n          v12 = a2->m_outerSectionIndex;\n          if ( v12 > a1->m_rightSectionIndex\n            || v12 < 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  }\n}", "assembly": "; \n; LevelEditorLayer::updateObjectSection from 0x1402df930 to 0x1402dfa60 (304 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x140586390\n; > <???> @ 0x1406d3548\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1402df930\npush    rdi                                                            ; +0x5, 0x1402df935\nsub     rsp, 20h                                                       ; +0x6, 0x1402df936\ncmp     byte ptr [rcx+3767h], 0                                        ; +0xa, 0x1402df93a\nmov     rbx, rdx                                                       ; +0x11, 0x1402df941\nmov     rdi, rcx                                                       ; +0x14, 0x1402df944\njz      short loc_1402DF959                                            ; +0x17, 0x1402df947\ncmp     dword ptr [rdx+40Ch], 718h                                     ; +0x19, 0x1402df949\njnz     loc_1402DFA55                                                  ; +0x23, 0x1402df953\nmov     eax, [rdx+278h]                                                ; +0x29, 0x1402df959\ntest    eax, eax                                                       ; +0x2f, 0x1402df95f\njs      loc_1402DFA55                                                  ; +0x31, 0x1402df961\nmovsd   xmm3, qword ptr [rdx+3B8h]                                     ; +0x37, 0x1402df967\nxorps   xmm0, xmm0                                                     ; +0x3f, 0x1402df96f\ncomisd  xmm0, xmm3                                                     ; +0x42, 0x1402df972\nmovsd   xmm4, cs:qword_1406230C8                                       ; +0x46, 0x1402df976\nmovss   xmm5, cs:dword_14062369C                                       ; +0x4e, 0x1402df97e\njb      short loc_1402DF98D                                            ; +0x56, 0x1402df986\nxorps   xmm1, xmm1                                                     ; +0x58, 0x1402df988\njmp     short loc_1402DF9AB                                            ; +0x5b, 0x1402df98b\ncomisd  xmm3, xmm4                                                     ; +0x5d, 0x1402df98d\nmovss   xmm2, dword ptr [rcx+36A0h]                                    ; +0x61, 0x1402df991\njb      short loc_1402DF9A4                                            ; +0x69, 0x1402df999\nmulss   xmm2, xmm5                                                     ; +0x6b, 0x1402df99b\ncvtps2pd xmm1, xmm2                                                    ; +0x6f, 0x1402df99f\njmp     short loc_1402DF9AB                                            ; +0x72, 0x1402df9a2\ncvtps2pd xmm1, xmm2                                                    ; +0x74, 0x1402df9a4\nmulsd   xmm1, xmm3                                                     ; +0x77, 0x1402df9a7\nmovsd   xmm2, qword ptr [rdx+3C0h]                                     ; +0x7b, 0x1402df9ab\ncomisd  xmm0, xmm2                                                     ; +0x83, 0x1402df9b3\ncvttsd2si ecx, xmm1                                                    ; +0x87, 0x1402df9b7\njnb     short loc_1402DF9DB                                            ; +0x8b, 0x1402df9bb\ncomisd  xmm2, xmm4                                                     ; +0x8d, 0x1402df9bd\nmovss   xmm1, dword ptr [rdi+36A4h]                                    ; +0x91, 0x1402df9c1\njb      short loc_1402DF9D4                                            ; +0x99, 0x1402df9c9\nmulss   xmm1, xmm5                                                     ; +0x9b, 0x1402df9cb\ncvtps2pd xmm0, xmm1                                                    ; +0x9f, 0x1402df9cf\njmp     short loc_1402DF9DB                                            ; +0xa2, 0x1402df9d2\ncvtps2pd xmm0, xmm1                                                    ; +0xa4, 0x1402df9d4\nmulsd   xmm0, xmm2                                                     ; +0xa7, 0x1402df9d7\ncmp     ecx, eax                                                       ; +0xab, 0x1402df9db\njnz     short loc_1402DF9EB                                            ; +0xad, 0x1402df9dd\ncvttsd2si eax, xmm0                                                    ; +0xaf, 0x1402df9df\ncmp     eax, [rdx+27Ch]                                                ; +0xb3, 0x1402df9e3\njz      short loc_1402DFA55                                            ; +0xb9, 0x1402df9e9\nmov     rcx, rdi                                                       ; +0xbb, 0x1402df9eb\ncall    GJBaseGameLayer__removeObjectFromSection                       ; +0xbe, 0x1402df9ee\nmov     rax, [rdi]                                                     ; +0xc3, 0x1402df9f3\nmov     rdx, rbx                                                       ; +0xc6, 0x1402df9f6\nmov     rcx, rdi                                                       ; +0xc9, 0x1402df9f9\ncall    qword ptr [rax+478h]                                           ; +0xcc, 0x1402df9fc\ncmp     byte ptr [rbx+305h], 0                                         ; +0xd2, 0x1402dfa02\njz      short loc_1402DFA55                                            ; +0xd9, 0x1402dfa09\nmov     eax, [rbx+278h]                                                ; +0xdb, 0x1402dfa0b\ncmp     eax, [rdi+3090h]                                               ; +0xe1, 0x1402dfa11\njg      short loc_1402DFA37                                            ; +0xe7, 0x1402dfa17\ncmp     eax, [rdi+308Ch]                                               ; +0xe9, 0x1402dfa19\njl      short loc_1402DFA37                                            ; +0xef, 0x1402dfa1f\nmov     eax, [rbx+27Ch]                                                ; +0xf1, 0x1402dfa21\ncmp     eax, [rdi+3098h]                                               ; +0xf7, 0x1402dfa27\njg      short loc_1402DFA37                                            ; +0xfd, 0x1402dfa2d\ncmp     eax, [rdi+3094h]                                               ; +0xff, 0x1402dfa2f\njge     short loc_1402DFA55                                            ; +0x105, 0x1402dfa35\nmov     r8d, [rbx+39Ch]                                                ; +0x107, 0x1402dfa37\nmov     rdx, rbx                                                       ; +0x10e, 0x1402dfa3e\nmov     rcx, [rdi+1030h]                                               ; +0x111, 0x1402dfa41\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0x118, 0x1402dfa48\nmov     byte ptr [rbx+3EEh], 1                                         ; +0x11e, 0x1402dfa4e\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x125, 0x1402dfa55\nadd     rsp, 20h                                                       ; +0x12a, 0x1402dfa5a\npop     rdi                                                            ; +0x12e, 0x1402dfa5e\nretn                                                                   ; +0x12f, 0x1402dfa5f", "xrefs": ["<???> @ 0x140586390", "<???> @ 0x1406d3548"], "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"}