{"type": "func", "start": 6442864416, "end": 6442864983, "name": "cocos2d::CCParticleSpiral::initWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleSpiral::initWithTotalParticles from 0x180064f20 to 0x180065157 (567 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCParticleSpiral::createWithTotalParticles @ 0x180063987\n// > cocos2d::CCParticleSpiral::createWithTotalParticles @ 0x180063976\n// > <???> @ 0x1800fd3d8\n// > <???> @ 0x180139c18\n// > <???> @ 0x180139c28\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b3ae0\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::CCParticleSpiral::initWithTotalParticles(cocos2d::CCParticleSpiral *this, unsigned int a2)\n{\n  cocos2d::CCParticleSpiral_vtbl *v3; // rax\n  cocos2d::CCParticleSpiral_vtbl *v4; // rbx\n  float *v5; // rax\n  cocos2d::CCDirector *v6; // rax\n  cocos2d::CCParticleSpiral_vtbl *v7; // rbx\n  float *v8; // rax\n  signed int m_uTotalParticles; // eax\n  struct cocos2d::CCTexture2D *v10; // rax\n  float v12; // [rsp+40h] [rbp+18h]\n  float v13; // [rsp+44h] [rbp+1Ch]\n  float v14; // [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::CCParticleSpiral *, _QWORD))v3->setEmitterMode)(this, 0);\n  v4 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v5 = kmVec2Fill(&v14, 0.0, 0.0);\n  ((void (__fastcall *)(cocos2d::CCParticleSpiral *, float *))v4->setGravity)(this, v5);\n  ((void (__fastcall *)(cocos2d::CCParticleSpiral *))this->setSpeed)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleSpiral *))this->setSpeedVar)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleSpiral *))this->setRadialAccel)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleSpiral *))this->setRadialAccelVar)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleSpiral *))this->setTangentialAccel)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleSpiral *))this->setTangentialAccelVar)(this);\n  *(_QWORD *)&this->m_fAngle = 1119092736;\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(&v14, v12 * 0.5, v13 * 0.5);\n  ((void (__fastcall *)(cocos2d::CCParticleSpiral *, float *))v7->setPosition_0)(this, v8);\n  ((void (__fastcall *)(cocos2d::CCParticleSpiral *, void *))this->setPosVar)(this, &unk_1801A8408);\n  m_uTotalParticles = this->m_uTotalParticles;\n  *(_QWORD *)&this->m_fLife = 1094713344;\n  *(_QWORD *)&this->m_fStartSize = 1101004800;\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  *(_QWORD *)&this->m_tStartColorVar.b = 1056964608;\n  this->m_tEndColor.r = 0.5;\n  this->m_tEndColor.g = 0.5;\n  this->m_tEndColor.b = 0.5;\n  this->m_tEndColor.a = 1.0;\n  this->m_tEndColorVar.r = 0.5;\n  this->m_tEndColorVar.g = 0.5;\n  *(_QWORD *)&this->m_tEndColorVar.b = 1056964608;\n  this->m_fEmissionRate = (float)m_uTotalParticles / 12.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  ((void (__fastcall *)(cocos2d::CCParticleSpiral *, _QWORD))this->setBlendAdditive)(this, 0);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCParticleSpiral::initWithTotalParticles from 0x180064f20 to 0x180065157 (567 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCParticleSpiral::createWithTotalParticles @ 0x180063987\n; > cocos2d::CCParticleSpiral::createWithTotalParticles @ 0x180063976\n; > <???> @ 0x1800fd3d8\n; > <???> @ 0x180139c18\n; > <???> @ 0x180139c28\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b3ae0\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, 0x180064f20\nsub     rsp, 20h                                                       ; +0x2, 0x180064f22\nxor     r8d, r8d; bool                                                 ; +0x6, 0x180064f26\nmov     rdi, rcx                                                       ; +0x9, 0x180064f29\ncall    ?initWithTotalParticles@CCParticleSystemQuad@cocos2d@@UEAA_NI_N@Z; cocos2d::CCParticleSystemQuad::initWithTotalParticles(uint,bool) ; +0xc, 0x180064f2c\ntest    al, al                                                         ; +0x11, 0x180064f31\njz      loc_18006514F                                                  ; +0x13, 0x180064f33\nmov     rax, [rdi]                                                     ; +0x19, 0x180064f39\nxor     edx, edx                                                       ; +0x1c, 0x180064f3c\nmov     [rsp+28h+arg_0], rbx                                           ; +0x1e, 0x180064f3e\nmov     rcx, rdi                                                       ; +0x23, 0x180064f43\nmov     [rsp+28h+arg_8], rsi                                           ; +0x26, 0x180064f46\nmov     dword ptr [rdi+1D4h], 0BF800000h                               ; +0x2b, 0x180064f4b\ncall    qword ptr [rax+608h]                                           ; +0x35, 0x180064f55\nmov     rbx, [rdi]                                                     ; +0x3b, 0x180064f5b\nlea     rcx, [rsp+28h+arg_18]                                          ; +0x3e, 0x180064f5e\nxorps   xmm2, xmm2                                                     ; +0x43, 0x180064f63\nxorps   xmm1, xmm1                                                     ; +0x46, 0x180064f66\ncall    kmVec2Fill                                                     ; +0x49, 0x180064f69\nmov     rdx, rax                                                       ; +0x4e, 0x180064f6e\nmov     rcx, rdi                                                       ; +0x51, 0x180064f71\ncall    qword ptr [rbx+400h]                                           ; +0x54, 0x180064f74\nmov     rax, [rdi]                                                     ; +0x5a, 0x180064f7a\nmov     rcx, rdi                                                       ; +0x5d, 0x180064f7d\nmovss   xmm1, cs:dword_1800FEE00                                       ; +0x60, 0x180064f80\ncall    qword ptr [rax+410h]                                           ; +0x68, 0x180064f88\nmov     rax, [rdi]                                                     ; +0x6e, 0x180064f8e\nxorps   xmm1, xmm1                                                     ; +0x71, 0x180064f91\nmov     rcx, rdi                                                       ; +0x74, 0x180064f94\ncall    qword ptr [rax+420h]                                           ; +0x77, 0x180064f97\nmov     rax, [rdi]                                                     ; +0x7d, 0x180064f9d\nmov     rcx, rdi                                                       ; +0x80, 0x180064fa0\nmovss   xmm1, cs:dword_1800FEE10                                       ; +0x83, 0x180064fa3\ncall    qword ptr [rax+450h]                                           ; +0x8b, 0x180064fab\nmov     rax, [rdi]                                                     ; +0x91, 0x180064fb1\nxorps   xmm1, xmm1                                                     ; +0x94, 0x180064fb4\nmov     rcx, rdi                                                       ; +0x97, 0x180064fb7\ncall    qword ptr [rax+460h]                                           ; +0x9a, 0x180064fba\nmov     rax, [rdi]                                                     ; +0xa0, 0x180064fc0\nmov     rcx, rdi                                                       ; +0xa3, 0x180064fc3\nmovss   xmm1, cs:flt_1800F5058                                         ; +0xa6, 0x180064fc6\ncall    qword ptr [rax+430h]                                           ; +0xae, 0x180064fce\nmov     rax, [rdi]                                                     ; +0xb4, 0x180064fd4\nxorps   xmm1, xmm1                                                     ; +0xb7, 0x180064fd7\nmov     rcx, rdi                                                       ; +0xba, 0x180064fda\ncall    qword ptr [rax+440h]                                           ; +0xbd, 0x180064fdd\nmov     qword ptr [rdi+1F0h], 42B40000h                                ; +0xc3, 0x180064fe3\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xce, 0x180064fee\nmov     rcx, rax                                                       ; +0xd3, 0x180064ff3\nlea     rdx, [rsp+28h+arg_10]                                          ; +0xd6, 0x180064ff6\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xdb, 0x180064ffb\nmovss   xmm2, [rsp+28h+arg_14]                                         ; +0xe0, 0x180065000\nlea     rcx, [rsp+28h+arg_18]                                          ; +0xe6, 0x180065006\nmovss   xmm1, [rsp+28h+arg_10]                                         ; +0xeb, 0x18006500b\nmulss   xmm2, cs:dword_1800E6308                                       ; +0xf1, 0x180065011\nmov     rbx, [rdi]                                                     ; +0xf9, 0x180065019\nmulss   xmm1, cs:dword_1800E6308                                       ; +0xfc, 0x18006501c\ncall    kmVec2Fill                                                     ; +0x104, 0x180065024\nmov     rdx, rax                                                       ; +0x109, 0x180065029\nmov     rcx, rdi                                                       ; +0x10c, 0x18006502c\ncall    qword ptr [rbx+0B8h]                                           ; +0x10f, 0x18006502f\nmov     rax, [rdi]                                                     ; +0x115, 0x180065035\nlea     rdx, unk_1801A8408                                             ; +0x118, 0x180065038\nmov     rcx, rdi                                                       ; +0x11f, 0x18006503f\ncall    qword ptr [rax+3A8h]                                           ; +0x122, 0x180065042\nmov     eax, [rdi+298h]                                                ; +0x128, 0x180065048\nxorps   xmm0, xmm0                                                     ; +0x12e, 0x18006504e\nmov     qword ptr [rdi+1E8h], 41400000h                                ; +0x131, 0x180065051\nmov     qword ptr [rdi+234h], 41A00000h                                ; +0x13c, 0x18006505c\nmov     dword ptr [rdi+23Ch], 0BF800000h                               ; +0x147, 0x180065067\ncvtsi2ss xmm0, rax                                                     ; +0x151, 0x180065071\nmov     dword ptr [rdi+244h], 3F000000h                                ; +0x156, 0x180065076\nmov     dword ptr [rdi+248h], 3F000000h                                ; +0x160, 0x180065080\nmov     dword ptr [rdi+24Ch], 3F000000h                                ; +0x16a, 0x18006508a\nmov     dword ptr [rdi+250h], 3F800000h                                ; +0x174, 0x180065094\nmov     dword ptr [rdi+254h], 3F000000h                                ; +0x17e, 0x18006509e\nmov     dword ptr [rdi+258h], 3F000000h                                ; +0x188, 0x1800650a8\ndivss   xmm0, cs:dword_1800E7318                                       ; +0x192, 0x1800650b2\nmov     qword ptr [rdi+25Ch], 3F000000h                                ; +0x19a, 0x1800650ba\nmov     dword ptr [rdi+264h], 3F000000h                                ; +0x1a5, 0x1800650c5\nmov     dword ptr [rdi+268h], 3F000000h                                ; +0x1af, 0x1800650cf\nmov     dword ptr [rdi+26Ch], 3F000000h                                ; +0x1b9, 0x1800650d9\nmov     dword ptr [rdi+270h], 3F800000h                                ; +0x1c3, 0x1800650e3\nmov     dword ptr [rdi+274h], 3F000000h                                ; +0x1cd, 0x1800650ed\nmov     dword ptr [rdi+278h], 3F000000h                                ; +0x1d7, 0x1800650f7\nmov     qword ptr [rdi+27Ch], 3F000000h                                ; +0x1e1, 0x180065101\nmovss   dword ptr [rdi+294h], xmm0                                     ; +0x1ec, 0x18006510c\ncall    sub_180063AC0                                                  ; +0x1f4, 0x180065114\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x1f9, 0x180065119\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1fe, 0x18006511e\ntest    rax, rax                                                       ; +0x203, 0x180065123\njz      short loc_180065139                                            ; +0x206, 0x180065126\nlea     rcx, [rdi+140h]                                                ; +0x208, 0x180065128\nmov     rdx, rax                                                       ; +0x20f, 0x18006512f\nmov     r8, [rcx]                                                      ; +0x212, 0x180065132\ncall    qword ptr [r8+18h]                                             ; +0x215, 0x180065135\nmov     rax, [rdi]                                                     ; +0x219, 0x180065139\nxor     edx, edx                                                       ; +0x21c, 0x18006513c\nmov     rcx, rdi                                                       ; +0x21e, 0x18006513e\ncall    qword ptr [rax+4E8h]                                           ; +0x221, 0x180065141\nmov     al, 1                                                          ; +0x227, 0x180065147\nadd     rsp, 20h                                                       ; +0x229, 0x180065149\npop     rdi                                                            ; +0x22d, 0x18006514d\nretn                                                                   ; +0x22e, 0x18006514e\nxor     al, al                                                         ; +0x22f, 0x18006514f\nadd     rsp, 20h                                                       ; +0x231, 0x180065151\npop     rdi                                                            ; +0x235, 0x180065155\nretn                                                                   ; +0x236, 0x180065156", "xrefs": ["cocos2d::CCParticleSpiral::createWithTotalParticles @ 0x180063987", "cocos2d::CCParticleSpiral::createWithTotalParticles @ 0x180063976", "<???> @ 0x1800fd3d8", "<???> @ 0x180139c18", "<???> @ 0x180139c28", "<???> @ 0x1801438a8", "<???> @ 0x1801b3ae0"], "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"}