{"type": "func", "start": 6442859520, "end": 6442860090, "name": "cocos2d::CCParticleExplosion::initWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleExplosion::initWithTotalParticles from 0x180063c00 to 0x180063e3a (570 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCParticleExplosion::createWithTotalParticles @ 0x180063237\n// > cocos2d::CCParticleExplosion::createWithTotalParticles @ 0x180063226\n// > <???> @ 0x1800fda48\n// > <???> @ 0x180139c3c\n// > <???> @ 0x180139c4c\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b399c\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::CCParticleExplosion::initWithTotalParticles(\n        cocos2d::CCParticleExplosion *this,\n        unsigned int a2)\n{\n  cocos2d::CCParticleExplosion_vtbl *v3; // rax\n  cocos2d::CCParticleExplosion_vtbl *v4; // rbx\n  float *v5; // rax\n  cocos2d::CCDirector *v6; // rax\n  cocos2d::CCParticleExplosion_vtbl *v7; // rbx\n  float *v8; // rax\n  signed int m_uTotalParticles; // eax\n  float v10; // xmm0_4\n  struct cocos2d::CCTexture2D *v11; // rax\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 = 0.1;\n  ((void (__fastcall *)(cocos2d::CCParticleExplosion *, _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::CCParticleExplosion *, float *))v4->setGravity)(this, v5);\n  ((void (__fastcall *)(cocos2d::CCParticleExplosion *))this->setSpeed)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleExplosion *))this->setSpeedVar)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleExplosion *))this->setRadialAccel)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleExplosion *))this->setRadialAccelVar)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleExplosion *))this->setTangentialAccel)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleExplosion *))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::CCParticleExplosion *, float *))v7->setPosition_0)(this, v8);\n  ((void (__fastcall *)(cocos2d::CCParticleExplosion *, void *))this->setPosVar)(this, &unk_1801A8408);\n  m_uTotalParticles = this->m_uTotalParticles;\n  this->m_fLife = 5.0;\n  this->m_fLifeVar = 2.0;\n  this->m_fStartSize = 15.0;\n  this->m_fStartSizeVar = 10.0;\n  this->m_fEndSize = -1.0;\n  this->m_tStartColor.r = 0.69999999;\n  this->m_tStartColor.g = 0.1;\n  this->m_tStartColor.b = 0.2;\n  this->m_tStartColor.a = 1.0;\n  v10 = (float)m_uTotalParticles / this->m_fDuration;\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  *(_QWORD *)&this->m_tEndColor.b = 1056964608;\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 = v10;\n  v11 = sub_180063AC0();\n  if ( v11 )\n    ((void (__fastcall *)(cocos2d::CCTextureProtocol *, struct cocos2d::CCTexture2D *))this->setTexture)(\n      &this->cocos2d::CCTextureProtocol,\n      v11);\n  ((void (__fastcall *)(cocos2d::CCParticleExplosion *, _QWORD))this->setBlendAdditive)(this, 0);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCParticleExplosion::initWithTotalParticles from 0x180063c00 to 0x180063e3a (570 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCParticleExplosion::createWithTotalParticles @ 0x180063237\n; > cocos2d::CCParticleExplosion::createWithTotalParticles @ 0x180063226\n; > <???> @ 0x1800fda48\n; > <???> @ 0x180139c3c\n; > <???> @ 0x180139c4c\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b399c\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, 0x180063c00\nsub     rsp, 20h                                                       ; +0x2, 0x180063c02\nxor     r8d, r8d; bool                                                 ; +0x6, 0x180063c06\nmov     rdi, rcx                                                       ; +0x9, 0x180063c09\ncall    ?initWithTotalParticles@CCParticleSystemQuad@cocos2d@@UEAA_NI_N@Z; cocos2d::CCParticleSystemQuad::initWithTotalParticles(uint,bool) ; +0xc, 0x180063c0c\ntest    al, al                                                         ; +0x11, 0x180063c11\njz      loc_180063E32                                                  ; +0x13, 0x180063c13\nmov     rax, [rdi]                                                     ; +0x19, 0x180063c19\nxor     edx, edx                                                       ; +0x1c, 0x180063c1c\nmov     rcx, rdi                                                       ; +0x1e, 0x180063c1e\nmov     [rsp+28h+arg_0], rbx                                           ; +0x21, 0x180063c21\nmov     dword ptr [rdi+1D4h], 3DCCCCCDh                                ; +0x26, 0x180063c26\ncall    qword ptr [rax+608h]                                           ; +0x30, 0x180063c30\nmov     rbx, [rdi]                                                     ; +0x36, 0x180063c36\nlea     rcx, [rsp+28h+arg_18]                                          ; +0x39, 0x180063c39\nxorps   xmm2, xmm2                                                     ; +0x3e, 0x180063c3e\nxorps   xmm1, xmm1                                                     ; +0x41, 0x180063c41\ncall    kmVec2Fill                                                     ; +0x44, 0x180063c44\nmov     rdx, rax                                                       ; +0x49, 0x180063c49\nmov     rcx, rdi                                                       ; +0x4c, 0x180063c4c\ncall    qword ptr [rbx+400h]                                           ; +0x4f, 0x180063c4f\nmov     rax, [rdi]                                                     ; +0x55, 0x180063c55\nmov     rcx, rdi                                                       ; +0x58, 0x180063c58\nmovss   xmm1, cs:dword_1800FEDF4                                       ; +0x5b, 0x180063c5b\ncall    qword ptr [rax+410h]                                           ; +0x63, 0x180063c63\nmov     rax, [rdi]                                                     ; +0x69, 0x180063c69\nmov     rcx, rdi                                                       ; +0x6c, 0x180063c6c\nmovss   xmm1, cs:dword_1800FEDEC                                       ; +0x6f, 0x180063c6f\ncall    qword ptr [rax+420h]                                           ; +0x77, 0x180063c77\nmov     rax, [rdi]                                                     ; +0x7d, 0x180063c7d\nxorps   xmm1, xmm1                                                     ; +0x80, 0x180063c80\nmov     rcx, rdi                                                       ; +0x83, 0x180063c83\ncall    qword ptr [rax+450h]                                           ; +0x86, 0x180063c86\nmov     rax, [rdi]                                                     ; +0x8c, 0x180063c8c\nxorps   xmm1, xmm1                                                     ; +0x8f, 0x180063c8f\nmov     rcx, rdi                                                       ; +0x92, 0x180063c92\ncall    qword ptr [rax+460h]                                           ; +0x95, 0x180063c95\nmov     rax, [rdi]                                                     ; +0x9b, 0x180063c9b\nxorps   xmm1, xmm1                                                     ; +0x9e, 0x180063c9e\nmov     rcx, rdi                                                       ; +0xa1, 0x180063ca1\ncall    qword ptr [rax+430h]                                           ; +0xa4, 0x180063ca4\nmov     rax, [rdi]                                                     ; +0xaa, 0x180063caa\nxorps   xmm1, xmm1                                                     ; +0xad, 0x180063cad\nmov     rcx, rdi                                                       ; +0xb0, 0x180063cb0\ncall    qword ptr [rax+440h]                                           ; +0xb3, 0x180063cb3\nmov     dword ptr [rdi+1F0h], 42B40000h                                ; +0xb9, 0x180063cb9\nmov     dword ptr [rdi+1F4h], 43B40000h                                ; +0xc3, 0x180063cc3\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xcd, 0x180063ccd\nmov     rcx, rax                                                       ; +0xd2, 0x180063cd2\nlea     rdx, [rsp+28h+arg_10]                                          ; +0xd5, 0x180063cd5\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xda, 0x180063cda\nmovss   xmm2, [rsp+28h+arg_14]                                         ; +0xdf, 0x180063cdf\nlea     rcx, [rsp+28h+arg_18]                                          ; +0xe5, 0x180063ce5\nmovss   xmm1, [rsp+28h+arg_10]                                         ; +0xea, 0x180063cea\nmulss   xmm2, cs:dword_1800E6308                                       ; +0xf0, 0x180063cf0\nmov     rbx, [rdi]                                                     ; +0xf8, 0x180063cf8\nmulss   xmm1, cs:dword_1800E6308                                       ; +0xfb, 0x180063cfb\ncall    kmVec2Fill                                                     ; +0x103, 0x180063d03\nmov     rdx, rax                                                       ; +0x108, 0x180063d08\nmov     rcx, rdi                                                       ; +0x10b, 0x180063d0b\ncall    qword ptr [rbx+0B8h]                                           ; +0x10e, 0x180063d0e\nmov     rax, [rdi]                                                     ; +0x114, 0x180063d14\nlea     rdx, unk_1801A8408                                             ; +0x117, 0x180063d17\nmov     rcx, rdi                                                       ; +0x11e, 0x180063d1e\ncall    qword ptr [rax+3A8h]                                           ; +0x121, 0x180063d21\nmov     eax, [rdi+298h]                                                ; +0x127, 0x180063d27\nxorps   xmm0, xmm0                                                     ; +0x12d, 0x180063d2d\nmov     dword ptr [rdi+1E8h], 40A00000h                                ; +0x130, 0x180063d30\nmov     dword ptr [rdi+1ECh], 40000000h                                ; +0x13a, 0x180063d3a\nmov     dword ptr [rdi+234h], 41700000h                                ; +0x144, 0x180063d44\ncvtsi2ss xmm0, rax                                                     ; +0x14e, 0x180063d4e\nmov     dword ptr [rdi+238h], 41200000h                                ; +0x153, 0x180063d53\nmov     dword ptr [rdi+23Ch], 0BF800000h                               ; +0x15d, 0x180063d5d\nmov     dword ptr [rdi+244h], 3F333333h                                ; +0x167, 0x180063d67\nmov     dword ptr [rdi+248h], 3DCCCCCDh                                ; +0x171, 0x180063d71\nmov     dword ptr [rdi+24Ch], 3E4CCCCDh                                ; +0x17b, 0x180063d7b\nmov     dword ptr [rdi+250h], 3F800000h                                ; +0x185, 0x180063d85\ndivss   xmm0, dword ptr [rdi+1D4h]                                     ; +0x18f, 0x180063d8f\nmov     dword ptr [rdi+254h], 3F000000h                                ; +0x197, 0x180063d97\nmov     dword ptr [rdi+258h], 3F000000h                                ; +0x1a1, 0x180063da1\nmov     qword ptr [rdi+25Ch], 3F000000h                                ; +0x1ab, 0x180063dab\nmov     dword ptr [rdi+264h], 3F000000h                                ; +0x1b6, 0x180063db6\nmov     dword ptr [rdi+268h], 3F000000h                                ; +0x1c0, 0x180063dc0\nmov     qword ptr [rdi+26Ch], 3F000000h                                ; +0x1ca, 0x180063dca\nmov     dword ptr [rdi+274h], 3F000000h                                ; +0x1d5, 0x180063dd5\nmov     dword ptr [rdi+278h], 3F000000h                                ; +0x1df, 0x180063ddf\nmov     qword ptr [rdi+27Ch], 3F000000h                                ; +0x1e9, 0x180063de9\nmovss   dword ptr [rdi+294h], xmm0                                     ; +0x1f4, 0x180063df4\ncall    sub_180063AC0                                                  ; +0x1fc, 0x180063dfc\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x201, 0x180063e01\ntest    rax, rax                                                       ; +0x206, 0x180063e06\njz      short loc_180063E1C                                            ; +0x209, 0x180063e09\nlea     rcx, [rdi+140h]                                                ; +0x20b, 0x180063e0b\nmov     rdx, rax                                                       ; +0x212, 0x180063e12\nmov     r8, [rcx]                                                      ; +0x215, 0x180063e15\ncall    qword ptr [r8+18h]                                             ; +0x218, 0x180063e18\nmov     rax, [rdi]                                                     ; +0x21c, 0x180063e1c\nxor     edx, edx                                                       ; +0x21f, 0x180063e1f\nmov     rcx, rdi                                                       ; +0x221, 0x180063e21\ncall    qword ptr [rax+4E8h]                                           ; +0x224, 0x180063e24\nmov     al, 1                                                          ; +0x22a, 0x180063e2a\nadd     rsp, 20h                                                       ; +0x22c, 0x180063e2c\npop     rdi                                                            ; +0x230, 0x180063e30\nretn                                                                   ; +0x231, 0x180063e31\nxor     al, al                                                         ; +0x232, 0x180063e32\nadd     rsp, 20h                                                       ; +0x234, 0x180063e34\npop     rdi                                                            ; +0x238, 0x180063e38\nretn                                                                   ; +0x239, 0x180063e39", "xrefs": ["cocos2d::CCParticleExplosion::createWithTotalParticles @ 0x180063237", "cocos2d::CCParticleExplosion::createWithTotalParticles @ 0x180063226", "<???> @ 0x1800fda48", "<???> @ 0x180139c3c", "<???> @ 0x180139c4c", "<???> @ 0x1801438a8", "<???> @ 0x1801b399c"], "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"}