{"type": "func", "start": 6442867408, "end": 6442867610, "name": "cocos2d::CCParticleRain::createWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleRain::createWithTotalParticles from 0x180065ad0 to 0x180065b9a (202 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bdca8\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\nstruct cocos2d::CCParticleRain *__fastcall cocos2d::CCParticleRain::createWithTotalParticles(unsigned int a1)\n{\n  cocos2d::CCParticleSystemQuad *v2; // rax\n  cocos2d::CCParticleRain *v3; // rbx\n  bool (__fastcall *v4)(cocos2d::CCParticleRain *__hidden, unsigned int); // r8\n  bool v5; // al\n  cocos2d::CCParticleSystemQuad *(__fastcall *v7)(cocos2d::CCParticleSystemQuad *, char); // r8\n\n  v2 = (cocos2d::CCParticleSystemQuad *)sub_1800E4AC0(0x348u);\n  v3 = v2;\n  if ( v2 )\n  {\n    cocos2d::CCParticleSystemQuad::CCParticleSystemQuad(v2);\n    *(_QWORD *)v3 = &cocos2d::CCParticleRain::`vftable'{for `cocos2d::CCNode'};\n    *((_QWORD *)v3 + 40) = &cocos2d::CCParticleRain::`vftable'{for `cocos2d::CCTextureProtocol'};\n  }\n  else\n  {\n    v3 = nullptr;\n  }\n  if ( v3 )\n  {\n    v4 = *(bool (__fastcall **)(cocos2d::CCParticleRain *__hidden, unsigned int))(*(_QWORD *)v3 + 1608LL);\n    if ( v4 == cocos2d::CCParticleRain::initWithTotalParticles )\n      v5 = cocos2d::CCParticleRain::initWithTotalParticles(v3, a1);\n    else\n      v5 = v4(v3, a1);\n    if ( v5 )\n    {\n      cocos2d::CCObject::autorelease(v3);\n      return v3;\n    }\n    v7 = *(cocos2d::CCParticleSystemQuad *(__fastcall **)(cocos2d::CCParticleSystemQuad *, char))(*(_QWORD *)v3 + 8LL);\n    if ( v7 == sub_180064A90 )\n    {\n      sub_180064A90(v3, 1);\n      return nullptr;\n    }\n    v7(v3, 1);\n    return nullptr;\n  }\n  return v3;\n}", "assembly": "; \n; cocos2d::CCParticleRain::createWithTotalParticles from 0x180065ad0 to 0x180065b9a (202 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bdca8\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_0], rbx                                               ; +0x0, 0x180065ad0\npush    rdi                                                            ; +0x5, 0x180065ad5\nsub     rsp, 20h                                                       ; +0x6, 0x180065ad6\nmov     edi, ecx                                                       ; +0xa, 0x180065ada\nmov     ecx, 348h; Size                                                ; +0xc, 0x180065adc\ncall    sub_1800E4AC0                                                  ; +0x11, 0x180065ae1\nmov     rbx, rax                                                       ; +0x16, 0x180065ae6\nmov     [rsp+28h+arg_8], rax                                           ; +0x19, 0x180065ae9\ntest    rax, rax                                                       ; +0x1e, 0x180065aee\njz      short loc_180065B15                                            ; +0x21, 0x180065af1\nmov     rcx, rax; this                                                 ; +0x23, 0x180065af3\ncall    ??0CCParticleSystemQuad@cocos2d@@QEAA@XZ; cocos2d::CCParticleSystemQuad::CCParticleSystemQuad(void) ; +0x26, 0x180065af6\nlea     rax, ??_7CCParticleRain@cocos2d@@6BCCNode@1@@; const cocos2d::CCParticleRain::`vftable'{for `cocos2d::CCNode'} ; +0x2b, 0x180065afb\nmov     [rbx], rax                                                     ; +0x32, 0x180065b02\nlea     rax, ??_7CCParticleRain@cocos2d@@6BCCTextureProtocol@1@@; const cocos2d::CCParticleRain::`vftable'{for `cocos2d::CCTextureProtocol'} ; +0x35, 0x180065b05\nmov     [rbx+140h], rax                                                ; +0x3c, 0x180065b0c\njmp     short loc_180065B17                                            ; +0x43, 0x180065b13\nxor     ebx, ebx                                                       ; +0x45, 0x180065b15\ntest    rbx, rbx                                                       ; +0x47, 0x180065b17\njz      short loc_180065B8C                                            ; +0x4a, 0x180065b1a\nmov     rax, [rbx]                                                     ; +0x4c, 0x180065b1c\nmov     r8, [rax+648h]                                                 ; +0x4f, 0x180065b1f\nlea     rax, ?initWithTotalParticles@CCParticleRain@cocos2d@@UEAA_NI@Z; cocos2d::CCParticleRain::initWithTotalParticles(uint) ; +0x56, 0x180065b26\nmov     edx, edi; unsigned int                                         ; +0x5d, 0x180065b2d\nmov     rcx, rbx; this                                                 ; +0x5f, 0x180065b2f\ncmp     r8, rax                                                        ; +0x62, 0x180065b32\njnz     short loc_180065B3E                                            ; +0x65, 0x180065b35\ncall    ?initWithTotalParticles@CCParticleRain@cocos2d@@UEAA_NI@Z; cocos2d::CCParticleRain::initWithTotalParticles(uint) ; +0x67, 0x180065b37\njmp     short loc_180065B41                                            ; +0x6c, 0x180065b3c\ncall    r8                                                             ; +0x6e, 0x180065b3e\nmov     rcx, rbx; Block                                                ; +0x71, 0x180065b41\ntest    al, al                                                         ; +0x74, 0x180065b44\njz      short loc_180065B5B                                            ; +0x76, 0x180065b46\ncall    ?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x78, 0x180065b48\nmov     rax, rbx                                                       ; +0x7d, 0x180065b4d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x80, 0x180065b50\nadd     rsp, 20h                                                       ; +0x85, 0x180065b55\npop     rdi                                                            ; +0x89, 0x180065b59\nretn                                                                   ; +0x8a, 0x180065b5a\nmov     rax, [rbx]                                                     ; +0x8b, 0x180065b5b\nmov     r8, [rax+8]                                                    ; +0x8e, 0x180065b5e\nlea     rax, sub_180064A90                                             ; +0x92, 0x180065b62\nmov     edx, 1                                                         ; +0x99, 0x180065b69\ncmp     r8, rax                                                        ; +0x9e, 0x180065b6e\njnz     short loc_180065B87                                            ; +0xa1, 0x180065b71\ncall    sub_180064A90                                                  ; +0xa3, 0x180065b73\nxor     ebx, ebx                                                       ; +0xa8, 0x180065b78\nmov     eax, ebx                                                       ; +0xaa, 0x180065b7a\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xac, 0x180065b7c\nadd     rsp, 20h                                                       ; +0xb1, 0x180065b81\npop     rdi                                                            ; +0xb5, 0x180065b85\nretn                                                                   ; +0xb6, 0x180065b86\ncall    r8                                                             ; +0xb7, 0x180065b87\nxor     ebx, ebx                                                       ; +0xba, 0x180065b8a\nmov     rax, rbx                                                       ; +0xbc, 0x180065b8c\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xbf, 0x180065b8f\nadd     rsp, 20h                                                       ; +0xc4, 0x180065b94\npop     rdi                                                            ; +0xc8, 0x180065b98\nretn                                                                   ; +0xc9, 0x180065b99", "xrefs": ["<???> @ 0x18014cf68", "<???> @ 0x1801bdca8"], "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"}