{"type": "func", "start": 6442862208, "end": 6442862756, "name": "cocos2d::CCParticleMeteor::initWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleMeteor::initWithTotalParticles from 0x180064680 to 0x1800648a4 (548 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCParticleMeteor::createWithTotalParticles @ 0x180063647\n// > cocos2d::CCParticleMeteor::createWithTotalParticles @ 0x180063636\n// > <???> @ 0x1800fcd68\n// > <???> @ 0x180139bf0\n// > <???> @ 0x180139c00\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b3a50\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::CCParticleMeteor::initWithTotalParticles(cocos2d::CCParticleMeteor *this, unsigned int a2)\n{\n  cocos2d::CCParticleMeteor_vtbl *v3; // rax\n  cocos2d::CCParticleMeteor_vtbl *v4; // rbx\n  float *v5; // rax\n  cocos2d::CCDirector *v6; // rax\n  cocos2d::CCParticleMeteor_vtbl *v7; // rbx\n  float *v8; // rax\n  signed int m_uTotalParticles; // eax\n  struct cocos2d::CCTexture2D *v10; // rax\n  __int64 v11; // rdx\n  float v13; // [rsp+40h] [rbp+18h]\n  float v14; // [rsp+44h] [rbp+1Ch]\n  float v15; // [rsp+48h] [rbp+20h] BYREF\n\n  if ( !cocos2d::CCParticleSystemQuad::initWithTotalParticles(this, a2, 0) )\n    return 0;\n  v3 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  this->m_fDuration = -1.0;\n  ((void (__fastcall *)(cocos2d::CCParticleMeteor *, _QWORD))v3->setEmitterMode)(this, 0);\n  v4 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v5 = kmVec2Fill(&v15, -200.0, 200.0);\n  ((void (__fastcall *)(cocos2d::CCParticleMeteor *, float *))v4->setGravity)(this, v5);\n  ((void (__fastcall *)(cocos2d::CCParticleMeteor *))this->setSpeed)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleMeteor *))this->setSpeedVar)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleMeteor *))this->setRadialAccel)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleMeteor *))this->setRadialAccelVar)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleMeteor *))this->setTangentialAccel)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleMeteor *))this->setTangentialAccelVar)(this);\n  this->m_fAngle = 90.0;\n  this->m_fAngleVar = 360.0;\n  v6 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(v6);\n  v7 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v8 = kmVec2Fill(&v15, v13 * 0.5, v14 * 0.5);\n  ((void (__fastcall *)(cocos2d::CCParticleMeteor *, float *))v7->setPosition_0)(this, v8);\n  ((void (__fastcall *)(cocos2d::CCParticleMeteor *, void *))this->setPosVar)(this, &unk_1801A8408);\n  m_uTotalParticles = this->m_uTotalParticles;\n  this->m_fLife = 2.0;\n  this->m_fLifeVar = 1.0;\n  this->m_fStartSize = 60.0;\n  this->m_fStartSizeVar = 10.0;\n  this->m_fEndSize = -1.0;\n  this->m_tStartColor.r = 0.2;\n  this->m_tStartColor.g = 0.40000001;\n  this->m_tStartColor.b = 0.69999999;\n  *(_QWORD *)&this->m_tStartColor.a = 1065353216;\n  this->m_tStartColorVar.g = 0.0;\n  this->m_tStartColorVar.b = 0.2;\n  *(_QWORD *)&this->m_tStartColorVar.a = 1036831949;\n  this->m_fEmissionRate = (float)m_uTotalParticles * 0.5;\n  *(_QWORD *)&this->m_tEndColor.g = 0;\n  *(_QWORD *)&this->m_tEndColor.a = 1065353216;\n  *(_QWORD *)&this->m_tEndColorVar.g = 0;\n  this->m_tEndColorVar.a = 0.0;\n  v10 = sub_180063AC0();\n  if ( v10 )\n    ((void (__fastcall *)(cocos2d::CCTextureProtocol *, struct cocos2d::CCTexture2D *))this->setTexture)(\n      &this->cocos2d::CCTextureProtocol,\n      v10);\n  LOBYTE(v11) = 1;\n  ((void (__fastcall *)(cocos2d::CCParticleMeteor *, __int64))this->setBlendAdditive)(this, v11);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCParticleMeteor::initWithTotalParticles from 0x180064680 to 0x1800648a4 (548 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCParticleMeteor::createWithTotalParticles @ 0x180063647\n; > cocos2d::CCParticleMeteor::createWithTotalParticles @ 0x180063636\n; > <???> @ 0x1800fcd68\n; > <???> @ 0x180139bf0\n; > <???> @ 0x180139c00\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b3a50\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, 0x180064680\nsub     rsp, 20h                                                       ; +0x2, 0x180064682\nxor     r8d, r8d; bool                                                 ; +0x6, 0x180064686\nmov     rdi, rcx                                                       ; +0x9, 0x180064689\ncall    ?initWithTotalParticles@CCParticleSystemQuad@cocos2d@@UEAA_NI_N@Z; cocos2d::CCParticleSystemQuad::initWithTotalParticles(uint,bool) ; +0xc, 0x18006468c\ntest    al, al                                                         ; +0x11, 0x180064691\njz      loc_18006489C                                                  ; +0x13, 0x180064693\nmov     rax, [rdi]                                                     ; +0x19, 0x180064699\nxor     edx, edx                                                       ; +0x1c, 0x18006469c\nmov     rcx, rdi                                                       ; +0x1e, 0x18006469e\nmov     [rsp+28h+arg_0], rbx                                           ; +0x21, 0x1800646a1\nmov     dword ptr [rdi+1D4h], 0BF800000h                               ; +0x26, 0x1800646a6\ncall    qword ptr [rax+608h]                                           ; +0x30, 0x1800646b0\nmovss   xmm2, cs:dword_1800FEE04                                       ; +0x36, 0x1800646b6\nlea     rcx, [rsp+28h+arg_18]                                          ; +0x3e, 0x1800646be\nmovss   xmm1, cs:dword_1800FEE0C                                       ; +0x43, 0x1800646c3\nmov     rbx, [rdi]                                                     ; +0x4b, 0x1800646cb\ncall    kmVec2Fill                                                     ; +0x4e, 0x1800646ce\nmov     rdx, rax                                                       ; +0x53, 0x1800646d3\nmov     rcx, rdi                                                       ; +0x56, 0x1800646d6\ncall    qword ptr [rbx+400h]                                           ; +0x59, 0x1800646d9\nmov     rax, [rdi]                                                     ; +0x5f, 0x1800646df\nmov     rcx, rdi                                                       ; +0x62, 0x1800646e2\nmovss   xmm1, cs:dword_1800FEDDC                                       ; +0x65, 0x1800646e5\ncall    qword ptr [rax+410h]                                           ; +0x6d, 0x1800646ed\nmov     rax, [rdi]                                                     ; +0x73, 0x1800646f3\nmov     rcx, rdi                                                       ; +0x76, 0x1800646f6\nmovss   xmm1, cs:flt_1800F7238                                         ; +0x79, 0x1800646f9\ncall    qword ptr [rax+420h]                                           ; +0x81, 0x180064701\nmov     rax, [rdi]                                                     ; +0x87, 0x180064707\nxorps   xmm1, xmm1                                                     ; +0x8a, 0x18006470a\nmov     rcx, rdi                                                       ; +0x8d, 0x18006470d\ncall    qword ptr [rax+450h]                                           ; +0x90, 0x180064710\nmov     rax, [rdi]                                                     ; +0x96, 0x180064716\nxorps   xmm1, xmm1                                                     ; +0x99, 0x180064719\nmov     rcx, rdi                                                       ; +0x9c, 0x18006471c\ncall    qword ptr [rax+460h]                                           ; +0x9f, 0x18006471f\nmov     rax, [rdi]                                                     ; +0xa5, 0x180064725\nxorps   xmm1, xmm1                                                     ; +0xa8, 0x180064728\nmov     rcx, rdi                                                       ; +0xab, 0x18006472b\ncall    qword ptr [rax+430h]                                           ; +0xae, 0x18006472e\nmov     rax, [rdi]                                                     ; +0xb4, 0x180064734\nxorps   xmm1, xmm1                                                     ; +0xb7, 0x180064737\nmov     rcx, rdi                                                       ; +0xba, 0x18006473a\ncall    qword ptr [rax+440h]                                           ; +0xbd, 0x18006473d\nmov     dword ptr [rdi+1F0h], 42B40000h                                ; +0xc3, 0x180064743\nmov     dword ptr [rdi+1F4h], 43B40000h                                ; +0xcd, 0x18006474d\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xd7, 0x180064757\nmov     rcx, rax                                                       ; +0xdc, 0x18006475c\nlea     rdx, [rsp+28h+arg_10]                                          ; +0xdf, 0x18006475f\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xe4, 0x180064764\nmovss   xmm2, [rsp+28h+arg_14]                                         ; +0xe9, 0x180064769\nlea     rcx, [rsp+28h+arg_18]                                          ; +0xef, 0x18006476f\nmovss   xmm1, [rsp+28h+arg_10]                                         ; +0xf4, 0x180064774\nmulss   xmm2, cs:dword_1800E6308                                       ; +0xfa, 0x18006477a\nmov     rbx, [rdi]                                                     ; +0x102, 0x180064782\nmulss   xmm1, cs:dword_1800E6308                                       ; +0x105, 0x180064785\ncall    kmVec2Fill                                                     ; +0x10d, 0x18006478d\nmov     rdx, rax                                                       ; +0x112, 0x180064792\nmov     rcx, rdi                                                       ; +0x115, 0x180064795\ncall    qword ptr [rbx+0B8h]                                           ; +0x118, 0x180064798\nmov     rax, [rdi]                                                     ; +0x11e, 0x18006479e\nlea     rdx, unk_1801A8408                                             ; +0x121, 0x1800647a1\nmov     rcx, rdi                                                       ; +0x128, 0x1800647a8\ncall    qword ptr [rax+3A8h]                                           ; +0x12b, 0x1800647ab\nmov     eax, [rdi+298h]                                                ; +0x131, 0x1800647b1\nxorps   xmm0, xmm0                                                     ; +0x137, 0x1800647b7\nmov     dword ptr [rdi+1E8h], 40000000h                                ; +0x13a, 0x1800647ba\nmov     dword ptr [rdi+1ECh], 3F800000h                                ; +0x144, 0x1800647c4\nmov     dword ptr [rdi+234h], 42700000h                                ; +0x14e, 0x1800647ce\ncvtsi2ss xmm0, rax                                                     ; +0x158, 0x1800647d8\nxor     eax, eax                                                       ; +0x15d, 0x1800647dd\nmov     dword ptr [rdi+238h], 41200000h                                ; +0x15f, 0x1800647df\nmov     dword ptr [rdi+23Ch], 0BF800000h                               ; +0x169, 0x1800647e9\nmov     dword ptr [rdi+244h], 3E4CCCCDh                                ; +0x173, 0x1800647f3\nmov     dword ptr [rdi+248h], 3ECCCCCDh                                ; +0x17d, 0x1800647fd\nmov     dword ptr [rdi+24Ch], 3F333333h                                ; +0x187, 0x180064807\nmov     qword ptr [rdi+250h], 3F800000h                                ; +0x191, 0x180064811\nmulss   xmm0, cs:dword_1800E6308                                       ; +0x19c, 0x18006481c\nmov     [rdi+258h], eax                                                ; +0x1a4, 0x180064824\nmov     dword ptr [rdi+25Ch], 3E4CCCCDh                                ; +0x1aa, 0x18006482a\nmov     qword ptr [rdi+260h], 3DCCCCCDh                                ; +0x1b4, 0x180064834\nmovss   dword ptr [rdi+294h], xmm0                                     ; +0x1bf, 0x18006483f\nmov     [rdi+268h], rax                                                ; +0x1c7, 0x180064847\nmov     qword ptr [rdi+270h], 3F800000h                                ; +0x1ce, 0x18006484e\nmov     [rdi+278h], rax                                                ; +0x1d9, 0x180064859\nmov     [rdi+280h], eax                                                ; +0x1e0, 0x180064860\ncall    sub_180063AC0                                                  ; +0x1e6, 0x180064866\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1eb, 0x18006486b\ntest    rax, rax                                                       ; +0x1f0, 0x180064870\njz      short loc_180064886                                            ; +0x1f3, 0x180064873\nlea     rcx, [rdi+140h]                                                ; +0x1f5, 0x180064875\nmov     rdx, rax                                                       ; +0x1fc, 0x18006487c\nmov     r8, [rcx]                                                      ; +0x1ff, 0x18006487f\ncall    qword ptr [r8+18h]                                             ; +0x202, 0x180064882\nmov     rax, [rdi]                                                     ; +0x206, 0x180064886\nmov     dl, 1                                                          ; +0x209, 0x180064889\nmov     rcx, rdi                                                       ; +0x20b, 0x18006488b\ncall    qword ptr [rax+4E8h]                                           ; +0x20e, 0x18006488e\nmov     al, 1                                                          ; +0x214, 0x180064894\nadd     rsp, 20h                                                       ; +0x216, 0x180064896\npop     rdi                                                            ; +0x21a, 0x18006489a\nretn                                                                   ; +0x21b, 0x18006489b\nxor     al, al                                                         ; +0x21c, 0x18006489c\nadd     rsp, 20h                                                       ; +0x21e, 0x18006489e\npop     rdi                                                            ; +0x222, 0x1800648a2\nretn                                                                   ; +0x223, 0x1800648a3", "xrefs": ["cocos2d::CCParticleMeteor::createWithTotalParticles @ 0x180063647", "cocos2d::CCParticleMeteor::createWithTotalParticles @ 0x180063636", "<???> @ 0x1800fcd68", "<???> @ 0x180139bf0", "<???> @ 0x180139c00", "<???> @ 0x1801438a8", "<???> @ 0x1801b3a50"], "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"}