{"type": "func", "start": 5372092176, "end": 5372092551, "name": "GJBaseGameLayer::moveObjectToStaticGroup", "pseudocode": "// \n// GJBaseGameLayer::moveObjectToStaticGroup from 0x140339f10 to 0x14033a087 (375 bytes)\n// \n// 5 xrefs:\n// > GJBaseGameLayer::optimizeMoveGroups @ 0x140339d5b\n// > GJBaseGameLayer::optimizeMoveGroups @ 0x140339e53\n// > <???> @ 0x1408b70e4\n// > <???> @ 0x1408b7128\n// > <???> @ 0x14091fac0\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:30:36 +0000\n// \n\nvoid __fastcall GJBaseGameLayer::moveObjectToStaticGroup(__int64 a1, __int64 a2)\n{\n  int v4; // r13d\n  __int64 v5; // r12\n  unsigned __int64 i; // r15\n  __int64 v7; // rax\n  __int64 v8; // rbx\n  int v9; // eax\n  __int64 v10; // r14\n  struct cocos2d::CCObject *v11; // rsi\n  __int64 v12; // r14\n  struct cocos2d::CCObject *v13; // rbx\n\n  if ( *(_BYTE *)(a2 + 1298) )\n  {\n    v4 = 0;\n    *(_BYTE *)(a2 + 1298) = 0;\n    if ( *(__int16 *)(a2 + 1176) > 0 )\n    {\n      v5 = 0;\n      for ( i = 0; i <= 9; ++i )\n      {\n        v7 = *(_QWORD *)(a2 + 1168);\n        if ( !v7 )\n          break;\n        v8 = (unsigned int)*(__int16 *)(v5 + v7);\n        if ( (int)v8 > 9999 )\n          v8 = 9999;\n        if ( (int)v8 >= 0 )\n          goto LABEL_11;\n        v9 = 0;\nLABEL_12:\n        v10 = v9;\n        v11 = *(struct cocos2d::CCObject **)(*(_QWORD *)(a1 + 3920) + 8LL * v9);\n        if ( !v11 )\n        {\n          v11 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(0);\n          cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 3880), v11, v10);\n          *(_QWORD *)(*(_QWORD *)(a1 + 3920) + 8 * v10) = v11;\n        }\n        if ( (int)v8 < 0 )\n          v8 = 0;\n        v12 = (unsigned int)v8;\n        v13 = *(struct cocos2d::CCObject **)(*(_QWORD *)(a1 + 3944) + 8 * v8);\n        if ( !v13 )\n        {\n          v13 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(0);\n          cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 3888), v13, (unsigned int)v12);\n          *(_QWORD *)(*(_QWORD *)(a1 + 3944) + 8 * v12) = v13;\n        }\n        if ( !cocos2d::CCArray::containsObject(v11, (struct cocos2d::CCObject *)a2) )\n          cocos2d::CCArray::addObject(v11, (struct cocos2d::CCObject *)a2);\n        cocos2d::CCArray::removeObject(v13, (struct cocos2d::CCObject *)a2, 1);\n        ++v4;\n        v5 += 2;\n        if ( v4 >= *(__int16 *)(a2 + 1176) )\n          return;\n      }\n      v8 = 0;\nLABEL_11:\n      v9 = v8;\n      goto LABEL_12;\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::moveObjectToStaticGroup from 0x140339f10 to 0x14033a087 (375 bytes)\n; \n; 5 xrefs:\n; > GJBaseGameLayer::optimizeMoveGroups @ 0x140339d5b\n; > GJBaseGameLayer::optimizeMoveGroups @ 0x140339e53\n; > <???> @ 0x1408b70e4\n; > <???> @ 0x1408b7128\n; > <???> @ 0x14091fac0\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:30:36 +0000\n; \npush    rbp                                                            ; +0x0, 0x140339f10\npush    rdi                                                            ; +0x2, 0x140339f12\nsub     rsp, 38h                                                       ; +0x3, 0x140339f13\ncmp     byte ptr [rdx+512h], 0                                         ; +0x7, 0x140339f17\nmov     rdi, rdx                                                       ; +0xe, 0x140339f1e\nmov     rbp, rcx                                                       ; +0x11, 0x140339f21\njz      loc_14033A080                                                  ; +0x14, 0x140339f24\nxor     ecx, ecx                                                       ; +0x1a, 0x140339f2a\nmov     [rsp+48h+var_18], r13                                          ; +0x1c, 0x140339f2c\nmov     r13d, ecx                                                      ; +0x21, 0x140339f31\nmov     byte ptr [rdx+512h], 0                                         ; +0x24, 0x140339f34\ncmp     cx, [rdx+498h]                                                 ; +0x2b, 0x140339f3b\njge     loc_14033A07B                                                  ; +0x32, 0x140339f42\nmov     [rsp+48h+arg_0], rbx                                           ; +0x38, 0x140339f48\nmov     edx, 270Fh                                                     ; +0x3d, 0x140339f4d\nmov     [rsp+48h+arg_8], rsi                                           ; +0x42, 0x140339f52\nmov     [rsp+48h+arg_10], r12                                          ; +0x47, 0x140339f57\nmov     r12d, ecx                                                      ; +0x4c, 0x140339f5c\nmov     [rsp+48h+var_20], r14                                          ; +0x4f, 0x140339f5f\nmov     [rsp+48h+var_28], r15                                          ; +0x54, 0x140339f64\nmov     r15d, ecx                                                      ; +0x59, 0x140339f69\nnop     dword ptr [rax+00h]                                            ; +0x5c, 0x140339f6c\ncmp     r15, 9                                                         ; +0x60, 0x140339f70\nja      short loc_140339F94                                            ; +0x64, 0x140339f74\nmov     rax, [rdi+490h]                                                ; +0x66, 0x140339f76\ntest    rax, rax                                                       ; +0x6d, 0x140339f7d\njz      short loc_140339F94                                            ; +0x70, 0x140339f80\nmovsx   ebx, word ptr [r12+rax]                                        ; +0x72, 0x140339f82\ncmp     ebx, edx                                                       ; +0x77, 0x140339f87\ncmovg   ebx, edx                                                       ; +0x79, 0x140339f89\ntest    ebx, ebx                                                       ; +0x7c, 0x140339f8c\njns     short loc_140339F96                                            ; +0x7e, 0x140339f8e\nmov     eax, ecx                                                       ; +0x80, 0x140339f90\njmp     short loc_140339F98                                            ; +0x82, 0x140339f92\nmov     ebx, ecx                                                       ; +0x84, 0x140339f94\nmov     eax, ebx                                                       ; +0x86, 0x140339f96\nmovsxd  r14, eax                                                       ; +0x88, 0x140339f98\nmov     rax, [rbp+0F50h]                                               ; +0x8b, 0x140339f9b\nmov     rsi, [rax+r14*8]                                               ; +0x92, 0x140339fa2\ntest    rsi, rsi                                                       ; +0x96, 0x140339fa6\njnz     short loc_140339FD4                                            ; +0x99, 0x140339fa9\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x9b, 0x140339fab\nmov     rcx, [rbp+0F28h]                                               ; +0xa1, 0x140339fb1\nmov     r8, r14                                                        ; +0xa8, 0x140339fb8\nmov     rdx, rax                                                       ; +0xab, 0x140339fbb\nmov     rsi, rax                                                       ; +0xae, 0x140339fbe\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0xb1, 0x140339fc1\nmov     rcx, [rbp+0F50h]                                               ; +0xb7, 0x140339fc7\nmov     [rcx+r14*8], rsi                                               ; +0xbe, 0x140339fce\nxor     ecx, ecx                                                       ; +0xc2, 0x140339fd2\nmov     rax, [rbp+0F68h]                                               ; +0xc4, 0x140339fd4\ntest    ebx, ebx                                                       ; +0xcb, 0x140339fdb\ncmovs   ebx, ecx                                                       ; +0xcd, 0x140339fdd\nmov     r14d, ebx                                                      ; +0xd0, 0x140339fe0\nmov     rbx, [rax+rbx*8]                                               ; +0xd3, 0x140339fe3\ntest    rbx, rbx                                                       ; +0xd7, 0x140339fe7\njnz     short loc_14033A013                                            ; +0xda, 0x140339fea\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0xdc, 0x140339fec\nmov     rcx, [rbp+0F30h]                                               ; +0xe2, 0x140339ff2\nmov     r8d, r14d                                                      ; +0xe9, 0x140339ff9\nmov     rdx, rax                                                       ; +0xec, 0x140339ffc\nmov     rbx, rax                                                       ; +0xef, 0x140339fff\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0xf2, 0x14033a002\nmov     rcx, [rbp+0F68h]                                               ; +0xf8, 0x14033a008\nmov     [rcx+r14*8], rbx                                               ; +0xff, 0x14033a00f\nmov     rdx, rdi                                                       ; +0x103, 0x14033a013\nmov     rcx, rsi                                                       ; +0x106, 0x14033a016\ncall    cs:?containsObject@CCArray@cocos2d@@QEBA_NPEAVCCObject@2@@Z; cocos2d::CCArray::containsObject(cocos2d::CCObject *) ; +0x109, 0x14033a019\ntest    al, al                                                         ; +0x10f, 0x14033a01f\njnz     short loc_14033A02F                                            ; +0x111, 0x14033a021\nmov     rdx, rdi                                                       ; +0x113, 0x14033a023\nmov     rcx, rsi                                                       ; +0x116, 0x14033a026\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x119, 0x14033a029\nmov     r8b, 1                                                         ; +0x11f, 0x14033a02f\nmov     rdx, rdi                                                       ; +0x122, 0x14033a032\nmov     rcx, rbx                                                       ; +0x125, 0x14033a035\ncall    cs:?removeObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@_N@Z; cocos2d::CCArray::removeObject(cocos2d::CCObject *,bool) ; +0x128, 0x14033a038\nmovsx   eax, word ptr [rdi+498h]                                       ; +0x12e, 0x14033a03e\ninc     r13d                                                           ; +0x135, 0x14033a045\ninc     r15                                                            ; +0x138, 0x14033a048\nadd     r12, 2                                                         ; +0x13b, 0x14033a04b\nmov     ecx, 0                                                         ; +0x13f, 0x14033a04f\nmov     edx, 270Fh                                                     ; +0x144, 0x14033a054\ncmp     r13d, eax                                                      ; +0x149, 0x14033a059\njl      loc_140339F70                                                  ; +0x14c, 0x14033a05c\nmov     r15, [rsp+48h+var_28]                                          ; +0x152, 0x14033a062\nmov     r14, [rsp+48h+var_20]                                          ; +0x157, 0x14033a067\nmov     r12, [rsp+48h+arg_10]                                          ; +0x15c, 0x14033a06c\nmov     rsi, [rsp+48h+arg_8]                                           ; +0x161, 0x14033a071\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x166, 0x14033a076\nmov     r13, [rsp+48h+var_18]                                          ; +0x16b, 0x14033a07b\nadd     rsp, 38h                                                       ; +0x170, 0x14033a080\npop     rdi                                                            ; +0x174, 0x14033a084\npop     rbp                                                            ; +0x175, 0x14033a085\nretn                                                                   ; +0x176, 0x14033a086", "xrefs": ["GJBaseGameLayer::optimizeMoveGroups @ 0x140339d5b", "GJBaseGameLayer::optimizeMoveGroups @ 0x140339e53", "<???> @ 0x1408b70e4", "<???> @ 0x1408b7128", "<???> @ 0x14091fac0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}