{"type": "func", "start": 6442857744, "end": 6442857946, "name": "cocos2d::CCParticleGalaxy::createWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleGalaxy::createWithTotalParticles from 0x180063510 to 0x1800635da (202 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b393c\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::CCParticleGalaxy *__fastcall cocos2d::CCParticleGalaxy::createWithTotalParticles(unsigned int a1)\n{\n  cocos2d::CCParticleSystemQuad *v2; // rax\n  cocos2d::CCParticleGalaxy *v3; // rbx\n  bool (__stdcall *initWithTotalParticles_0)(cocos2d::CCParticleGalaxy *__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::CCParticleGalaxy *)v2;\n  if ( v2 )\n  {\n    cocos2d::CCParticleSystemQuad::CCParticleSystemQuad(v2);\n    v3->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::CCParticleGalaxy_vtbl *)&cocos2d::CCParticleGalaxy::`vftable'{for `cocos2d::CCNode'};\n    v3->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)&cocos2d::CCParticleGalaxy::`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::CCParticleGalaxy::initWithTotalParticles )\n      v5 = cocos2d::CCParticleGalaxy::initWithTotalParticles(v3, a1);\n    else\n      v5 = ((__int64 (__fastcall *)(cocos2d::CCParticleGalaxy *, _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->~CCParticleGalaxy;\n    if ( v7 == sub_180062530 )\n    {\n      sub_180062530(v3, 1);\n      return nullptr;\n    }\n    v7(v3, 1);\n    return nullptr;\n  }\n  return v3;\n}", "assembly": "; \n; cocos2d::CCParticleGalaxy::createWithTotalParticles from 0x180063510 to 0x1800635da (202 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b393c\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, 0x180063510\npush    rdi                                                            ; +0x5, 0x180063515\nsub     rsp, 20h                                                       ; +0x6, 0x180063516\nmov     edi, ecx                                                       ; +0xa, 0x18006351a\nmov     ecx, 348h; Size                                                ; +0xc, 0x18006351c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x11, 0x180063521\nmov     rbx, rax                                                       ; +0x16, 0x180063526\nmov     [rsp+28h+arg_8], rax                                           ; +0x19, 0x180063529\ntest    rax, rax                                                       ; +0x1e, 0x18006352e\njz      short loc_180063555                                            ; +0x21, 0x180063531\nmov     rcx, rax; this                                                 ; +0x23, 0x180063533\ncall    ??0CCParticleSystemQuad@cocos2d@@QEAA@XZ; cocos2d::CCParticleSystemQuad::CCParticleSystemQuad(void) ; +0x26, 0x180063536\nlea     rax, ??_7CCParticleGalaxy@cocos2d@@6BCCNode@1@@; const cocos2d::CCParticleGalaxy::`vftable'{for `cocos2d::CCNode'} ; +0x2b, 0x18006353b\nmov     [rbx], rax                                                     ; +0x32, 0x180063542\nlea     rax, ??_7CCParticleGalaxy@cocos2d@@6BCCTextureProtocol@1@@; const cocos2d::CCParticleGalaxy::`vftable'{for `cocos2d::CCTextureProtocol'} ; +0x35, 0x180063545\nmov     [rbx+140h], rax                                                ; +0x3c, 0x18006354c\njmp     short loc_180063557                                            ; +0x43, 0x180063553\nxor     ebx, ebx                                                       ; +0x45, 0x180063555\ntest    rbx, rbx                                                       ; +0x47, 0x180063557\njz      short loc_1800635CC                                            ; +0x4a, 0x18006355a\nmov     rax, [rbx]                                                     ; +0x4c, 0x18006355c\nmov     r8, [rax+638h]                                                 ; +0x4f, 0x18006355f\nlea     rax, ?initWithTotalParticles@CCParticleGalaxy@cocos2d@@UEAA_NI@Z; cocos2d::CCParticleGalaxy::initWithTotalParticles(uint) ; +0x56, 0x180063566\nmov     edx, edi; unsigned int                                         ; +0x5d, 0x18006356d\nmov     rcx, rbx; this                                                 ; +0x5f, 0x18006356f\ncmp     r8, rax                                                        ; +0x62, 0x180063572\njnz     short loc_18006357E                                            ; +0x65, 0x180063575\ncall    ?initWithTotalParticles@CCParticleGalaxy@cocos2d@@UEAA_NI@Z; cocos2d::CCParticleGalaxy::initWithTotalParticles(uint) ; +0x67, 0x180063577\njmp     short loc_180063581                                            ; +0x6c, 0x18006357c\ncall    r8                                                             ; +0x6e, 0x18006357e\nmov     rcx, rbx; Block                                                ; +0x71, 0x180063581\ntest    al, al                                                         ; +0x74, 0x180063584\njz      short loc_18006359B                                            ; +0x76, 0x180063586\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x78, 0x180063588\nmov     rax, rbx                                                       ; +0x7d, 0x18006358d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x80, 0x180063590\nadd     rsp, 20h                                                       ; +0x85, 0x180063595\npop     rdi                                                            ; +0x89, 0x180063599\nretn                                                                   ; +0x8a, 0x18006359a\nmov     rax, [rbx]                                                     ; +0x8b, 0x18006359b\nmov     r8, [rax+8]                                                    ; +0x8e, 0x18006359e\nlea     rax, sub_180062530                                             ; +0x92, 0x1800635a2\nmov     edx, 1                                                         ; +0x99, 0x1800635a9\ncmp     r8, rax                                                        ; +0x9e, 0x1800635ae\njnz     short loc_1800635C7                                            ; +0xa1, 0x1800635b1\ncall    sub_180062530                                                  ; +0xa3, 0x1800635b3\nxor     ebx, ebx                                                       ; +0xa8, 0x1800635b8\nmov     eax, ebx                                                       ; +0xaa, 0x1800635ba\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xac, 0x1800635bc\nadd     rsp, 20h                                                       ; +0xb1, 0x1800635c1\npop     rdi                                                            ; +0xb5, 0x1800635c5\nretn                                                                   ; +0xb6, 0x1800635c6\ncall    r8                                                             ; +0xb7, 0x1800635c7\nxor     ebx, ebx                                                       ; +0xba, 0x1800635ca\nmov     rax, rbx                                                       ; +0xbc, 0x1800635cc\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xbf, 0x1800635cf\nadd     rsp, 20h                                                       ; +0xc4, 0x1800635d4\npop     rdi                                                            ; +0xc8, 0x1800635d8\nretn                                                                   ; +0xc9, 0x1800635d9", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b393c"], "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"}