{"type": "func", "start": 4296279584, "end": 4296279938, "name": "GJBaseGameLayer::updateObjectSection", "pseudocode": "// \n// GJBaseGameLayer::updateObjectSection from 0x100140620 to 0x100140782 (354 bytes)\n// \n// 3 xrefs:\n// > LevelEditorLayer::updateObjectSection @ 0x1000f1e4a\n// > <???> @ 0x1008b7370\n// > <???> @ 0x1008c18f0\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; // eax\n  double m_positionX; // xmm1_8\n  double v4; // xmm0_8\n  int v5; // ecx\n  double m_positionY; // xmm1_8\n  float m_sectionXFactor; // xmm2_4\n  float m_sectionYFactor; // xmm0_4\n  int v9; // eax\n  int m_middleSectionIndex; // eax\n\n  m_outerSectionIndex = a2->m_outerSectionIndex;\n  if ( m_outerSectionIndex < 0 )\n    return;\n  m_positionX = a2->m_positionX;\n  v4 = 0.0;\n  if ( m_positionX <= 0.0 )\n  {\n    v5 = (int)0.0;\n    m_positionY = a2->m_positionY;\n    if ( m_positionY <= 0.0 )\n      goto LABEL_4;\nLABEL_11:\n    m_sectionYFactor = a1->m_sectionYFactor;\n    if ( m_positionY >= 10000000.0 )\n    {\n      v4 = (float)(m_sectionYFactor * 10000000.0);\n      if ( m_outerSectionIndex != v5 )\n        goto LABEL_15;\n    }\n    else\n    {\n      v4 = m_positionY * m_sectionYFactor;\n      if ( m_outerSectionIndex != v5 )\n        goto LABEL_15;\n    }\nLABEL_5:\n    if ( a2->m_middleSectionIndex == (int)v4 )\n      return;\n    goto LABEL_15;\n  }\n  m_sectionXFactor = a1->m_sectionXFactor;\n  if ( m_positionX >= 10000000.0 )\n  {\n    v5 = (int)(float)(m_sectionXFactor * 10000000.0);\n    m_positionY = a2->m_positionY;\n    if ( m_positionY > 0.0 )\n      goto LABEL_11;\n  }\n  else\n  {\n    v5 = (int)(m_positionX * m_sectionXFactor);\n    m_positionY = a2->m_positionY;\n    if ( m_positionY > 0.0 )\n      goto LABEL_11;\n  }\nLABEL_4:\n  if ( m_outerSectionIndex == v5 )\n    goto LABEL_5;\nLABEL_15:\n  GJBaseGameLayer::removeObjectFromSection(a1, a2);\n  ((void (__fastcall *)(GJBaseGameLayer *, GameObject *, double))a1->addToSection)(a1, a2, v4);\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 0x100140620 to 0x100140782 (354 bytes)\n; \n; 3 xrefs:\n; > LevelEditorLayer::updateObjectSection @ 0x1000f1e4a\n; > <???> @ 0x1008b7370\n; > <???> @ 0x1008c18f0\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     eax, [rsi+274h]                                                ; +0x0, 0x100140620\ntest    eax, eax                                                       ; +0x6, 0x100140626\njs      locret_100140781                                               ; +0x8, 0x100140628\npush    rbp                                                            ; +0xe, 0x10014062e\nmov     rbp, rsp                                                       ; +0xf, 0x10014062f\npush    r14                                                            ; +0x12, 0x100140632\npush    rbx                                                            ; +0x14, 0x100140634\nmov     rbx, rsi                                                       ; +0x15, 0x100140635\nmov     r14, rdi                                                       ; +0x18, 0x100140638\nmovsd   xmm1, qword ptr [rsi+3B0h]                                     ; +0x1b, 0x10014063b\nxorpd   xmm0, xmm0                                                     ; +0x23, 0x100140643\nucomisd xmm0, xmm1                                                     ; +0x27, 0x100140647\nxorpd   xmm2, xmm2                                                     ; +0x2b, 0x10014064b\njb      short loc_100140680                                            ; +0x2f, 0x10014064f\ncvttsd2si ecx, xmm2                                                    ; +0x31, 0x100140651\nmovsd   xmm1, qword ptr [rbx+3B8h]                                     ; +0x35, 0x100140655\nucomisd xmm0, xmm1                                                     ; +0x3d, 0x10014065d\njb      short loc_1001406D1                                            ; +0x41, 0x100140661\ncmp     eax, ecx                                                       ; +0x43, 0x100140663\njnz     loc_10014070E                                                  ; +0x45, 0x100140665\ncvttsd2si eax, xmm0                                                    ; +0x4b, 0x10014066b\ncmp     [rbx+278h], eax                                                ; +0x4f, 0x10014066f\njnz     loc_10014070E                                                  ; +0x55, 0x100140675\njmp     loc_10014077D                                                  ; +0x5b, 0x10014067b\nucomisd xmm1, cs:qword_100815D00                                       ; +0x60, 0x100140680\nmovss   xmm2, dword ptr [r14+3488h]                                    ; +0x68, 0x100140688\njnb     short loc_1001406B3                                            ; +0x71, 0x100140691\ncvtss2sd xmm2, xmm2                                                    ; +0x73, 0x100140693\nmulsd   xmm1, xmm2                                                     ; +0x77, 0x100140697\nmovapd  xmm2, xmm1                                                     ; +0x7b, 0x10014069b\ncvttsd2si ecx, xmm2                                                    ; +0x7f, 0x10014069f\nmovsd   xmm1, qword ptr [rbx+3B8h]                                     ; +0x83, 0x1001406a3\nucomisd xmm0, xmm1                                                     ; +0x8b, 0x1001406ab\njnb     short loc_100140663                                            ; +0x8f, 0x1001406af\njmp     short loc_1001406D1                                            ; +0x91, 0x1001406b1\nmulss   xmm2, cs:dword_100815D74                                       ; +0x93, 0x1001406b3\ncvtss2sd xmm2, xmm2                                                    ; +0x9b, 0x1001406bb\ncvttsd2si ecx, xmm2                                                    ; +0x9f, 0x1001406bf\nmovsd   xmm1, qword ptr [rbx+3B8h]                                     ; +0xa3, 0x1001406c3\nucomisd xmm0, xmm1                                                     ; +0xab, 0x1001406cb\njnb     short loc_100140663                                            ; +0xaf, 0x1001406cf\nucomisd xmm1, cs:qword_100815D00                                       ; +0xb1, 0x1001406d1\nmovss   xmm0, dword ptr [r14+348Ch]                                    ; +0xb9, 0x1001406d9\njnb     short loc_1001406FA                                            ; +0xc2, 0x1001406e2\ncvtss2sd xmm0, xmm0                                                    ; +0xc4, 0x1001406e4\nmulsd   xmm1, xmm0                                                     ; +0xc8, 0x1001406e8\nmovapd  xmm0, xmm1                                                     ; +0xcc, 0x1001406ec\ncmp     eax, ecx                                                       ; +0xd0, 0x1001406f0\njz      loc_10014066B                                                  ; +0xd2, 0x1001406f2\njmp     short loc_10014070E                                            ; +0xd8, 0x1001406f8\nmulss   xmm0, cs:dword_100815D74                                       ; +0xda, 0x1001406fa\ncvtss2sd xmm0, xmm0                                                    ; +0xe2, 0x100140702\ncmp     eax, ecx                                                       ; +0xe6, 0x100140706\njz      loc_10014066B                                                  ; +0xe8, 0x100140708\nmov     rdi, r14                                                       ; +0xee, 0x10014070e\nmov     rsi, rbx                                                       ; +0xf1, 0x100140711\ncall    GJBaseGameLayer__removeObjectFromSection                       ; +0xf4, 0x100140714\nmov     rax, [r14]                                                     ; +0xf9, 0x100140719\nmov     rdi, r14                                                       ; +0xfc, 0x10014071c\nmov     rsi, rbx                                                       ; +0xff, 0x10014071f\ncall    qword ptr [rax+508h]                                           ; +0x102, 0x100140722\ncmp     byte ptr [rbx+305h], 1                                         ; +0x108, 0x100140728\njnz     short loc_10014077D                                            ; +0x10f, 0x10014072f\nmov     eax, [rbx+274h]                                                ; +0x111, 0x100140731\ncmp     eax, [r14+2F28h]                                               ; +0x117, 0x100140737\njg      short loc_100140761                                            ; +0x11e, 0x10014073e\ncmp     eax, [r14+2F24h]                                               ; +0x120, 0x100140740\njl      short loc_100140761                                            ; +0x127, 0x100140747\nmov     eax, [rbx+278h]                                                ; +0x129, 0x100140749\ncmp     eax, [r14+2F30h]                                               ; +0x12f, 0x10014074f\njg      short loc_100140761                                            ; +0x136, 0x100140756\ncmp     eax, [r14+2F2Ch]                                               ; +0x138, 0x100140758\njge     short loc_10014077D                                            ; +0x13f, 0x10014075f\nmov     rdi, [r14+0F00h]                                               ; +0x141, 0x100140761\nmov     edx, [rbx+394h]                                                ; +0x148, 0x100140768\nmov     rsi, rbx                                                       ; +0x14e, 0x10014076e\ncall    cocos2d__CCDictionary__setObject                               ; +0x151, 0x100140771\nmov     byte ptr [rbx+3E6h], 1                                         ; +0x156, 0x100140776\npop     rbx                                                            ; +0x15d, 0x10014077d\npop     r14                                                            ; +0x15e, 0x10014077e\npop     rbp                                                            ; +0x160, 0x100140780\nretn                                                                   ; +0x161, 0x100140781", "xrefs": ["LevelEditorLayer::updateObjectSection @ 0x1000f1e4a", "<???> @ 0x1008b7370", "<???> @ 0x1008c18f0"], "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"}