{"type": "func", "start": 6442861664, "end": 6442862199, "name": "cocos2d::CCParticleGalaxy::initWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleGalaxy::initWithTotalParticles from 0x180064460 to 0x180064677 (535 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCParticleGalaxy::createWithTotalParticles @ 0x180063577\n// > cocos2d::CCParticleGalaxy::createWithTotalParticles @ 0x180063566\n// > <???> @ 0x1800fc088\n// > <???> @ 0x180139ba8\n// > <???> @ 0x180139bb8\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b3a2c\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::CCParticleGalaxy::initWithTotalParticles(cocos2d::CCParticleGalaxy *this, unsigned int a2)\n{\n  cocos2d::CCParticleGalaxy_vtbl *v3; // rax\n  cocos2d::CCParticleGalaxy_vtbl *v4; // rbx\n  float *v5; // rax\n  cocos2d::CCDirector *v6; // rax\n  cocos2d::CCParticleGalaxy_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::CCParticleGalaxy *, _QWORD))v3->setEmitterMode)(this, 0);\n  v4 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v5 = kmVec2Fill(&v15, 0.0, 0.0);\n  ((void (__fastcall *)(cocos2d::CCParticleGalaxy *, float *))v4->setGravity)(this, v5);\n  ((void (__fastcall *)(cocos2d::CCParticleGalaxy *))this->setSpeed)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleGalaxy *))this->setSpeedVar)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleGalaxy *))this->setRadialAccel)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleGalaxy *))this->setRadialAccelVar)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleGalaxy *))this->setTangentialAccel)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleGalaxy *))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::CCParticleGalaxy *, float *))v7->setPosition_0)(this, v8);\n  ((void (__fastcall *)(cocos2d::CCParticleGalaxy *, void *))this->setPosVar)(this, &unk_1801A8408);\n  m_uTotalParticles = this->m_uTotalParticles;\n  this->m_fLife = 4.0;\n  this->m_fLifeVar = 1.0;\n  this->m_fStartSize = 37.0;\n  this->m_fStartSizeVar = 10.0;\n  this->m_fEndSize = -1.0;\n  this->m_tStartColor.r = 0.12;\n  this->m_tStartColor.g = 0.25;\n  this->m_tStartColor.b = 0.75999999;\n  *(_QWORD *)&this->m_tStartColor.a = 1065353216;\n  *(_QWORD *)&this->m_tStartColorVar.g = 0;\n  *(_QWORD *)&this->m_tStartColorVar.a = 0;\n  *(_QWORD *)&this->m_tEndColor.g = 0;\n  this->m_fEmissionRate = (float)m_uTotalParticles * 0.25;\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::CCParticleGalaxy *, __int64))this->setBlendAdditive)(this, v11);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCParticleGalaxy::initWithTotalParticles from 0x180064460 to 0x180064677 (535 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCParticleGalaxy::createWithTotalParticles @ 0x180063577\n; > cocos2d::CCParticleGalaxy::createWithTotalParticles @ 0x180063566\n; > <???> @ 0x1800fc088\n; > <???> @ 0x180139ba8\n; > <???> @ 0x180139bb8\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b3a2c\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, 0x180064460\nsub     rsp, 20h                                                       ; +0x2, 0x180064462\nxor     r8d, r8d; bool                                                 ; +0x6, 0x180064466\nmov     rdi, rcx                                                       ; +0x9, 0x180064469\ncall    ?initWithTotalParticles@CCParticleSystemQuad@cocos2d@@UEAA_NI_N@Z; cocos2d::CCParticleSystemQuad::initWithTotalParticles(uint,bool) ; +0xc, 0x18006446c\ntest    al, al                                                         ; +0x11, 0x180064471\njz      loc_18006466F                                                  ; +0x13, 0x180064473\nmov     rax, [rdi]                                                     ; +0x19, 0x180064479\nxor     edx, edx                                                       ; +0x1c, 0x18006447c\nmov     rcx, rdi                                                       ; +0x1e, 0x18006447e\nmov     [rsp+28h+arg_0], rbx                                           ; +0x21, 0x180064481\nmov     dword ptr [rdi+1D4h], 0BF800000h                               ; +0x26, 0x180064486\ncall    qword ptr [rax+608h]                                           ; +0x30, 0x180064490\nmov     rbx, [rdi]                                                     ; +0x36, 0x180064496\nlea     rcx, [rsp+28h+arg_18]                                          ; +0x39, 0x180064499\nxorps   xmm2, xmm2                                                     ; +0x3e, 0x18006449e\nxorps   xmm1, xmm1                                                     ; +0x41, 0x1800644a1\ncall    kmVec2Fill                                                     ; +0x44, 0x1800644a4\nmov     rdx, rax                                                       ; +0x49, 0x1800644a9\nmov     rcx, rdi                                                       ; +0x4c, 0x1800644ac\ncall    qword ptr [rbx+400h]                                           ; +0x4f, 0x1800644af\nmov     rax, [rdi]                                                     ; +0x55, 0x1800644b5\nmov     rcx, rdi                                                       ; +0x58, 0x1800644b8\nmovss   xmm1, cs:dword_1800FEDF0                                       ; +0x5b, 0x1800644bb\ncall    qword ptr [rax+410h]                                           ; +0x63, 0x1800644c3\nmov     rax, [rdi]                                                     ; +0x69, 0x1800644c9\nmov     rcx, rdi                                                       ; +0x6c, 0x1800644cc\nmovss   xmm1, cs:dword_1800E8440                                       ; +0x6f, 0x1800644cf\ncall    qword ptr [rax+420h]                                           ; +0x77, 0x1800644d7\nmov     rax, [rdi]                                                     ; +0x7d, 0x1800644dd\nmov     rcx, rdi                                                       ; +0x80, 0x1800644e0\nmovss   xmm1, cs:dword_1800FEE08                                       ; +0x83, 0x1800644e3\ncall    qword ptr [rax+450h]                                           ; +0x8b, 0x1800644eb\nmov     rax, [rdi]                                                     ; +0x91, 0x1800644f1\nxorps   xmm1, xmm1                                                     ; +0x94, 0x1800644f4\nmov     rcx, rdi                                                       ; +0x97, 0x1800644f7\ncall    qword ptr [rax+460h]                                           ; +0x9a, 0x1800644fa\nmov     rax, [rdi]                                                     ; +0xa0, 0x180064500\nmov     rcx, rdi                                                       ; +0xa3, 0x180064503\nmovss   xmm1, cs:dword_1800FEDF8                                       ; +0xa6, 0x180064506\ncall    qword ptr [rax+430h]                                           ; +0xae, 0x18006450e\nmov     rax, [rdi]                                                     ; +0xb4, 0x180064514\nxorps   xmm1, xmm1                                                     ; +0xb7, 0x180064517\nmov     rcx, rdi                                                       ; +0xba, 0x18006451a\ncall    qword ptr [rax+440h]                                           ; +0xbd, 0x18006451d\nmov     dword ptr [rdi+1F0h], 42B40000h                                ; +0xc3, 0x180064523\nmov     dword ptr [rdi+1F4h], 43B40000h                                ; +0xcd, 0x18006452d\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xd7, 0x180064537\nmov     rcx, rax                                                       ; +0xdc, 0x18006453c\nlea     rdx, [rsp+28h+arg_10]                                          ; +0xdf, 0x18006453f\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xe4, 0x180064544\nmovss   xmm2, [rsp+28h+arg_14]                                         ; +0xe9, 0x180064549\nlea     rcx, [rsp+28h+arg_18]                                          ; +0xef, 0x18006454f\nmovss   xmm1, [rsp+28h+arg_10]                                         ; +0xf4, 0x180064554\nmulss   xmm2, cs:dword_1800E6308                                       ; +0xfa, 0x18006455a\nmov     rbx, [rdi]                                                     ; +0x102, 0x180064562\nmulss   xmm1, cs:dword_1800E6308                                       ; +0x105, 0x180064565\ncall    kmVec2Fill                                                     ; +0x10d, 0x18006456d\nmov     rdx, rax                                                       ; +0x112, 0x180064572\nmov     rcx, rdi                                                       ; +0x115, 0x180064575\ncall    qword ptr [rbx+0B8h]                                           ; +0x118, 0x180064578\nmov     rax, [rdi]                                                     ; +0x11e, 0x18006457e\nlea     rdx, unk_1801A8408                                             ; +0x121, 0x180064581\nmov     rcx, rdi                                                       ; +0x128, 0x180064588\ncall    qword ptr [rax+3A8h]                                           ; +0x12b, 0x18006458b\nmov     eax, [rdi+298h]                                                ; +0x131, 0x180064591\nxorps   xmm0, xmm0                                                     ; +0x137, 0x180064597\nmov     dword ptr [rdi+1E8h], 40800000h                                ; +0x13a, 0x18006459a\nmov     dword ptr [rdi+1ECh], 3F800000h                                ; +0x144, 0x1800645a4\nmov     dword ptr [rdi+234h], 42140000h                                ; +0x14e, 0x1800645ae\ncvtsi2ss xmm0, rax                                                     ; +0x158, 0x1800645b8\nxor     eax, eax                                                       ; +0x15d, 0x1800645bd\nmov     dword ptr [rdi+238h], 41200000h                                ; +0x15f, 0x1800645bf\nmov     dword ptr [rdi+23Ch], 0BF800000h                               ; +0x169, 0x1800645c9\nmov     dword ptr [rdi+244h], 3DF5C28Fh                                ; +0x173, 0x1800645d3\nmov     dword ptr [rdi+248h], 3E800000h                                ; +0x17d, 0x1800645dd\nmov     dword ptr [rdi+24Ch], 3F428F5Ch                                ; +0x187, 0x1800645e7\nmov     qword ptr [rdi+250h], 3F800000h                                ; +0x191, 0x1800645f1\nmulss   xmm0, cs:dword_1800E83F4                                       ; +0x19c, 0x1800645fc\nmov     [rdi+258h], rax                                                ; +0x1a4, 0x180064604\nmov     [rdi+260h], rax                                                ; +0x1ab, 0x18006460b\nmov     [rdi+268h], rax                                                ; +0x1b2, 0x180064612\nmovss   dword ptr [rdi+294h], xmm0                                     ; +0x1b9, 0x180064619\nmov     qword ptr [rdi+270h], 3F800000h                                ; +0x1c1, 0x180064621\nmov     [rdi+278h], rax                                                ; +0x1cc, 0x18006462c\nmov     [rdi+280h], eax                                                ; +0x1d3, 0x180064633\ncall    sub_180063AC0                                                  ; +0x1d9, 0x180064639\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1de, 0x18006463e\ntest    rax, rax                                                       ; +0x1e3, 0x180064643\njz      short loc_180064659                                            ; +0x1e6, 0x180064646\nlea     rcx, [rdi+140h]                                                ; +0x1e8, 0x180064648\nmov     rdx, rax                                                       ; +0x1ef, 0x18006464f\nmov     r8, [rcx]                                                      ; +0x1f2, 0x180064652\ncall    qword ptr [r8+18h]                                             ; +0x1f5, 0x180064655\nmov     rax, [rdi]                                                     ; +0x1f9, 0x180064659\nmov     dl, 1                                                          ; +0x1fc, 0x18006465c\nmov     rcx, rdi                                                       ; +0x1fe, 0x18006465e\ncall    qword ptr [rax+4E8h]                                           ; +0x201, 0x180064661\nmov     al, 1                                                          ; +0x207, 0x180064667\nadd     rsp, 20h                                                       ; +0x209, 0x180064669\npop     rdi                                                            ; +0x20d, 0x18006466d\nretn                                                                   ; +0x20e, 0x18006466e\nxor     al, al                                                         ; +0x20f, 0x18006466f\nadd     rsp, 20h                                                       ; +0x211, 0x180064671\npop     rdi                                                            ; +0x215, 0x180064675\nretn                                                                   ; +0x216, 0x180064676", "xrefs": ["cocos2d::CCParticleGalaxy::createWithTotalParticles @ 0x180063577", "cocos2d::CCParticleGalaxy::createWithTotalParticles @ 0x180063566", "<???> @ 0x1800fc088", "<???> @ 0x180139ba8", "<???> @ 0x180139bb8", "<???> @ 0x1801438a8", "<???> @ 0x1801b3a2c"], "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"}