{"type": "func", "start": 6442858944, "end": 6442859146, "name": "cocos2d::CCParticleBatchNode::getCurrentIndex", "pseudocode": "// \n// cocos2d::CCParticleBatchNode::getCurrentIndex from 0x1800639c0 to 0x180063a8a (202 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bd990\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::getCurrentIndex(\n        cocos2d::CCArray **this,\n        unsigned int *a2,\n        unsigned int *a3,\n        struct cocos2d::CCNode *a4,\n        int a5)\n{\n  cocos2d::CCArray **v5; // r14\n  char v8; // r15\n  char v9; // si\n  int v10; // ebp\n  unsigned int v11; // r12d\n  unsigned int v12; // ebx\n  struct cocos2d::CCNode *v13; // r14\n\n  v5 = this;\n  v8 = 0;\n  v9 = 0;\n  v10 = 0;\n  v11 = cocos2d::CCArray::count(*(this + 26));\n  v12 = 0;\n  if ( v11 )\n  {\n    while ( 1 )\n    {\n      v13 = cocos2d::CCArray::stringAtIndex(v5[26], v12);\n      if ( (*(int (__fastcall **)(struct cocos2d::CCNode *))(*(_QWORD *)v13 + 96LL))(v13) > a5 && !v9 )\n      {\n        *a3 = v12;\n        v9 = 1;\n        if ( v8 )\n          break;\n      }\n      if ( a4 == v13 )\n      {\n        *a2 = v12;\n        v8 = 1;\n        if ( v9 )\n          break;\n        v10 = -1;\n      }\n      if ( ++v12 >= v11 )\n      {\n        if ( v9 )\n          break;\n        goto LABEL_11;\n      }\n      v5 = this;\n    }\n  }\n  else\n  {\nLABEL_11:\n    *a3 = v11;\n  }\n  *a3 += v10;\n}", "assembly": "; \n; cocos2d::CCParticleBatchNode::getCurrentIndex from 0x1800639c0 to 0x180063a8a (202 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bd990\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_8], rbx                                               ; +0x0, 0x1800639c0\nmov     [rsp+arg_18], r9                                               ; +0x5, 0x1800639c5\nmov     [rsp+arg_0], rcx                                               ; +0xa, 0x1800639ca\npush    rbp                                                            ; +0xf, 0x1800639cf\npush    rsi                                                            ; +0x10, 0x1800639d0\npush    rdi                                                            ; +0x11, 0x1800639d1\npush    r12                                                            ; +0x12, 0x1800639d2\npush    r13                                                            ; +0x14, 0x1800639d4\npush    r14                                                            ; +0x16, 0x1800639d6\npush    r15                                                            ; +0x18, 0x1800639d8\nsub     rsp, 20h                                                       ; +0x1a, 0x1800639da\nmov     r14, rcx                                                       ; +0x1e, 0x1800639de\nmov     rdi, r8                                                        ; +0x21, 0x1800639e1\nmov     rcx, [rcx+0D0h]; this                                          ; +0x24, 0x1800639e4\nmov     r13, rdx                                                       ; +0x2b, 0x1800639eb\nxor     r15b, r15b                                                     ; +0x2e, 0x1800639ee\nxor     sil, sil                                                       ; +0x31, 0x1800639f1\nxor     ebp, ebp                                                       ; +0x34, 0x1800639f4\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x36, 0x1800639f6\nmov     r12d, eax                                                      ; +0x3b, 0x1800639fb\nmov     ebx, ebp                                                       ; +0x3e, 0x1800639fe\ntest    eax, eax                                                       ; +0x40, 0x180063a00\njz      short loc_180063A70                                            ; +0x42, 0x180063a02\nnop     dword ptr [rax+00h]                                            ; +0x44, 0x180063a04\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x48, 0x180063a08\nmov     rcx, [r14+0D0h]; this                                          ; +0x50, 0x180063a10\nmov     edx, ebx; unsigned int                                         ; +0x57, 0x180063a17\ncall    ?stringAtIndex@CCArray@cocos2d@@QEAAPEAVCCString@2@I@Z; cocos2d::CCArray::stringAtIndex(uint) ; +0x59, 0x180063a19\nmov     r14, rax                                                       ; +0x5e, 0x180063a1e\nmov     rcx, [rax]                                                     ; +0x61, 0x180063a21\nmov     rdx, [rcx+60h]                                                 ; +0x64, 0x180063a24\nmov     rcx, rax                                                       ; +0x68, 0x180063a28\ncall    rdx                                                            ; +0x6b, 0x180063a2b\ncmp     eax, [rsp+58h+arg_20]                                          ; +0x6d, 0x180063a2d\njle     short loc_180063A45                                            ; +0x74, 0x180063a34\ntest    sil, sil                                                       ; +0x76, 0x180063a36\njnz     short loc_180063A45                                            ; +0x79, 0x180063a39\nmov     [rdi], ebx                                                     ; +0x7b, 0x180063a3b\nmov     sil, 1                                                         ; +0x7d, 0x180063a3d\ntest    r15b, r15b                                                     ; +0x80, 0x180063a40\njnz     short loc_180063A73                                            ; +0x83, 0x180063a43\ncmp     [rsp+58h+arg_18], r14                                          ; +0x85, 0x180063a45\njnz     short loc_180063A5D                                            ; +0x8a, 0x180063a4a\nmov     [r13+0], ebx                                                   ; +0x8c, 0x180063a4c\nmov     r15b, 1                                                        ; +0x90, 0x180063a50\ntest    sil, sil                                                       ; +0x93, 0x180063a53\njnz     short loc_180063A73                                            ; +0x96, 0x180063a56\nmov     ebp, 0FFFFFFFFh                                                ; +0x98, 0x180063a58\ninc     ebx                                                            ; +0x9d, 0x180063a5d\ncmp     ebx, r12d                                                      ; +0x9f, 0x180063a5f\njnb     short loc_180063A6B                                            ; +0xa2, 0x180063a62\nmov     r14, [rsp+58h+arg_0]                                           ; +0xa4, 0x180063a64\njmp     short loc_180063A10                                            ; +0xa9, 0x180063a69\ntest    sil, sil                                                       ; +0xab, 0x180063a6b\njnz     short loc_180063A73                                            ; +0xae, 0x180063a6e\nmov     [rdi], r12d                                                    ; +0xb0, 0x180063a70\nadd     [rdi], ebp                                                     ; +0xb3, 0x180063a73\nmov     rbx, [rsp+58h+arg_8]                                           ; +0xb5, 0x180063a75\nadd     rsp, 20h                                                       ; +0xba, 0x180063a7a\npop     r15                                                            ; +0xbe, 0x180063a7e\npop     r14                                                            ; +0xc0, 0x180063a80\npop     r13                                                            ; +0xc2, 0x180063a82\npop     r12                                                            ; +0xc4, 0x180063a84\npop     rdi                                                            ; +0xc6, 0x180063a86\npop     rsi                                                            ; +0xc7, 0x180063a87\npop     rbp                                                            ; +0xc8, 0x180063a88\nretn                                                                   ; +0xc9, 0x180063a89", "xrefs": ["<???> @ 0x18014cf68", "<???> @ 0x1801bd990"], "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"}