{"type": "func", "start": 6442860304, "end": 6442860839, "name": "cocos2d::CCParticleBatchNode::reorderChild", "pseudocode": "// \n// cocos2d::CCParticleBatchNode::reorderChild from 0x180063f10 to 0x180064127 (535 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x1801007f0\n// > <???> @ 0x180142d0c\n// > <???> @ 0x180142d54\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bda2c\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:21:52 +0000\n// \n\nvoid __fastcall cocos2d::CCParticleBatchNode::reorderChild(cocos2d::CCArray **this, struct cocos2d::CCNode *a2, int a3)\n{\n  unsigned int v5; // ebx\n  char v6; // bp\n  char v7; // r12\n  int v8; // r13d\n  unsigned int v9; // r14d\n  unsigned int v10; // r15d\n  unsigned int v11; // eax\n  struct cocos2d::CCNode *v12; // r14\n  __int64 v13; // r8\n  unsigned int v14; // r14d\n  unsigned int v15; // ebp\n  unsigned int v16; // ebx\n  cocos2d::CCTextureAtlas *v17; // rbx\n  unsigned int v18; // eax\n  unsigned int v19; // [rsp+70h] [rbp+8h]\n  unsigned int v20; // [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 + 26), a2);\n  if ( a3 != (*(unsigned int (__fastcall **)(struct cocos2d::CCNode *))(*(_QWORD *)a2 + 96LL))(a2) )\n  {\n    if ( (unsigned int)cocos2d::CCArray::count(*(this + 26)) > 1 )\n    {\n      v6 = 0;\n      v7 = 0;\n      v8 = 0;\n      v9 = 0;\n      v10 = 0;\n      v19 = 0;\n      v11 = cocos2d::CCArray::count(*(this + 26));\n      v20 = v11;\n      if ( v11 )\n      {\n        do\n        {\n          v12 = cocos2d::CCArray::stringAtIndex(*(this + 26), v5);\n          if ( (*(int (__fastcall **)(struct cocos2d::CCNode *))(*(_QWORD *)v12 + 96LL))(v12) > a3 && !v6 )\n          {\n            v10 = v5;\n            v6 = 1;\n            if ( v7 )\n            {\n              v9 = v19;\n              goto LABEL_15;\n            }\n          }\n          if ( a2 == v12 )\n          {\n            v19 = v5;\n            v7 = 1;\n            if ( v6 )\n            {\n              v9 = v5;\n              goto LABEL_15;\n            }\n            v8 = -1;\n          }\n          v11 = v20;\n          ++v5;\n        }\n        while ( v5 < v20 );\n        v9 = v19;\n        if ( v6 )\n          goto LABEL_15;\n      }\n      v10 = v11;\nLABEL_15:\n      if ( v9 != v8 + v10 )\n      {\n        cocos2d::CCObject::retain(a2);\n        LOBYTE(v13) = 1;\n        cocos2d::CCArray::removeObjectAtIndex(*(this + 26), v9, v13);\n        cocos2d::CCArray::insertObject(*(this + 26), a2);\n        cocos2d::CCObject::release(a2);\n        v14 = *((_DWORD *)a2 + 112);\n        cocos2d::CCParticleBatchNode::updateAllAtlasIndexes((cocos2d::CCParticleBatchNode *)this);\n        v15 = 0;\n        v16 = 0;\n        if ( (unsigned int)cocos2d::CCArray::count(*(this + 26)) )\n        {\n          while ( cocos2d::CCArray::stringAtIndex(*(this + 26), v16) != a2 )\n          {\n            if ( ++v16 >= (unsigned int)cocos2d::CCArray::count(*(this + 26)) )\n              goto LABEL_21;\n          }\n          v15 = *((_DWORD *)a2 + 112);\n        }\nLABEL_21:\n        v17 = *(this + 41);\n        v18 = (*(__int64 (__fastcall **)(struct cocos2d::CCNode *))(*(_QWORD *)a2 + 1488LL))(a2);\n        cocos2d::CCTextureAtlas::moveQuadsFromIndex(v17, v14, v18, v15);\n        (*(void (__fastcall **)(struct cocos2d::CCNode *))(*(_QWORD *)a2 + 1592LL))(a2);\n      }\n    }\n    (*(void (__fastcall **)(struct cocos2d::CCNode *, _QWORD))(*(_QWORD *)a2 + 88LL))(a2, (unsigned int)a3);\n  }\n}", "assembly": "; \n; cocos2d::CCParticleBatchNode::reorderChild from 0x180063f10 to 0x180064127 (535 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x1801007f0\n; > <???> @ 0x180142d0c\n; > <???> @ 0x180142d54\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bda2c\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:21:52 +0000\n; \nmov     [rsp+arg_10], r8d                                              ; +0x0, 0x180063f10\npush    rbx                                                            ; +0x5, 0x180063f15\npush    rsi                                                            ; +0x6, 0x180063f16\npush    rdi                                                            ; +0x7, 0x180063f17\nsub     rsp, 50h                                                       ; +0x8, 0x180063f18\nmov     rdi, rdx                                                       ; +0xc, 0x180063f1c\nlea     r9, ??_R0?AVCCParticleSystem@cocos2d@@@8; cocos2d::CCParticleSystem `RTTI Type Descriptor' ; +0xf, 0x180063f1f\nmov     rsi, rcx                                                       ; +0x16, 0x180063f26\nlea     r8, ??_R0?AVCCNode@cocos2d@@@8; cocos2d::CCNode `RTTI Type Descriptor' ; +0x19, 0x180063f29\nxor     ebx, ebx                                                       ; +0x20, 0x180063f30\nmov     rcx, rdi                                                       ; +0x22, 0x180063f32\nxor     edx, edx                                                       ; +0x25, 0x180063f35\nmov     [rsp+68h+var_48], ebx                                          ; +0x27, 0x180063f37\ncall    __RTDynamicCast                                                ; +0x2b, 0x180063f3b\nmov     rcx, [rsi+0D0h]; this                                          ; +0x30, 0x180063f40\nmov     rdx, rdi; struct cocos2d::CCObject *                           ; +0x37, 0x180063f47\ncall    ?containsObject@CCArray@cocos2d@@QEBA_NPEAVCCObject@2@@Z; cocos2d::CCArray::containsObject(cocos2d::CCObject *) ; +0x3a, 0x180063f4a\nmov     rax, [rdi]                                                     ; +0x3f, 0x180063f4f\nmov     rcx, rdi                                                       ; +0x42, 0x180063f52\ncall    qword ptr [rax+60h]                                            ; +0x45, 0x180063f55\ncmp     [rsp+68h+arg_10], eax                                          ; +0x48, 0x180063f58\njz      loc_18006411F                                                  ; +0x4f, 0x180063f5f\nmov     rcx, [rsi+0D0h]; this                                          ; +0x55, 0x180063f65\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x5c, 0x180063f6c\ncmp     eax, 1                                                         ; +0x61, 0x180063f71\njbe     loc_18006410F                                                  ; +0x64, 0x180063f74\nmov     rcx, [rsi+0D0h]; this                                          ; +0x6a, 0x180063f7a\nmov     [rsp+68h+arg_18], rbp                                          ; +0x71, 0x180063f81\nxor     bpl, bpl                                                       ; +0x79, 0x180063f89\nmov     [rsp+68h+var_20], r12                                          ; +0x7c, 0x180063f8c\nxor     r12b, r12b                                                     ; +0x81, 0x180063f91\nmov     [rsp+68h+var_28], r13                                          ; +0x84, 0x180063f94\nmov     r13d, ebx                                                      ; +0x89, 0x180063f99\nmov     [rsp+68h+var_30], r14                                          ; +0x8c, 0x180063f9c\nmov     r14d, ebx                                                      ; +0x91, 0x180063fa1\nmov     [rsp+68h+var_38], r15                                          ; +0x94, 0x180063fa4\nmov     r15d, ebx                                                      ; +0x99, 0x180063fa9\nmov     [rsp+68h+arg_0], ebx                                           ; +0x9c, 0x180063fac\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xa0, 0x180063fb0\nmov     [rsp+68h+arg_8], eax                                           ; +0xa5, 0x180063fb5\ntest    eax, eax                                                       ; +0xa9, 0x180063fb9\njz      short loc_180064021                                            ; +0xab, 0x180063fbb\nnop     dword ptr [rax]                                                ; +0xad, 0x180063fbd\nmov     rcx, [rsi+0D0h]; this                                          ; +0xb0, 0x180063fc0\nmov     edx, ebx; unsigned int                                         ; +0xb7, 0x180063fc7\ncall    ?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0xb9, 0x180063fc9\nmov     r14, rax                                                       ; +0xbe, 0x180063fce\nmov     rcx, [rax]                                                     ; +0xc1, 0x180063fd1\nmov     rdx, [rcx+60h]                                                 ; +0xc4, 0x180063fd4\nmov     rcx, rax                                                       ; +0xc8, 0x180063fd8\ncall    rdx                                                            ; +0xcb, 0x180063fdb\ncmp     eax, [rsp+68h+arg_10]                                          ; +0xcd, 0x180063fdd\njle     short loc_180063FF6                                            ; +0xd4, 0x180063fe4\ntest    bpl, bpl                                                       ; +0xd6, 0x180063fe6\njnz     short loc_180063FF6                                            ; +0xd9, 0x180063fe9\nmov     r15d, ebx                                                      ; +0xdb, 0x180063feb\nmov     bpl, 1                                                         ; +0xde, 0x180063fee\ntest    r12b, r12b                                                     ; +0xe1, 0x180063ff1\njnz     short loc_18006402B                                            ; +0xe4, 0x180063ff4\ncmp     rdi, r14                                                       ; +0xe6, 0x180063ff6\njnz     short loc_18006400D                                            ; +0xe9, 0x180063ff9\nmov     [rsp+68h+arg_0], ebx                                           ; +0xeb, 0x180063ffb\nmov     r12b, 1                                                        ; +0xef, 0x180063fff\ntest    bpl, bpl                                                       ; +0xf2, 0x180064002\njnz     short loc_180064026                                            ; +0xf5, 0x180064005\nmov     r13d, 0FFFFFFFFh                                               ; +0xf7, 0x180064007\nmov     eax, [rsp+68h+arg_8]                                           ; +0xfd, 0x18006400d\ninc     ebx                                                            ; +0x101, 0x180064011\ncmp     ebx, eax                                                       ; +0x103, 0x180064013\njb      short loc_180063FC0                                            ; +0x105, 0x180064015\nmov     r14d, [rsp+68h+arg_0]                                          ; +0x107, 0x180064017\ntest    bpl, bpl                                                       ; +0x10c, 0x18006401c\njnz     short loc_180064030                                            ; +0x10f, 0x18006401f\nmov     r15d, eax                                                      ; +0x111, 0x180064021\njmp     short loc_180064030                                            ; +0x114, 0x180064024\nmov     r14d, ebx                                                      ; +0x116, 0x180064026\njmp     short loc_180064030                                            ; +0x119, 0x180064029\nmov     r14d, [rsp+68h+arg_0]                                          ; +0x11b, 0x18006402b\nmov     r12, [rsp+68h+var_20]                                          ; +0x120, 0x180064030\nadd     r15d, r13d                                                     ; +0x125, 0x180064035\nmov     r13, [rsp+68h+var_28]                                          ; +0x128, 0x180064038\ncmp     r14d, r15d                                                     ; +0x12d, 0x18006403d\njz      loc_1800640FD                                                  ; +0x130, 0x180064040\nmov     rcx, rdi; this                                                 ; +0x136, 0x180064046\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x139, 0x180064049\nmov     rcx, [rsi+0D0h]; this                                          ; +0x13e, 0x18006404e\nmov     r8b, 1; bool                                                   ; +0x145, 0x180064055\nmov     edx, r14d; unsigned int                                        ; +0x148, 0x180064058\ncall    ?removeObjectAtIndex@CCArray@cocos2d@@QEAAXI_N@Z; cocos2d::CCArray::removeObjectAtIndex(uint,bool) ; +0x14b, 0x18006405b\nmov     rcx, [rsi+0D0h]; this                                          ; +0x150, 0x180064060\nmov     r8d, r15d; unsigned int                                        ; +0x157, 0x180064067\nmov     rdx, rdi; struct cocos2d::CCObject *                           ; +0x15a, 0x18006406a\ncall    ?insertObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@I@Z; cocos2d::CCArray::insertObject(cocos2d::CCObject *,uint) ; +0x15d, 0x18006406d\nmov     rcx, rdi; this                                                 ; +0x162, 0x180064072\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x165, 0x180064075\nmov     r14d, [rdi+1C0h]                                               ; +0x16a, 0x18006407a\nmov     rcx, rsi; this                                                 ; +0x171, 0x180064081\ncall    ?updateAllAtlasIndexes@CCParticleBatchNode@cocos2d@@AEAAXXZ; cocos2d::CCParticleBatchNode::updateAllAtlasIndexes(void) ; +0x174, 0x180064084\nmov     rcx, [rsi+0D0h]; this                                          ; +0x179, 0x180064089\nxor     ebp, ebp                                                       ; +0x180, 0x180064090\nmov     ebx, ebp                                                       ; +0x182, 0x180064092\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x184, 0x180064094\ntest    eax, eax                                                       ; +0x189, 0x180064099\njz      short loc_1800640CD                                            ; +0x18b, 0x18006409b\nnop     dword ptr [rax]                                                ; +0x18d, 0x18006409d\nmov     rcx, [rsi+0D0h]; this                                          ; +0x190, 0x1800640a0\nmov     edx, ebx; unsigned int                                         ; +0x197, 0x1800640a7\ncall    ?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0x199, 0x1800640a9\ncmp     rax, rdi                                                       ; +0x19e, 0x1800640ae\njz      short loc_1800640C7                                            ; +0x1a1, 0x1800640b1\nmov     rcx, [rsi+0D0h]; this                                          ; +0x1a3, 0x1800640b3\ninc     ebx                                                            ; +0x1aa, 0x1800640ba\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1ac, 0x1800640bc\ncmp     ebx, eax                                                       ; +0x1b1, 0x1800640c1\njb      short loc_1800640A0                                            ; +0x1b3, 0x1800640c3\njmp     short loc_1800640CD                                            ; +0x1b5, 0x1800640c5\nmov     ebp, [rdi+1C0h]                                                ; +0x1b7, 0x1800640c7\nmov     rax, [rdi]                                                     ; +0x1bd, 0x1800640cd\nmov     rcx, rdi                                                       ; +0x1c0, 0x1800640d0\nmov     rbx, [rsi+148h]                                                ; +0x1c3, 0x1800640d3\ncall    qword ptr [rax+5D0h]                                           ; +0x1ca, 0x1800640da\nmov     r9d, ebp; unsigned int                                         ; +0x1d0, 0x1800640e0\nmov     edx, r14d; unsigned int                                        ; +0x1d3, 0x1800640e3\nmov     r8d, eax; unsigned int                                         ; +0x1d6, 0x1800640e6\nmov     rcx, rbx; this                                                 ; +0x1d9, 0x1800640e9\ncall    ?moveQuadsFromIndex@CCTextureAtlas@cocos2d@@QEAAXIII@Z; cocos2d::CCTextureAtlas::moveQuadsFromIndex(uint,uint,uint) ; +0x1dc, 0x1800640ec\nmov     rax, [rdi]                                                     ; +0x1e1, 0x1800640f1\nmov     rcx, rdi                                                       ; +0x1e4, 0x1800640f4\ncall    qword ptr [rax+638h]                                           ; +0x1e7, 0x1800640f7\nmov     r14, [rsp+68h+var_30]                                          ; +0x1ed, 0x1800640fd\nmov     rbp, [rsp+68h+arg_18]                                          ; +0x1f2, 0x180064102\nmov     r15, [rsp+68h+var_38]                                          ; +0x1fa, 0x18006410a\nmov     rax, [rdi]                                                     ; +0x1ff, 0x18006410f\nmov     rcx, rdi                                                       ; +0x202, 0x180064112\nmov     edx, [rsp+68h+arg_10]                                          ; +0x205, 0x180064115\ncall    qword ptr [rax+58h]                                            ; +0x20c, 0x18006411c\nadd     rsp, 50h                                                       ; +0x20f, 0x18006411f\npop     rdi                                                            ; +0x213, 0x180064123\npop     rsi                                                            ; +0x214, 0x180064124\npop     rbx                                                            ; +0x215, 0x180064125\nretn                                                                   ; +0x216, 0x180064126", "xrefs": ["<???> @ 0x1801007f0", "<???> @ 0x180142d0c", "<???> @ 0x180142d54", "<???> @ 0x18014cf68", "<???> @ 0x1801bda2c"], "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"}