{"type": "func", "start": 6442860576, "end": 6442861080, "name": "cocos2d::CCParticleFireworks::initWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleFireworks::initWithTotalParticles from 0x180064020 to 0x180064218 (504 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCParticleFireworks::createWithTotalParticles @ 0x1800633d7\n// > cocos2d::CCParticleFireworks::createWithTotalParticles @ 0x1800633c6\n// > <???> @ 0x1800fb3a8\n// > <???> @ 0x180139b60\n// > <???> @ 0x180139b70\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b39e4\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\nchar __fastcall cocos2d::CCParticleFireworks::initWithTotalParticles(\n        cocos2d::CCParticleFireworks *this,\n        unsigned int a2)\n{\n  float *v3; // rax\n  cocos2d::CCDirector *v4; // rax\n  cocos2d::CCParticleFireworks_vtbl *v5; // rbx\n  float *v6; // rax\n  signed int m_uTotalParticles; // eax\n  struct cocos2d::CCTexture2D *v8; // rax\n  float v10; // [rsp+40h] [rbp+18h]\n  float v11; // [rsp+44h] [rbp+1Ch]\n  float v12; // [rsp+48h] [rbp+20h] BYREF\n\n  if ( !cocos2d::CCParticleSystemQuad::initWithTotalParticles(this, a2, 0) )\n    return 0;\n  this->m_fDuration = -1.0;\n  this->m_nEmitterMode = 0;\n  v3 = kmVec2Fill(&v12, 0.0, -90.0);\n  cocos2d::CCSize::operator=(&this->modeA.gravity, v3);\n  *(_QWORD *)&this->modeA.radialAccel = 0;\n  this->modeA.speed = 180.0;\n  this->modeA.speedVar = 50.0;\n  v4 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(v4);\n  v5 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v6 = kmVec2Fill(&v12, v10 * 0.5, v11 * 0.5);\n  ((void (__fastcall *)(cocos2d::CCParticleFireworks *, float *))v5->setPosition_0)(this, v6);\n  m_uTotalParticles = this->m_uTotalParticles;\n  this->m_fAngle = 90.0;\n  this->m_fAngleVar = 20.0;\n  this->m_fLife = 3.5;\n  this->m_fLifeVar = 1.0;\n  this->m_tStartColor.r = 0.5;\n  this->m_tStartColor.g = 0.5;\n  this->m_tStartColor.b = 0.5;\n  this->m_tStartColor.a = 1.0;\n  this->m_tStartColorVar.r = 0.5;\n  this->m_tStartColorVar.g = 0.5;\n  this->m_tStartColorVar.b = 0.5;\n  this->m_tStartColorVar.a = 0.1;\n  this->m_tEndColor.r = 0.1;\n  this->m_tEndColor.g = 0.1;\n  this->m_tEndColor.b = 0.1;\n  this->m_tEndColor.a = 0.2;\n  this->m_tEndColorVar.r = 0.1;\n  this->m_tEndColorVar.g = 0.1;\n  this->m_tEndColorVar.b = 0.1;\n  this->m_tEndColorVar.a = 0.2;\n  this->m_fStartSize = 8.0;\n  this->m_fStartSizeVar = 2.0;\n  this->m_fEndSize = -1.0;\n  this->m_fEmissionRate = (float)m_uTotalParticles / 3.5;\n  v8 = sub_180063AC0();\n  if ( v8 )\n    ((void (__fastcall *)(cocos2d::CCTextureProtocol *, struct cocos2d::CCTexture2D *))this->setTexture)(\n      &this->cocos2d::CCTextureProtocol,\n      v8);\n  ((void (__fastcall *)(cocos2d::CCParticleFireworks *, _QWORD))this->setBlendAdditive)(this, 0);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCParticleFireworks::initWithTotalParticles from 0x180064020 to 0x180064218 (504 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCParticleFireworks::createWithTotalParticles @ 0x1800633d7\n; > cocos2d::CCParticleFireworks::createWithTotalParticles @ 0x1800633c6\n; > <???> @ 0x1800fb3a8\n; > <???> @ 0x180139b60\n; > <???> @ 0x180139b70\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b39e4\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\npush    rdi                                                            ; +0x0, 0x180064020\nsub     rsp, 20h                                                       ; +0x2, 0x180064022\nxor     r8d, r8d; bool                                                 ; +0x6, 0x180064026\nmov     rdi, rcx                                                       ; +0x9, 0x180064029\ncall    ?initWithTotalParticles@CCParticleSystemQuad@cocos2d@@UEAA_NI_N@Z; cocos2d::CCParticleSystemQuad::initWithTotalParticles(uint,bool) ; +0xc, 0x18006402c\ntest    al, al                                                         ; +0x11, 0x180064031\njz      loc_180064210                                                  ; +0x13, 0x180064033\nmovss   xmm2, cs:dword_1800F506C                                       ; +0x19, 0x180064039\nlea     rcx, [rsp+28h+arg_18]                                          ; +0x21, 0x180064041\nmov     [rsp+28h+arg_0], rbx                                           ; +0x26, 0x180064046\nxorps   xmm1, xmm1                                                     ; +0x2b, 0x18006404b\nxor     ebx, ebx                                                       ; +0x2e, 0x18006404e\nmov     dword ptr [rdi+1D4h], 0BF800000h                               ; +0x30, 0x180064050\nmov     [rdi+2BCh], ebx                                                ; +0x3a, 0x18006405a\ncall    kmVec2Fill                                                     ; +0x40, 0x180064060\nmov     rdx, rax                                                       ; +0x45, 0x180064065\nlea     rcx, [rdi+16Ch]                                                ; +0x48, 0x180064068\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x4f, 0x18006406f\nmov     [rdi+184h], rbx                                                ; +0x54, 0x180064074\nmov     dword ptr [rdi+174h], 43340000h                                ; +0x5b, 0x18006407b\nmov     dword ptr [rdi+178h], 42480000h                                ; +0x65, 0x180064085\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x6f, 0x18006408f\nmov     rcx, rax                                                       ; +0x74, 0x180064094\nlea     rdx, [rsp+28h+arg_10]                                          ; +0x77, 0x180064097\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x7c, 0x18006409c\nmovss   xmm2, [rsp+28h+arg_14]                                         ; +0x81, 0x1800640a1\nlea     rcx, [rsp+28h+arg_18]                                          ; +0x87, 0x1800640a7\nmovss   xmm1, [rsp+28h+arg_10]                                         ; +0x8c, 0x1800640ac\nmulss   xmm2, cs:dword_1800E6308                                       ; +0x92, 0x1800640b2\nmov     rbx, [rdi]                                                     ; +0x9a, 0x1800640ba\nmulss   xmm1, cs:dword_1800E6308                                       ; +0x9d, 0x1800640bd\ncall    kmVec2Fill                                                     ; +0xa5, 0x1800640c5\nmov     rdx, rax                                                       ; +0xaa, 0x1800640ca\nmov     rcx, rdi                                                       ; +0xad, 0x1800640cd\ncall    qword ptr [rbx+0B8h]                                           ; +0xb0, 0x1800640d0\nmov     eax, [rdi+298h]                                                ; +0xb6, 0x1800640d6\nxorps   xmm0, xmm0                                                     ; +0xbc, 0x1800640dc\nmov     dword ptr [rdi+1F0h], 42B40000h                                ; +0xbf, 0x1800640df\nmov     dword ptr [rdi+1F4h], 41A00000h                                ; +0xc9, 0x1800640e9\nmov     dword ptr [rdi+1E8h], 40600000h                                ; +0xd3, 0x1800640f3\ncvtsi2ss xmm0, rax                                                     ; +0xdd, 0x1800640fd\nmov     dword ptr [rdi+1ECh], 3F800000h                                ; +0xe2, 0x180064102\nmov     dword ptr [rdi+244h], 3F000000h                                ; +0xec, 0x18006410c\nmov     dword ptr [rdi+248h], 3F000000h                                ; +0xf6, 0x180064116\nmov     dword ptr [rdi+24Ch], 3F000000h                                ; +0x100, 0x180064120\nmov     dword ptr [rdi+250h], 3F800000h                                ; +0x10a, 0x18006412a\nmov     dword ptr [rdi+254h], 3F000000h                                ; +0x114, 0x180064134\ndivss   xmm0, cs:dword_1800FEDD8                                       ; +0x11e, 0x18006413e\nmov     dword ptr [rdi+258h], 3F000000h                                ; +0x126, 0x180064146\nmov     dword ptr [rdi+25Ch], 3F000000h                                ; +0x130, 0x180064150\nmov     dword ptr [rdi+260h], 3DCCCCCDh                                ; +0x13a, 0x18006415a\nmov     dword ptr [rdi+264h], 3DCCCCCDh                                ; +0x144, 0x180064164\nmov     dword ptr [rdi+268h], 3DCCCCCDh                                ; +0x14e, 0x18006416e\nmov     dword ptr [rdi+26Ch], 3DCCCCCDh                                ; +0x158, 0x180064178\nmov     dword ptr [rdi+270h], 3E4CCCCDh                                ; +0x162, 0x180064182\nmov     dword ptr [rdi+274h], 3DCCCCCDh                                ; +0x16c, 0x18006418c\nmov     dword ptr [rdi+278h], 3DCCCCCDh                                ; +0x176, 0x180064196\nmov     dword ptr [rdi+27Ch], 3DCCCCCDh                                ; +0x180, 0x1800641a0\nmov     dword ptr [rdi+280h], 3E4CCCCDh                                ; +0x18a, 0x1800641aa\nmov     dword ptr [rdi+234h], 41000000h                                ; +0x194, 0x1800641b4\nmov     dword ptr [rdi+238h], 40000000h                                ; +0x19e, 0x1800641be\nmov     dword ptr [rdi+23Ch], 0BF800000h                               ; +0x1a8, 0x1800641c8\nmovss   dword ptr [rdi+294h], xmm0                                     ; +0x1b2, 0x1800641d2\ncall    sub_180063AC0                                                  ; +0x1ba, 0x1800641da\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1bf, 0x1800641df\ntest    rax, rax                                                       ; +0x1c4, 0x1800641e4\njz      short loc_1800641FA                                            ; +0x1c7, 0x1800641e7\nlea     rcx, [rdi+140h]                                                ; +0x1c9, 0x1800641e9\nmov     rdx, rax                                                       ; +0x1d0, 0x1800641f0\nmov     r8, [rcx]                                                      ; +0x1d3, 0x1800641f3\ncall    qword ptr [r8+18h]                                             ; +0x1d6, 0x1800641f6\nmov     rax, [rdi]                                                     ; +0x1da, 0x1800641fa\nxor     edx, edx                                                       ; +0x1dd, 0x1800641fd\nmov     rcx, rdi                                                       ; +0x1df, 0x1800641ff\ncall    qword ptr [rax+4E8h]                                           ; +0x1e2, 0x180064202\nmov     al, 1                                                          ; +0x1e8, 0x180064208\nadd     rsp, 20h                                                       ; +0x1ea, 0x18006420a\npop     rdi                                                            ; +0x1ee, 0x18006420e\nretn                                                                   ; +0x1ef, 0x18006420f\nxor     al, al                                                         ; +0x1f0, 0x180064210\nadd     rsp, 20h                                                       ; +0x1f2, 0x180064212\npop     rdi                                                            ; +0x1f6, 0x180064216\nretn                                                                   ; +0x1f7, 0x180064217", "xrefs": ["cocos2d::CCParticleFireworks::createWithTotalParticles @ 0x1800633d7", "cocos2d::CCParticleFireworks::createWithTotalParticles @ 0x1800633c6", "<???> @ 0x1800fb3a8", "<???> @ 0x180139b60", "<???> @ 0x180139b70", "<???> @ 0x1801438a8", "<???> @ 0x1801b39e4"], "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"}