{"type": "func", "start": 6442861088, "end": 6442861649, "name": "cocos2d::CCParticleFlower::initWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleFlower::initWithTotalParticles from 0x180064220 to 0x180064451 (561 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCParticleFlower::createWithTotalParticles @ 0x1800634a7\n// > cocos2d::CCParticleFlower::createWithTotalParticles @ 0x180063496\n// > <???> @ 0x1800fc6f8\n// > <???> @ 0x180139bcc\n// > <???> @ 0x180139bdc\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b3a08\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::CCParticleFlower::initWithTotalParticles(cocos2d::CCParticleFlower *this, unsigned int a2)\n{\n  cocos2d::CCParticleFlower_vtbl *v3; // rax\n  cocos2d::CCParticleFlower_vtbl *v4; // rbx\n  float *v5; // rax\n  cocos2d::CCDirector *v6; // rax\n  cocos2d::CCParticleFlower_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::CCParticleFlower *, _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::CCParticleFlower *, float *))v4->setGravity)(this, v5);\n  ((void (__fastcall *)(cocos2d::CCParticleFlower *))this->setSpeed)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleFlower *))this->setSpeedVar)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleFlower *))this->setRadialAccel)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleFlower *))this->setRadialAccelVar)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleFlower *))this->setTangentialAccel)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleFlower *))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::CCParticleFlower *, float *))v7->setPosition_0)(this, v8);\n  ((void (__fastcall *)(cocos2d::CCParticleFlower *, 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 = 30.0;\n  this->m_fStartSizeVar = 10.0;\n  this->m_fEndSize = -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_fEmissionRate = (float)m_uTotalParticles * 0.25;\n  *(_QWORD *)&this->m_tStartColorVar.a = 1056964608;\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::CCParticleFlower *, __int64))this->setBlendAdditive)(this, v11);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCParticleFlower::initWithTotalParticles from 0x180064220 to 0x180064451 (561 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCParticleFlower::createWithTotalParticles @ 0x1800634a7\n; > cocos2d::CCParticleFlower::createWithTotalParticles @ 0x180063496\n; > <???> @ 0x1800fc6f8\n; > <???> @ 0x180139bcc\n; > <???> @ 0x180139bdc\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b3a08\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, 0x180064220\nsub     rsp, 20h                                                       ; +0x2, 0x180064222\nxor     r8d, r8d; bool                                                 ; +0x6, 0x180064226\nmov     rdi, rcx                                                       ; +0x9, 0x180064229\ncall    ?initWithTotalParticles@CCParticleSystemQuad@cocos2d@@UEAA_NI_N@Z; cocos2d::CCParticleSystemQuad::initWithTotalParticles(uint,bool) ; +0xc, 0x18006422c\ntest    al, al                                                         ; +0x11, 0x180064231\njz      loc_180064449                                                  ; +0x13, 0x180064233\nmov     rax, [rdi]                                                     ; +0x19, 0x180064239\nxor     edx, edx                                                       ; +0x1c, 0x18006423c\nmov     rcx, rdi                                                       ; +0x1e, 0x18006423e\nmov     [rsp+28h+arg_0], rbx                                           ; +0x21, 0x180064241\nmov     dword ptr [rdi+1D4h], 0BF800000h                               ; +0x26, 0x180064246\ncall    qword ptr [rax+608h]                                           ; +0x30, 0x180064250\nmov     rbx, [rdi]                                                     ; +0x36, 0x180064256\nlea     rcx, [rsp+28h+arg_18]                                          ; +0x39, 0x180064259\nxorps   xmm2, xmm2                                                     ; +0x3e, 0x18006425e\nxorps   xmm1, xmm1                                                     ; +0x41, 0x180064261\ncall    kmVec2Fill                                                     ; +0x44, 0x180064264\nmov     rdx, rax                                                       ; +0x49, 0x180064269\nmov     rcx, rdi                                                       ; +0x4c, 0x18006426c\ncall    qword ptr [rbx+400h]                                           ; +0x4f, 0x18006426f\nmov     rax, [rdi]                                                     ; +0x55, 0x180064275\nmov     rcx, rdi                                                       ; +0x58, 0x180064278\nmovss   xmm1, cs:dword_1800FEDF8                                       ; +0x5b, 0x18006427b\ncall    qword ptr [rax+410h]                                           ; +0x63, 0x180064283\nmov     rax, [rdi]                                                     ; +0x69, 0x180064289\nmov     rcx, rdi                                                       ; +0x6c, 0x18006428c\nmovss   xmm1, cs:dword_1800E8440                                       ; +0x6f, 0x18006428f\ncall    qword ptr [rax+420h]                                           ; +0x77, 0x180064297\nmov     rax, [rdi]                                                     ; +0x7d, 0x18006429d\nmov     rcx, rdi                                                       ; +0x80, 0x1800642a0\nmovss   xmm1, cs:dword_1800F9840                                       ; +0x83, 0x1800642a3\ncall    qword ptr [rax+450h]                                           ; +0x8b, 0x1800642ab\nmov     rax, [rdi]                                                     ; +0x91, 0x1800642b1\nxorps   xmm1, xmm1                                                     ; +0x94, 0x1800642b4\nmov     rcx, rdi                                                       ; +0x97, 0x1800642b7\ncall    qword ptr [rax+460h]                                           ; +0x9a, 0x1800642ba\nmov     rax, [rdi]                                                     ; +0xa0, 0x1800642c0\nmov     rcx, rdi                                                       ; +0xa3, 0x1800642c3\nmovss   xmm1, cs:dword_1800FEDDC                                       ; +0xa6, 0x1800642c6\ncall    qword ptr [rax+430h]                                           ; +0xae, 0x1800642ce\nmov     rax, [rdi]                                                     ; +0xb4, 0x1800642d4\nxorps   xmm1, xmm1                                                     ; +0xb7, 0x1800642d7\nmov     rcx, rdi                                                       ; +0xba, 0x1800642da\ncall    qword ptr [rax+440h]                                           ; +0xbd, 0x1800642dd\nmov     dword ptr [rdi+1F0h], 42B40000h                                ; +0xc3, 0x1800642e3\nmov     dword ptr [rdi+1F4h], 43B40000h                                ; +0xcd, 0x1800642ed\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xd7, 0x1800642f7\nmov     rcx, rax                                                       ; +0xdc, 0x1800642fc\nlea     rdx, [rsp+28h+arg_10]                                          ; +0xdf, 0x1800642ff\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xe4, 0x180064304\nmovss   xmm2, [rsp+28h+arg_14]                                         ; +0xe9, 0x180064309\nlea     rcx, [rsp+28h+arg_18]                                          ; +0xef, 0x18006430f\nmovss   xmm1, [rsp+28h+arg_10]                                         ; +0xf4, 0x180064314\nmulss   xmm2, cs:dword_1800E6308                                       ; +0xfa, 0x18006431a\nmov     rbx, [rdi]                                                     ; +0x102, 0x180064322\nmulss   xmm1, cs:dword_1800E6308                                       ; +0x105, 0x180064325\ncall    kmVec2Fill                                                     ; +0x10d, 0x18006432d\nmov     rdx, rax                                                       ; +0x112, 0x180064332\nmov     rcx, rdi                                                       ; +0x115, 0x180064335\ncall    qword ptr [rbx+0B8h]                                           ; +0x118, 0x180064338\nmov     rax, [rdi]                                                     ; +0x11e, 0x18006433e\nlea     rdx, unk_1801A8408                                             ; +0x121, 0x180064341\nmov     rcx, rdi                                                       ; +0x128, 0x180064348\ncall    qword ptr [rax+3A8h]                                           ; +0x12b, 0x18006434b\nmov     eax, [rdi+298h]                                                ; +0x131, 0x180064351\nxorps   xmm0, xmm0                                                     ; +0x137, 0x180064357\nmov     dword ptr [rdi+1E8h], 40800000h                                ; +0x13a, 0x18006435a\nmov     dword ptr [rdi+1ECh], 3F800000h                                ; +0x144, 0x180064364\nmov     dword ptr [rdi+234h], 41F00000h                                ; +0x14e, 0x18006436e\ncvtsi2ss xmm0, rax                                                     ; +0x158, 0x180064378\nxor     eax, eax                                                       ; +0x15d, 0x18006437d\nmov     dword ptr [rdi+238h], 41200000h                                ; +0x15f, 0x18006437f\nmov     dword ptr [rdi+23Ch], 0BF800000h                               ; +0x169, 0x180064389\nmov     dword ptr [rdi+244h], 3F000000h                                ; +0x173, 0x180064393\nmov     dword ptr [rdi+248h], 3F000000h                                ; +0x17d, 0x18006439d\nmov     dword ptr [rdi+24Ch], 3F000000h                                ; +0x187, 0x1800643a7\nmov     dword ptr [rdi+250h], 3F800000h                                ; +0x191, 0x1800643b1\nmulss   xmm0, cs:dword_1800E83F4                                       ; +0x19b, 0x1800643bb\nmov     dword ptr [rdi+254h], 3F000000h                                ; +0x1a3, 0x1800643c3\nmov     dword ptr [rdi+258h], 3F000000h                                ; +0x1ad, 0x1800643cd\nmov     dword ptr [rdi+25Ch], 3F000000h                                ; +0x1b7, 0x1800643d7\nmovss   dword ptr [rdi+294h], xmm0                                     ; +0x1c1, 0x1800643e1\nmov     qword ptr [rdi+260h], 3F000000h                                ; +0x1c9, 0x1800643e9\nmov     [rdi+268h], rax                                                ; +0x1d4, 0x1800643f4\nmov     qword ptr [rdi+270h], 3F800000h                                ; +0x1db, 0x1800643fb\nmov     [rdi+278h], rax                                                ; +0x1e6, 0x180064406\nmov     [rdi+280h], eax                                                ; +0x1ed, 0x18006440d\ncall    sub_180063AC0                                                  ; +0x1f3, 0x180064413\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1f8, 0x180064418\ntest    rax, rax                                                       ; +0x1fd, 0x18006441d\njz      short loc_180064433                                            ; +0x200, 0x180064420\nlea     rcx, [rdi+140h]                                                ; +0x202, 0x180064422\nmov     rdx, rax                                                       ; +0x209, 0x180064429\nmov     r8, [rcx]                                                      ; +0x20c, 0x18006442c\ncall    qword ptr [r8+18h]                                             ; +0x20f, 0x18006442f\nmov     rax, [rdi]                                                     ; +0x213, 0x180064433\nmov     dl, 1                                                          ; +0x216, 0x180064436\nmov     rcx, rdi                                                       ; +0x218, 0x180064438\ncall    qword ptr [rax+4E8h]                                           ; +0x21b, 0x18006443b\nmov     al, 1                                                          ; +0x221, 0x180064441\nadd     rsp, 20h                                                       ; +0x223, 0x180064443\npop     rdi                                                            ; +0x227, 0x180064447\nretn                                                                   ; +0x228, 0x180064448\nxor     al, al                                                         ; +0x229, 0x180064449\nadd     rsp, 20h                                                       ; +0x22b, 0x18006444b\npop     rdi                                                            ; +0x22f, 0x18006444f\nretn                                                                   ; +0x230, 0x180064450", "xrefs": ["cocos2d::CCParticleFlower::createWithTotalParticles @ 0x1800634a7", "cocos2d::CCParticleFlower::createWithTotalParticles @ 0x180063496", "<???> @ 0x1800fc6f8", "<???> @ 0x180139bcc", "<???> @ 0x180139bdc", "<???> @ 0x1801438a8", "<???> @ 0x1801b3a08"], "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"}