{"type": "func", "start": 6442857120, "end": 6442857322, "name": "cocos2d::CCParticleFire::createWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleFire::createWithTotalParticles from 0x1800632a0 to 0x18006336a (202 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b3918\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::CCParticleFire *__fastcall cocos2d::CCParticleFire::createWithTotalParticles(unsigned int a1)\n{\n  cocos2d::CCParticleSystemQuad *v2; // rax\n  cocos2d::CCParticleFire *v3; // rbx\n  bool (__stdcall *initWithTotalParticles_0)(cocos2d::CCParticleFire *__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::CCParticleFire *)v2;\n  if ( v2 )\n  {\n    cocos2d::CCParticleSystemQuad::CCParticleSystemQuad(v2);\n    v3->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::CCParticleFire_vtbl *)&cocos2d::CCParticleFire::`vftable'{for `cocos2d::CCNode'};\n    v3->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)&cocos2d::CCParticleFire::`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::CCParticleFire::initWithTotalParticles )\n      v5 = cocos2d::CCParticleFire::initWithTotalParticles(v3, a1);\n    else\n      v5 = ((__int64 (__fastcall *)(cocos2d::CCParticleFire *, _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->~CCParticleFire;\n    if ( v7 == sub_180062350 )\n    {\n      sub_180062350(v3, 1);\n      return nullptr;\n    }\n    v7(v3, 1);\n    return nullptr;\n  }\n  return v3;\n}", "assembly": "; \n; cocos2d::CCParticleFire::createWithTotalParticles from 0x1800632a0 to 0x18006336a (202 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b3918\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, 0x1800632a0\npush    rdi                                                            ; +0x5, 0x1800632a5\nsub     rsp, 20h                                                       ; +0x6, 0x1800632a6\nmov     edi, ecx                                                       ; +0xa, 0x1800632aa\nmov     ecx, 348h; Size                                                ; +0xc, 0x1800632ac\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x11, 0x1800632b1\nmov     rbx, rax                                                       ; +0x16, 0x1800632b6\nmov     [rsp+28h+arg_8], rax                                           ; +0x19, 0x1800632b9\ntest    rax, rax                                                       ; +0x1e, 0x1800632be\njz      short loc_1800632E5                                            ; +0x21, 0x1800632c1\nmov     rcx, rax; this                                                 ; +0x23, 0x1800632c3\ncall    ??0CCParticleSystemQuad@cocos2d@@QEAA@XZ; cocos2d::CCParticleSystemQuad::CCParticleSystemQuad(void) ; +0x26, 0x1800632c6\nlea     rax, ??_7CCParticleFire@cocos2d@@6BCCNode@1@@; const cocos2d::CCParticleFire::`vftable'{for `cocos2d::CCNode'} ; +0x2b, 0x1800632cb\nmov     [rbx], rax                                                     ; +0x32, 0x1800632d2\nlea     rax, ??_7CCParticleFire@cocos2d@@6BCCTextureProtocol@1@@; const cocos2d::CCParticleFire::`vftable'{for `cocos2d::CCTextureProtocol'} ; +0x35, 0x1800632d5\nmov     [rbx+140h], rax                                                ; +0x3c, 0x1800632dc\njmp     short loc_1800632E7                                            ; +0x43, 0x1800632e3\nxor     ebx, ebx                                                       ; +0x45, 0x1800632e5\ntest    rbx, rbx                                                       ; +0x47, 0x1800632e7\njz      short loc_18006335C                                            ; +0x4a, 0x1800632ea\nmov     rax, [rbx]                                                     ; +0x4c, 0x1800632ec\nmov     r8, [rax+638h]                                                 ; +0x4f, 0x1800632ef\nlea     rax, ?initWithTotalParticles@CCParticleFire@cocos2d@@UEAA_NI@Z; cocos2d::CCParticleFire::initWithTotalParticles(uint) ; +0x56, 0x1800632f6\nmov     edx, edi; unsigned int                                         ; +0x5d, 0x1800632fd\nmov     rcx, rbx; this                                                 ; +0x5f, 0x1800632ff\ncmp     r8, rax                                                        ; +0x62, 0x180063302\njnz     short loc_18006330E                                            ; +0x65, 0x180063305\ncall    ?initWithTotalParticles@CCParticleFire@cocos2d@@UEAA_NI@Z; cocos2d::CCParticleFire::initWithTotalParticles(uint) ; +0x67, 0x180063307\njmp     short loc_180063311                                            ; +0x6c, 0x18006330c\ncall    r8                                                             ; +0x6e, 0x18006330e\nmov     rcx, rbx; Block                                                ; +0x71, 0x180063311\ntest    al, al                                                         ; +0x74, 0x180063314\njz      short loc_18006332B                                            ; +0x76, 0x180063316\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x78, 0x180063318\nmov     rax, rbx                                                       ; +0x7d, 0x18006331d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x80, 0x180063320\nadd     rsp, 20h                                                       ; +0x85, 0x180063325\npop     rdi                                                            ; +0x89, 0x180063329\nretn                                                                   ; +0x8a, 0x18006332a\nmov     rax, [rbx]                                                     ; +0x8b, 0x18006332b\nmov     r8, [rax+8]                                                    ; +0x8e, 0x18006332e\nlea     rax, sub_180062350                                             ; +0x92, 0x180063332\nmov     edx, 1                                                         ; +0x99, 0x180063339\ncmp     r8, rax                                                        ; +0x9e, 0x18006333e\njnz     short loc_180063357                                            ; +0xa1, 0x180063341\ncall    sub_180062350                                                  ; +0xa3, 0x180063343\nxor     ebx, ebx                                                       ; +0xa8, 0x180063348\nmov     eax, ebx                                                       ; +0xaa, 0x18006334a\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xac, 0x18006334c\nadd     rsp, 20h                                                       ; +0xb1, 0x180063351\npop     rdi                                                            ; +0xb5, 0x180063355\nretn                                                                   ; +0xb6, 0x180063356\ncall    r8                                                             ; +0xb7, 0x180063357\nxor     ebx, ebx                                                       ; +0xba, 0x18006335a\nmov     rax, rbx                                                       ; +0xbc, 0x18006335c\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xbf, 0x18006335f\nadd     rsp, 20h                                                       ; +0xc4, 0x180063364\npop     rdi                                                            ; +0xc8, 0x180063368\nretn                                                                   ; +0xc9, 0x180063369", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b3918"], "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"}