{"type": "func", "start": 5370969936, "end": 5370970215, "name": "GJBaseGameLayer::updateObjectSection", "pseudocode": "// \n// GJBaseGameLayer::updateObjectSection from 0x140227f50 to 0x140228067 (279 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x140567038\n// > <???> @ 0x1405c9c20\n// > <???> @ 0x1406cd950\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; // 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  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}", "assembly": "; \n; GJBaseGameLayer::updateObjectSection from 0x140227f50 to 0x140228067 (279 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x140567038\n; > <???> @ 0x1405c9c20\n; > <???> @ 0x1406cd950\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, 0x140227f50\npush    rdi                                                            ; +0x5, 0x140227f55\nsub     rsp, 20h                                                       ; +0x6, 0x140227f56\nmov     eax, [rdx+278h]                                                ; +0xa, 0x140227f5a\nmov     rbx, rdx                                                       ; +0x10, 0x140227f60\nmov     rdi, rcx                                                       ; +0x13, 0x140227f63\ntest    eax, eax                                                       ; +0x16, 0x140227f66\njs      loc_14022805C                                                  ; +0x18, 0x140227f68\nmovsd   xmm3, qword ptr [rdx+3B8h]                                     ; +0x1e, 0x140227f6e\nxorps   xmm0, xmm0                                                     ; +0x26, 0x140227f76\ncomisd  xmm0, xmm3                                                     ; +0x29, 0x140227f79\nmovsd   xmm4, cs:qword_1406230C8                                       ; +0x2d, 0x140227f7d\nmovss   xmm5, cs:dword_14062369C                                       ; +0x35, 0x140227f85\njb      short loc_140227F94                                            ; +0x3d, 0x140227f8d\nxorps   xmm1, xmm1                                                     ; +0x3f, 0x140227f8f\njmp     short loc_140227FB2                                            ; +0x42, 0x140227f92\ncomisd  xmm3, xmm4                                                     ; +0x44, 0x140227f94\nmovss   xmm2, dword ptr [rcx+36A0h]                                    ; +0x48, 0x140227f98\njb      short loc_140227FAB                                            ; +0x50, 0x140227fa0\nmulss   xmm2, xmm5                                                     ; +0x52, 0x140227fa2\ncvtps2pd xmm1, xmm2                                                    ; +0x56, 0x140227fa6\njmp     short loc_140227FB2                                            ; +0x59, 0x140227fa9\ncvtps2pd xmm1, xmm2                                                    ; +0x5b, 0x140227fab\nmulsd   xmm1, xmm3                                                     ; +0x5e, 0x140227fae\nmovsd   xmm2, qword ptr [rdx+3C0h]                                     ; +0x62, 0x140227fb2\ncomisd  xmm0, xmm2                                                     ; +0x6a, 0x140227fba\ncvttsd2si ecx, xmm1                                                    ; +0x6e, 0x140227fbe\njnb     short loc_140227FE2                                            ; +0x72, 0x140227fc2\ncomisd  xmm2, xmm4                                                     ; +0x74, 0x140227fc4\nmovss   xmm1, dword ptr [rdi+36A4h]                                    ; +0x78, 0x140227fc8\njb      short loc_140227FDB                                            ; +0x80, 0x140227fd0\nmulss   xmm1, xmm5                                                     ; +0x82, 0x140227fd2\ncvtps2pd xmm0, xmm1                                                    ; +0x86, 0x140227fd6\njmp     short loc_140227FE2                                            ; +0x89, 0x140227fd9\ncvtps2pd xmm0, xmm1                                                    ; +0x8b, 0x140227fdb\nmulsd   xmm0, xmm2                                                     ; +0x8e, 0x140227fde\ncmp     ecx, eax                                                       ; +0x92, 0x140227fe2\njnz     short loc_140227FF2                                            ; +0x94, 0x140227fe4\ncvttsd2si eax, xmm0                                                    ; +0x96, 0x140227fe6\ncmp     eax, [rdx+27Ch]                                                ; +0x9a, 0x140227fea\njz      short loc_14022805C                                            ; +0xa0, 0x140227ff0\nmov     rcx, rdi                                                       ; +0xa2, 0x140227ff2\ncall    GJBaseGameLayer__removeObjectFromSection                       ; +0xa5, 0x140227ff5\nmov     rax, [rdi]                                                     ; +0xaa, 0x140227ffa\nmov     rdx, rbx                                                       ; +0xad, 0x140227ffd\nmov     rcx, rdi                                                       ; +0xb0, 0x140228000\ncall    qword ptr [rax+478h]                                           ; +0xb3, 0x140228003\ncmp     byte ptr [rbx+305h], 0                                         ; +0xb9, 0x140228009\njz      short loc_14022805C                                            ; +0xc0, 0x140228010\nmov     eax, [rbx+278h]                                                ; +0xc2, 0x140228012\ncmp     eax, [rdi+3090h]                                               ; +0xc8, 0x140228018\njg      short loc_14022803E                                            ; +0xce, 0x14022801e\ncmp     eax, [rdi+308Ch]                                               ; +0xd0, 0x140228020\njl      short loc_14022803E                                            ; +0xd6, 0x140228026\nmov     eax, [rbx+27Ch]                                                ; +0xd8, 0x140228028\ncmp     eax, [rdi+3098h]                                               ; +0xde, 0x14022802e\njg      short loc_14022803E                                            ; +0xe4, 0x140228034\ncmp     eax, [rdi+3094h]                                               ; +0xe6, 0x140228036\njge     short loc_14022805C                                            ; +0xec, 0x14022803c\nmov     r8d, [rbx+39Ch]                                                ; +0xee, 0x14022803e\nmov     rdx, rbx                                                       ; +0xf5, 0x140228045\nmov     rcx, [rdi+1030h]                                               ; +0xf8, 0x140228048\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0xff, 0x14022804f\nmov     byte ptr [rbx+3EEh], 1                                         ; +0x105, 0x140228055\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x10c, 0x14022805c\nadd     rsp, 20h                                                       ; +0x111, 0x140228061\npop     rdi                                                            ; +0x115, 0x140228065\nretn                                                                   ; +0x116, 0x140228066", "xrefs": ["<???> @ 0x140567038", "<???> @ 0x1405c9c20", "<???> @ 0x1406cd950"], "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"}