{"type": "func", "start": 6442858784, "end": 6442858986, "name": "cocos2d::CCParticleSpiral::createWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleSpiral::createWithTotalParticles from 0x180063920 to 0x1800639ea (202 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b3978\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\nstruct cocos2d::CCParticleSpiral *__fastcall cocos2d::CCParticleSpiral::createWithTotalParticles(unsigned int a1)\n{\n  cocos2d::CCParticleSystemQuad *v2; // rax\n  cocos2d::CCParticleSpiral *v3; // rbx\n  bool (__stdcall *initWithTotalParticles_0)(cocos2d::CCParticleSpiral *__hidden, unsigned int); // r8\n  char v5; // al\n  cocos2d::CCParticleSystemQuad *(__fastcall *v7)(cocos2d::CCParticleSystemQuad *, char); // r8\n\n  v2 = (cocos2d::CCParticleSystemQuad *)operator new(0x348u);\n  v3 = (cocos2d::CCParticleSpiral *)v2;\n  if ( v2 )\n  {\n    cocos2d::CCParticleSystemQuad::CCParticleSystemQuad(v2);\n    v3->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::CCParticleSpiral_vtbl *)&cocos2d::CCParticleSpiral::`vftable'{for `cocos2d::CCNode'};\n    v3->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)&cocos2d::CCParticleSpiral::`vftable'{for `cocos2d::CCTextureProtocol'};\n  }\n  else\n  {\n    v3 = nullptr;\n  }\n  if ( v3 )\n  {\n    initWithTotalParticles_0 = v3->initWithTotalParticles_0;\n    if ( (char *)initWithTotalParticles_0 == (char *)cocos2d::CCParticleSpiral::initWithTotalParticles )\n      v5 = cocos2d::CCParticleSpiral::initWithTotalParticles(v3, a1);\n    else\n      v5 = ((__int64 (__fastcall *)(cocos2d::CCParticleSpiral *, _QWORD))initWithTotalParticles_0)(v3, a1);\n    if ( v5 )\n    {\n      cocos2d::CCObject::autorelease(v3);\n      return v3;\n    }\n    v7 = (cocos2d::CCParticleSystemQuad *(__fastcall *)(cocos2d::CCParticleSystemQuad *, char))v3->~CCParticleSpiral;\n    if ( v7 == sub_180062850 )\n    {\n      sub_180062850(v3, 1);\n      return nullptr;\n    }\n    v7(v3, 1);\n    return nullptr;\n  }\n  return v3;\n}", "assembly": "; \n; cocos2d::CCParticleSpiral::createWithTotalParticles from 0x180063920 to 0x1800639ea (202 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b3978\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_0], rbx                                               ; +0x0, 0x180063920\npush    rdi                                                            ; +0x5, 0x180063925\nsub     rsp, 20h                                                       ; +0x6, 0x180063926\nmov     edi, ecx                                                       ; +0xa, 0x18006392a\nmov     ecx, 348h; Size                                                ; +0xc, 0x18006392c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x11, 0x180063931\nmov     rbx, rax                                                       ; +0x16, 0x180063936\nmov     [rsp+28h+arg_8], rax                                           ; +0x19, 0x180063939\ntest    rax, rax                                                       ; +0x1e, 0x18006393e\njz      short loc_180063965                                            ; +0x21, 0x180063941\nmov     rcx, rax; this                                                 ; +0x23, 0x180063943\ncall    ??0CCParticleSystemQuad@cocos2d@@QEAA@XZ; cocos2d::CCParticleSystemQuad::CCParticleSystemQuad(void) ; +0x26, 0x180063946\nlea     rax, ??_7CCParticleSpiral@cocos2d@@6BCCNode@1@@; const cocos2d::CCParticleSpiral::`vftable'{for `cocos2d::CCNode'} ; +0x2b, 0x18006394b\nmov     [rbx], rax                                                     ; +0x32, 0x180063952\nlea     rax, ??_7CCParticleSpiral@cocos2d@@6BCCTextureProtocol@1@@; const cocos2d::CCParticleSpiral::`vftable'{for `cocos2d::CCTextureProtocol'} ; +0x35, 0x180063955\nmov     [rbx+140h], rax                                                ; +0x3c, 0x18006395c\njmp     short loc_180063967                                            ; +0x43, 0x180063963\nxor     ebx, ebx                                                       ; +0x45, 0x180063965\ntest    rbx, rbx                                                       ; +0x47, 0x180063967\njz      short loc_1800639DC                                            ; +0x4a, 0x18006396a\nmov     rax, [rbx]                                                     ; +0x4c, 0x18006396c\nmov     r8, [rax+638h]                                                 ; +0x4f, 0x18006396f\nlea     rax, ?initWithTotalParticles@CCParticleSpiral@cocos2d@@UEAA_NI@Z; cocos2d::CCParticleSpiral::initWithTotalParticles(uint) ; +0x56, 0x180063976\nmov     edx, edi; unsigned int                                         ; +0x5d, 0x18006397d\nmov     rcx, rbx; this                                                 ; +0x5f, 0x18006397f\ncmp     r8, rax                                                        ; +0x62, 0x180063982\njnz     short loc_18006398E                                            ; +0x65, 0x180063985\ncall    ?initWithTotalParticles@CCParticleSpiral@cocos2d@@UEAA_NI@Z; cocos2d::CCParticleSpiral::initWithTotalParticles(uint) ; +0x67, 0x180063987\njmp     short loc_180063991                                            ; +0x6c, 0x18006398c\ncall    r8                                                             ; +0x6e, 0x18006398e\nmov     rcx, rbx; Block                                                ; +0x71, 0x180063991\ntest    al, al                                                         ; +0x74, 0x180063994\njz      short loc_1800639AB                                            ; +0x76, 0x180063996\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x78, 0x180063998\nmov     rax, rbx                                                       ; +0x7d, 0x18006399d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x80, 0x1800639a0\nadd     rsp, 20h                                                       ; +0x85, 0x1800639a5\npop     rdi                                                            ; +0x89, 0x1800639a9\nretn                                                                   ; +0x8a, 0x1800639aa\nmov     rax, [rbx]                                                     ; +0x8b, 0x1800639ab\nmov     r8, [rax+8]                                                    ; +0x8e, 0x1800639ae\nlea     rax, sub_180062850                                             ; +0x92, 0x1800639b2\nmov     edx, 1                                                         ; +0x99, 0x1800639b9\ncmp     r8, rax                                                        ; +0x9e, 0x1800639be\njnz     short loc_1800639D7                                            ; +0xa1, 0x1800639c1\ncall    sub_180062850                                                  ; +0xa3, 0x1800639c3\nxor     ebx, ebx                                                       ; +0xa8, 0x1800639c8\nmov     eax, ebx                                                       ; +0xaa, 0x1800639ca\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xac, 0x1800639cc\nadd     rsp, 20h                                                       ; +0xb1, 0x1800639d1\npop     rdi                                                            ; +0xb5, 0x1800639d5\nretn                                                                   ; +0xb6, 0x1800639d6\ncall    r8                                                             ; +0xb7, 0x1800639d7\nxor     ebx, ebx                                                       ; +0xba, 0x1800639da\nmov     rax, rbx                                                       ; +0xbc, 0x1800639dc\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xbf, 0x1800639df\nadd     rsp, 20h                                                       ; +0xc4, 0x1800639e4\npop     rdi                                                            ; +0xc8, 0x1800639e8\nretn                                                                   ; +0xc9, 0x1800639e9", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b3978"], "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"}