{"type": "func", "start": 6442851056, "end": 6442851588, "name": "cocos2d::CCParticleBatchNode::reorderChild", "pseudocode": "// \n// cocos2d::CCParticleBatchNode::reorderChild from 0x180061af0 to 0x180061d04 (532 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x1800fa2c8\n// > <???> @ 0x180139978\n// > <???> @ 0x1801399c0\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b36d8\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 cocos2d::CCParticleBatchNode::reorderChild(\n        cocos2d::CCParticleBatchNode *this,\n        struct cocos2d::CCString *a2,\n        int a3)\n{\n  unsigned int v5; // ebx\n  char v6; // bp\n  char v7; // r12\n  unsigned int v8; // r14d\n  unsigned int v9; // r15d\n  unsigned int v10; // r13d\n  struct cocos2d::CCNode *v11; // r14\n  __int64 v12; // r8\n  float v13; // r14d\n  float v14; // ebp\n  int v15; // ebx\n  unsigned int v16; // eax\n  unsigned int v17; // [rsp+70h] [rbp+8h]\n  int v18; // [rsp+78h] [rbp+10h]\n\n  v5 = 0;\n  _RTDynamicCast(a2, 0, &cocos2d::CCNode `RTTI Type Descriptor', &cocos2d::CCParticleSystem `RTTI Type Descriptor', 0);\n  cocos2d::CCArray::containsObject(this->m_pChildren, a2);\n  if ( a3 != ((unsigned int (__fastcall *)(struct cocos2d::CCString *))a2->__vftable[1].acceptVisitor)(a2) )\n  {\n    if ( (unsigned int)cocos2d::CCArray::count(this->m_pChildren) > 1 )\n    {\n      v6 = 0;\n      v7 = 0;\n      v8 = 0;\n      v9 = 0;\n      v17 = 0;\n      v18 = 0;\n      v10 = cocos2d::CCArray::count(this->m_pChildren);\n      if ( v10 )\n      {\n        do\n        {\n          v11 = (struct cocos2d::CCNode *)cocos2d::CCArray::stringAtIndex(this->m_pChildren, v5);\n          if ( ((int (__fastcall *)(struct cocos2d::CCNode *))v11->getZOrder)(v11) > a3 && !v6 )\n          {\n            v9 = v5;\n            v6 = 1;\n            if ( v7 )\n            {\n              v8 = v17;\n              goto LABEL_15;\n            }\n          }\n          if ( a2 == (struct cocos2d::CCString *)v11 )\n          {\n            v17 = v5;\n            v7 = 1;\n            if ( v6 )\n            {\n              v8 = v5;\n              goto LABEL_15;\n            }\n            v18 = -1;\n          }\n          ++v5;\n        }\n        while ( v5 < v10 );\n        v8 = v17;\n        if ( v6 )\n          goto LABEL_15;\n      }\n      v9 = v10;\nLABEL_15:\n      if ( v8 != v18 + v9 )\n      {\n        cocos2d::CCObject::retain(a2);\n        LOBYTE(v12) = 1;\n        cocos2d::CCArray::removeObjectAtIndex(this->m_pChildren, v8, v12);\n        cocos2d::CCArray::insertObject(this->m_pChildren, a2);\n        cocos2d::CCObject::release(a2);\n        v13 = *(float *)&a2[5].m_uID;\n        cocos2d::CCParticleBatchNode::updateAllAtlasIndexes(this);\n        v14 = 0.0;\n        v15 = 0;\n        if ( (unsigned int)cocos2d::CCArray::count(this->m_pChildren) )\n        {\n          while ( cocos2d::CCArray::stringAtIndex(this->m_pChildren, v15) != a2 )\n          {\n            if ( ++v15 >= (unsigned int)cocos2d::CCArray::count(this->m_pChildren) )\n              goto LABEL_21;\n          }\n          v14 = *(float *)&a2[5].m_uID;\n        }\nLABEL_21:\n        v16 = ((__int64 (__fastcall *)(struct cocos2d::CCString *))a2->__vftable[20].update)(a2);\n        cocos2d::CCTextureAtlas::moveQuadsFromIndex(this->m_pTextureAtlas, LODWORD(v13), v16, LODWORD(v14));\n        ((void (__fastcall *)(struct cocos2d::CCString *))a2->__vftable[21].setTag)(a2);\n      }\n    }\n    ((void (__fastcall *)(struct cocos2d::CCString *, _QWORD))a2->__vftable[1].isEqual)(a2, (unsigned int)a3);\n  }\n}", "assembly": "; \n; cocos2d::CCParticleBatchNode::reorderChild from 0x180061af0 to 0x180061d04 (532 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x1800fa2c8\n; > <???> @ 0x180139978\n; > <???> @ 0x1801399c0\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b36d8\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_10], r8d                                              ; +0x0, 0x180061af0\npush    rbx                                                            ; +0x5, 0x180061af5\npush    rsi                                                            ; +0x6, 0x180061af6\npush    rdi                                                            ; +0x7, 0x180061af7\nsub     rsp, 50h                                                       ; +0x8, 0x180061af8\nmov     rdi, rdx                                                       ; +0xc, 0x180061afc\nlea     r9, ??_R0?AVCCParticleSystem@cocos2d@@@8; cocos2d::CCParticleSystem `RTTI Type Descriptor' ; +0xf, 0x180061aff\nmov     rsi, rcx                                                       ; +0x16, 0x180061b06\nlea     r8, ??_R0?AVCCNode@cocos2d@@@8; cocos2d::CCNode `RTTI Type Descriptor' ; +0x19, 0x180061b09\nxor     ebx, ebx                                                       ; +0x20, 0x180061b10\nmov     rcx, rdi                                                       ; +0x22, 0x180061b12\nxor     edx, edx                                                       ; +0x25, 0x180061b15\nmov     [rsp+68h+var_48], ebx                                          ; +0x27, 0x180061b17\ncall    __RTDynamicCast                                                ; +0x2b, 0x180061b1b\nmov     rcx, [rsi+0D0h]; this                                          ; +0x30, 0x180061b20\nmov     rdx, rdi; struct cocos2d::CCObject *                           ; +0x37, 0x180061b27\ncall    ?containsObject@CCArray@cocos2d@@QEBA_NPEAVCCObject@2@@Z; cocos2d::CCArray::containsObject(cocos2d::CCObject *) ; +0x3a, 0x180061b2a\nmov     rax, [rdi]                                                     ; +0x3f, 0x180061b2f\nmov     rcx, rdi                                                       ; +0x42, 0x180061b32\ncall    qword ptr [rax+60h]                                            ; +0x45, 0x180061b35\ncmp     [rsp+68h+arg_10], eax                                          ; +0x48, 0x180061b38\njz      loc_180061CFC                                                  ; +0x4f, 0x180061b3f\nmov     rcx, [rsi+0D0h]; this                                          ; +0x55, 0x180061b45\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x5c, 0x180061b4c\ncmp     eax, 1                                                         ; +0x61, 0x180061b51\njbe     loc_180061CEC                                                  ; +0x64, 0x180061b54\nmov     rcx, [rsi+0D0h]; this                                          ; +0x6a, 0x180061b5a\nmov     [rsp+68h+arg_18], rbp                                          ; +0x71, 0x180061b61\nxor     bpl, bpl                                                       ; +0x79, 0x180061b69\nmov     [rsp+68h+var_20], r12                                          ; +0x7c, 0x180061b6c\nxor     r12b, r12b                                                     ; +0x81, 0x180061b71\nmov     [rsp+68h+var_28], r13                                          ; +0x84, 0x180061b74\nmov     [rsp+68h+var_30], r14                                          ; +0x89, 0x180061b79\nmov     r14d, ebx                                                      ; +0x8e, 0x180061b7e\nmov     [rsp+68h+var_38], r15                                          ; +0x91, 0x180061b81\nmov     r15d, ebx                                                      ; +0x96, 0x180061b86\nmov     [rsp+68h+arg_0], ebx                                           ; +0x99, 0x180061b89\nmov     [rsp+68h+arg_8], ebx                                           ; +0x9d, 0x180061b8d\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xa1, 0x180061b91\nmov     r13d, eax                                                      ; +0xa6, 0x180061b96\ntest    eax, eax                                                       ; +0xa9, 0x180061b99\njz      short loc_180061BFD                                            ; +0xab, 0x180061b9b\nnop     dword ptr [rax]                                                ; +0xad, 0x180061b9d\nmov     rcx, [rsi+0D0h]; this                                          ; +0xb0, 0x180061ba0\nmov     edx, ebx; unsigned int                                         ; +0xb7, 0x180061ba7\ncall    ?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0xb9, 0x180061ba9\nmov     rcx, rax                                                       ; +0xbe, 0x180061bae\nmov     r14, rax                                                       ; +0xc1, 0x180061bb1\nmov     rdx, [rax]                                                     ; +0xc4, 0x180061bb4\ncall    qword ptr [rdx+60h]                                            ; +0xc7, 0x180061bb7\ncmp     eax, [rsp+68h+arg_10]                                          ; +0xca, 0x180061bba\njle     short loc_180061BD3                                            ; +0xd1, 0x180061bc1\ntest    bpl, bpl                                                       ; +0xd3, 0x180061bc3\njnz     short loc_180061BD3                                            ; +0xd6, 0x180061bc6\nmov     r15d, ebx                                                      ; +0xd8, 0x180061bc8\nmov     bpl, 1                                                         ; +0xdb, 0x180061bcb\ntest    r12b, r12b                                                     ; +0xde, 0x180061bce\njnz     short loc_180061C02                                            ; +0xe1, 0x180061bd1\ncmp     rdi, r14                                                       ; +0xe3, 0x180061bd3\njnz     short loc_180061BEC                                            ; +0xe6, 0x180061bd6\nmov     [rsp+68h+arg_0], ebx                                           ; +0xe8, 0x180061bd8\nmov     r12b, 1                                                        ; +0xec, 0x180061bdc\ntest    bpl, bpl                                                       ; +0xef, 0x180061bdf\njnz     short loc_180061C09                                            ; +0xf2, 0x180061be2\nmov     [rsp+68h+arg_8], 0FFFFFFFFh                                    ; +0xf4, 0x180061be4\ninc     ebx                                                            ; +0xfc, 0x180061bec\ncmp     ebx, r13d                                                      ; +0xfe, 0x180061bee\njb      short loc_180061BA0                                            ; +0x101, 0x180061bf1\nmov     r14d, [rsp+68h+arg_0]                                          ; +0x103, 0x180061bf3\ntest    bpl, bpl                                                       ; +0x108, 0x180061bf8\njnz     short loc_180061C0C                                            ; +0x10b, 0x180061bfb\nmov     r15d, r13d                                                     ; +0x10d, 0x180061bfd\njmp     short loc_180061C0C                                            ; +0x110, 0x180061c00\nmov     r14d, [rsp+68h+arg_0]                                          ; +0x112, 0x180061c02\njmp     short loc_180061C0C                                            ; +0x117, 0x180061c07\nmov     r14d, ebx                                                      ; +0x119, 0x180061c09\nadd     r15d, [rsp+68h+arg_8]                                          ; +0x11c, 0x180061c0c\nmov     r13, [rsp+68h+var_28]                                          ; +0x121, 0x180061c11\nmov     r12, [rsp+68h+var_20]                                          ; +0x126, 0x180061c16\ncmp     r14d, r15d                                                     ; +0x12b, 0x180061c1b\njz      loc_180061CDA                                                  ; +0x12e, 0x180061c1e\nmov     rcx, rdi; this                                                 ; +0x134, 0x180061c24\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x137, 0x180061c27\nmov     rcx, [rsi+0D0h]; this                                          ; +0x13c, 0x180061c2c\nmov     r8b, 1; bool                                                   ; +0x143, 0x180061c33\nmov     edx, r14d; unsigned int                                        ; +0x146, 0x180061c36\ncall    ?removeObjectAtIndex@CCArray@cocos2d@@QEAAXI_N@Z; cocos2d::CCArray::removeObjectAtIndex(uint,bool) ; +0x149, 0x180061c39\nmov     rcx, [rsi+0D0h]; this                                          ; +0x14e, 0x180061c3e\nmov     r8d, r15d; unsigned int                                        ; +0x155, 0x180061c45\nmov     rdx, rdi; struct cocos2d::CCObject *                           ; +0x158, 0x180061c48\ncall    ?insertObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@I@Z; cocos2d::CCArray::insertObject(cocos2d::CCObject *,uint) ; +0x15b, 0x180061c4b\nmov     rcx, rdi; this                                                 ; +0x160, 0x180061c50\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x163, 0x180061c53\nmov     r14d, [rdi+1C0h]                                               ; +0x168, 0x180061c58\nmov     rcx, rsi; this                                                 ; +0x16f, 0x180061c5f\ncall    ?updateAllAtlasIndexes@CCParticleBatchNode@cocos2d@@AEAAXXZ; cocos2d::CCParticleBatchNode::updateAllAtlasIndexes(void) ; +0x172, 0x180061c62\nmov     rcx, [rsi+0D0h]; this                                          ; +0x177, 0x180061c67\nxor     ebp, ebp                                                       ; +0x17e, 0x180061c6e\nmov     ebx, ebp                                                       ; +0x180, 0x180061c70\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x182, 0x180061c72\ntest    eax, eax                                                       ; +0x187, 0x180061c77\njz      short loc_180061CAD                                            ; +0x189, 0x180061c79\nnop     dword ptr [rax+rax+00h]                                        ; +0x18b, 0x180061c7b\nmov     rcx, [rsi+0D0h]; this                                          ; +0x190, 0x180061c80\nmov     edx, ebx; unsigned int                                         ; +0x197, 0x180061c87\ncall    ?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0x199, 0x180061c89\ncmp     rax, rdi                                                       ; +0x19e, 0x180061c8e\njz      short loc_180061CA7                                            ; +0x1a1, 0x180061c91\nmov     rcx, [rsi+0D0h]; this                                          ; +0x1a3, 0x180061c93\ninc     ebx                                                            ; +0x1aa, 0x180061c9a\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1ac, 0x180061c9c\ncmp     ebx, eax                                                       ; +0x1b1, 0x180061ca1\njb      short loc_180061C80                                            ; +0x1b3, 0x180061ca3\njmp     short loc_180061CAD                                            ; +0x1b5, 0x180061ca5\nmov     ebp, [rdi+1C0h]                                                ; +0x1b7, 0x180061ca7\nmov     rax, [rdi]                                                     ; +0x1bd, 0x180061cad\nmov     rcx, rdi                                                       ; +0x1c0, 0x180061cb0\ncall    qword ptr [rax+5C0h]                                           ; +0x1c3, 0x180061cb3\nmov     rcx, [rsi+148h]; this                                          ; +0x1c9, 0x180061cb9\nmov     r9d, ebp; unsigned int                                         ; +0x1d0, 0x180061cc0\nmov     r8d, eax; unsigned int                                         ; +0x1d3, 0x180061cc3\nmov     edx, r14d; unsigned int                                        ; +0x1d6, 0x180061cc6\ncall    ?moveQuadsFromIndex@CCTextureAtlas@cocos2d@@QEAAXIII@Z; cocos2d::CCTextureAtlas::moveQuadsFromIndex(uint,uint,uint) ; +0x1d9, 0x180061cc9\nmov     rax, [rdi]                                                     ; +0x1de, 0x180061cce\nmov     rcx, rdi                                                       ; +0x1e1, 0x180061cd1\ncall    qword ptr [rax+628h]                                           ; +0x1e4, 0x180061cd4\nmov     r14, [rsp+68h+var_30]                                          ; +0x1ea, 0x180061cda\nmov     rbp, [rsp+68h+arg_18]                                          ; +0x1ef, 0x180061cdf\nmov     r15, [rsp+68h+var_38]                                          ; +0x1f7, 0x180061ce7\nmov     rax, [rdi]                                                     ; +0x1fc, 0x180061cec\nmov     rcx, rdi                                                       ; +0x1ff, 0x180061cef\nmov     edx, [rsp+68h+arg_10]                                          ; +0x202, 0x180061cf2\ncall    qword ptr [rax+58h]                                            ; +0x209, 0x180061cf9\nadd     rsp, 50h                                                       ; +0x20c, 0x180061cfc\npop     rdi                                                            ; +0x210, 0x180061d00\npop     rsi                                                            ; +0x211, 0x180061d01\npop     rbx                                                            ; +0x212, 0x180061d02\nretn                                                                   ; +0x213, 0x180061d03", "xrefs": ["<???> @ 0x1800fa2c8", "<???> @ 0x180139978", "<???> @ 0x1801399c0", "<???> @ 0x1801438a8", "<???> @ 0x1801b36d8"], "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"}