{"type": "func", "start": 6442858992, "end": 6442859194, "name": "cocos2d::CCParticleSun::createWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleSun::createWithTotalParticles from 0x1800639f0 to 0x180063aba (202 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b3984\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::CCParticleSun *__fastcall cocos2d::CCParticleSun::createWithTotalParticles(unsigned int a1)\n{\n  cocos2d::CCParticleSystemQuad *v2; // rax\n  cocos2d::CCParticleSun *v3; // rbx\n  bool (__stdcall *initWithTotalParticles_0)(cocos2d::CCParticleSun *__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::CCParticleSun *)v2;\n  if ( v2 )\n  {\n    cocos2d::CCParticleSystemQuad::CCParticleSystemQuad(v2);\n    v3->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::CCParticleSun_vtbl *)&cocos2d::CCParticleSun::`vftable'{for `cocos2d::CCNode'};\n    v3->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)&cocos2d::CCParticleSun::`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::CCParticleSun::initWithTotalParticles )\n      v5 = cocos2d::CCParticleSun::initWithTotalParticles(v3, a1);\n    else\n      v5 = ((__int64 (__fastcall *)(cocos2d::CCParticleSun *, _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->~CCParticleSun;\n    if ( v7 == sub_1800628F0 )\n    {\n      sub_1800628F0(v3, 1);\n      return nullptr;\n    }\n    v7(v3, 1);\n    return nullptr;\n  }\n  return v3;\n}", "assembly": "; \n; cocos2d::CCParticleSun::createWithTotalParticles from 0x1800639f0 to 0x180063aba (202 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b3984\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, 0x1800639f0\npush    rdi                                                            ; +0x5, 0x1800639f5\nsub     rsp, 20h                                                       ; +0x6, 0x1800639f6\nmov     edi, ecx                                                       ; +0xa, 0x1800639fa\nmov     ecx, 348h; Size                                                ; +0xc, 0x1800639fc\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x11, 0x180063a01\nmov     rbx, rax                                                       ; +0x16, 0x180063a06\nmov     [rsp+28h+arg_8], rax                                           ; +0x19, 0x180063a09\ntest    rax, rax                                                       ; +0x1e, 0x180063a0e\njz      short loc_180063A35                                            ; +0x21, 0x180063a11\nmov     rcx, rax; this                                                 ; +0x23, 0x180063a13\ncall    ??0CCParticleSystemQuad@cocos2d@@QEAA@XZ; cocos2d::CCParticleSystemQuad::CCParticleSystemQuad(void) ; +0x26, 0x180063a16\nlea     rax, ??_7CCParticleSun@cocos2d@@6BCCNode@1@@; const cocos2d::CCParticleSun::`vftable'{for `cocos2d::CCNode'} ; +0x2b, 0x180063a1b\nmov     [rbx], rax                                                     ; +0x32, 0x180063a22\nlea     rax, ??_7CCParticleSun@cocos2d@@6BCCTextureProtocol@1@@; const cocos2d::CCParticleSun::`vftable'{for `cocos2d::CCTextureProtocol'} ; +0x35, 0x180063a25\nmov     [rbx+140h], rax                                                ; +0x3c, 0x180063a2c\njmp     short loc_180063A37                                            ; +0x43, 0x180063a33\nxor     ebx, ebx                                                       ; +0x45, 0x180063a35\ntest    rbx, rbx                                                       ; +0x47, 0x180063a37\njz      short loc_180063AAC                                            ; +0x4a, 0x180063a3a\nmov     rax, [rbx]                                                     ; +0x4c, 0x180063a3c\nmov     r8, [rax+638h]                                                 ; +0x4f, 0x180063a3f\nlea     rax, ?initWithTotalParticles@CCParticleSun@cocos2d@@UEAA_NI@Z; cocos2d::CCParticleSun::initWithTotalParticles(uint) ; +0x56, 0x180063a46\nmov     edx, edi; unsigned int                                         ; +0x5d, 0x180063a4d\nmov     rcx, rbx; this                                                 ; +0x5f, 0x180063a4f\ncmp     r8, rax                                                        ; +0x62, 0x180063a52\njnz     short loc_180063A5E                                            ; +0x65, 0x180063a55\ncall    ?initWithTotalParticles@CCParticleSun@cocos2d@@UEAA_NI@Z; cocos2d::CCParticleSun::initWithTotalParticles(uint) ; +0x67, 0x180063a57\njmp     short loc_180063A61                                            ; +0x6c, 0x180063a5c\ncall    r8                                                             ; +0x6e, 0x180063a5e\nmov     rcx, rbx; Block                                                ; +0x71, 0x180063a61\ntest    al, al                                                         ; +0x74, 0x180063a64\njz      short loc_180063A7B                                            ; +0x76, 0x180063a66\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x78, 0x180063a68\nmov     rax, rbx                                                       ; +0x7d, 0x180063a6d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x80, 0x180063a70\nadd     rsp, 20h                                                       ; +0x85, 0x180063a75\npop     rdi                                                            ; +0x89, 0x180063a79\nretn                                                                   ; +0x8a, 0x180063a7a\nmov     rax, [rbx]                                                     ; +0x8b, 0x180063a7b\nmov     r8, [rax+8]                                                    ; +0x8e, 0x180063a7e\nlea     rax, sub_1800628F0                                             ; +0x92, 0x180063a82\nmov     edx, 1                                                         ; +0x99, 0x180063a89\ncmp     r8, rax                                                        ; +0x9e, 0x180063a8e\njnz     short loc_180063AA7                                            ; +0xa1, 0x180063a91\ncall    sub_1800628F0                                                  ; +0xa3, 0x180063a93\nxor     ebx, ebx                                                       ; +0xa8, 0x180063a98\nmov     eax, ebx                                                       ; +0xaa, 0x180063a9a\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xac, 0x180063a9c\nadd     rsp, 20h                                                       ; +0xb1, 0x180063aa1\npop     rdi                                                            ; +0xb5, 0x180063aa5\nretn                                                                   ; +0xb6, 0x180063aa6\ncall    r8                                                             ; +0xb7, 0x180063aa7\nxor     ebx, ebx                                                       ; +0xba, 0x180063aaa\nmov     rax, rbx                                                       ; +0xbc, 0x180063aac\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xbf, 0x180063aaf\nadd     rsp, 20h                                                       ; +0xc4, 0x180063ab4\npop     rdi                                                            ; +0xc8, 0x180063ab8\nretn                                                                   ; +0xc9, 0x180063ab9", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b3984"], "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"}