{"type": "func", "start": 6442860096, "end": 6442860566, "name": "cocos2d::CCParticleFire::initWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleFire::initWithTotalParticles from 0x180063e40 to 0x180064016 (470 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCParticleFire::createWithTotalParticles @ 0x180063307\n// > cocos2d::CCParticleFire::createWithTotalParticles @ 0x1800632f6\n// > <???> @ 0x1800fad38\n// > <???> @ 0x180139ae8\n// > <???> @ 0x180139af8\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b39c0\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::CCParticleFire::initWithTotalParticles(cocos2d::CCParticleFire *this, unsigned int a2)\n{\n  float *v3; // rax\n  cocos2d::CCDirector *v4; // rax\n  cocos2d::CCParticleFire_vtbl *v5; // rbx\n  float *v6; // rax\n  float *v7; // rax\n  signed int m_uTotalParticles; // eax\n  struct cocos2d::CCTexture2D *v9; // rax\n  __int64 v10; // rdx\n  float v12; // [rsp+40h] [rbp+18h]\n  float v13; // [rsp+48h] [rbp+20h] BYREF\n\n  if ( !cocos2d::CCParticleSystemQuad::initWithTotalParticles(this, a2, 0) )\n    return 0;\n  this->m_fDuration = -1.0;\n  this->m_nEmitterMode = 0;\n  v3 = kmVec2Fill(&v13, 0.0, 0.0);\n  cocos2d::CCSize::operator=(&this->modeA.gravity, v3);\n  *(_QWORD *)&this->modeA.radialAccel = 0;\n  this->modeA.speed = 60.0;\n  this->modeA.speedVar = 20.0;\n  this->m_fAngle = 90.0;\n  this->m_fAngleVar = 10.0;\n  v4 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(v4);\n  v5 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v6 = kmVec2Fill(&v13, v12 * 0.5, 60.0);\n  ((void (__fastcall *)(cocos2d::CCParticleFire *, float *))v5->setPosition_0)(this, v6);\n  v7 = kmVec2Fill(&v13, 40.0, 20.0);\n  cocos2d::CCSize::operator=(&this->m_tPosVar, v7);\n  m_uTotalParticles = this->m_uTotalParticles;\n  this->m_fLife = 3.0;\n  this->m_fLifeVar = 0.25;\n  this->m_fStartSize = 54.0;\n  this->m_fStartSizeVar = 10.0;\n  this->m_fEndSize = -1.0;\n  this->m_tStartColor.r = 0.75999999;\n  this->m_tStartColor.g = 0.25;\n  this->m_tStartColor.b = 0.12;\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  *(_QWORD *)&this->m_tEndColor.a = 1065353216;\n  *(_QWORD *)&this->m_tEndColorVar.g = 0;\n  this->m_tEndColorVar.a = 0.0;\n  this->m_fEmissionRate = (float)m_uTotalParticles / 3.0;\n  v9 = sub_180063AC0();\n  if ( v9 )\n    ((void (__fastcall *)(cocos2d::CCTextureProtocol *, struct cocos2d::CCTexture2D *))this->setTexture)(\n      &this->cocos2d::CCTextureProtocol,\n      v9);\n  LOBYTE(v10) = 1;\n  ((void (__fastcall *)(cocos2d::CCParticleFire *, __int64))this->setBlendAdditive)(this, v10);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCParticleFire::initWithTotalParticles from 0x180063e40 to 0x180064016 (470 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCParticleFire::createWithTotalParticles @ 0x180063307\n; > cocos2d::CCParticleFire::createWithTotalParticles @ 0x1800632f6\n; > <???> @ 0x1800fad38\n; > <???> @ 0x180139ae8\n; > <???> @ 0x180139af8\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b39c0\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, 0x180063e40\nsub     rsp, 20h                                                       ; +0x2, 0x180063e42\nxor     r8d, r8d; bool                                                 ; +0x6, 0x180063e46\nmov     rdi, rcx                                                       ; +0x9, 0x180063e49\ncall    ?initWithTotalParticles@CCParticleSystemQuad@cocos2d@@UEAA_NI_N@Z; cocos2d::CCParticleSystemQuad::initWithTotalParticles(uint,bool) ; +0xc, 0x180063e4c\ntest    al, al                                                         ; +0x11, 0x180063e51\njz      loc_18006400E                                                  ; +0x13, 0x180063e53\nmov     [rsp+28h+arg_0], rbx                                           ; +0x19, 0x180063e59\nlea     rcx, [rsp+28h+arg_18]                                          ; +0x1e, 0x180063e5e\nmov     [rsp+28h+arg_8], rsi                                           ; +0x23, 0x180063e63\nxorps   xmm2, xmm2                                                     ; +0x28, 0x180063e68\nxor     esi, esi                                                       ; +0x2b, 0x180063e6b\nmov     dword ptr [rdi+1D4h], 0BF800000h                               ; +0x2d, 0x180063e6d\nxorps   xmm1, xmm1                                                     ; +0x37, 0x180063e77\nmov     [rdi+2BCh], esi                                                ; +0x3a, 0x180063e7a\ncall    kmVec2Fill                                                     ; +0x40, 0x180063e80\nmov     rdx, rax                                                       ; +0x45, 0x180063e85\nlea     rcx, [rdi+16Ch]                                                ; +0x48, 0x180063e88\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x4f, 0x180063e8f\nmov     [rdi+184h], rsi                                                ; +0x54, 0x180063e94\nmov     dword ptr [rdi+174h], 42700000h                                ; +0x5b, 0x180063e9b\nmov     dword ptr [rdi+178h], 41A00000h                                ; +0x65, 0x180063ea5\nmov     dword ptr [rdi+1F0h], 42B40000h                                ; +0x6f, 0x180063eaf\nmov     dword ptr [rdi+1F4h], 41200000h                                ; +0x79, 0x180063eb9\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x83, 0x180063ec3\nmov     rcx, rax                                                       ; +0x88, 0x180063ec8\nlea     rdx, [rsp+28h+arg_10]                                          ; +0x8b, 0x180063ecb\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x90, 0x180063ed0\nmovss   xmm1, [rsp+28h+arg_10]                                         ; +0x95, 0x180063ed5\nlea     rcx, [rsp+28h+arg_18]                                          ; +0x9b, 0x180063edb\nmulss   xmm1, cs:dword_1800E6308                                       ; +0xa0, 0x180063ee0\nmov     rbx, [rdi]                                                     ; +0xa8, 0x180063ee8\nmovss   xmm2, cs:dword_1800FEDF0                                       ; +0xab, 0x180063eeb\ncall    kmVec2Fill                                                     ; +0xb3, 0x180063ef3\nmov     rdx, rax                                                       ; +0xb8, 0x180063ef8\nmov     rcx, rdi                                                       ; +0xbb, 0x180063efb\ncall    qword ptr [rbx+0B8h]                                           ; +0xbe, 0x180063efe\nmovss   xmm2, cs:dword_1800FEDE0                                       ; +0xc4, 0x180063f04\nlea     rcx, [rsp+28h+arg_18]                                          ; +0xcc, 0x180063f0c\nmovss   xmm1, cs:dword_1800FEDEC                                       ; +0xd1, 0x180063f11\ncall    kmVec2Fill                                                     ; +0xd9, 0x180063f19\nmov     rdx, rax                                                       ; +0xde, 0x180063f1e\nlea     rcx, [rdi+1E0h]                                                ; +0xe1, 0x180063f21\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0xe8, 0x180063f28\nmov     eax, [rdi+298h]                                                ; +0xed, 0x180063f2d\nxorps   xmm0, xmm0                                                     ; +0xf3, 0x180063f33\nmov     dword ptr [rdi+1E8h], 40400000h                                ; +0xf6, 0x180063f36\nmov     dword ptr [rdi+1ECh], 3E800000h                                ; +0x100, 0x180063f40\nmov     dword ptr [rdi+234h], 42580000h                                ; +0x10a, 0x180063f4a\ncvtsi2ss xmm0, rax                                                     ; +0x114, 0x180063f54\nmov     dword ptr [rdi+238h], 41200000h                                ; +0x119, 0x180063f59\nmov     dword ptr [rdi+23Ch], 0BF800000h                               ; +0x123, 0x180063f63\nmov     dword ptr [rdi+244h], 3F428F5Ch                                ; +0x12d, 0x180063f6d\nmov     dword ptr [rdi+248h], 3E800000h                                ; +0x137, 0x180063f77\nmov     dword ptr [rdi+24Ch], 3DF5C28Fh                                ; +0x141, 0x180063f81\nmov     qword ptr [rdi+250h], 3F800000h                                ; +0x14b, 0x180063f8b\ndivss   xmm0, cs:flt_1800E6700                                         ; +0x156, 0x180063f96\nmov     [rdi+258h], rsi                                                ; +0x15e, 0x180063f9e\nmov     [rdi+260h], rsi                                                ; +0x165, 0x180063fa5\nmov     [rdi+268h], rsi                                                ; +0x16c, 0x180063fac\nmov     qword ptr [rdi+270h], 3F800000h                                ; +0x173, 0x180063fb3\nmov     [rdi+278h], rsi                                                ; +0x17e, 0x180063fbe\nmov     [rdi+280h], esi                                                ; +0x185, 0x180063fc5\nmovss   dword ptr [rdi+294h], xmm0                                     ; +0x18b, 0x180063fcb\ncall    sub_180063AC0                                                  ; +0x193, 0x180063fd3\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x198, 0x180063fd8\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x19d, 0x180063fdd\ntest    rax, rax                                                       ; +0x1a2, 0x180063fe2\njz      short loc_180063FF8                                            ; +0x1a5, 0x180063fe5\nlea     rcx, [rdi+140h]                                                ; +0x1a7, 0x180063fe7\nmov     rdx, rax                                                       ; +0x1ae, 0x180063fee\nmov     r8, [rcx]                                                      ; +0x1b1, 0x180063ff1\ncall    qword ptr [r8+18h]                                             ; +0x1b4, 0x180063ff4\nmov     rax, [rdi]                                                     ; +0x1b8, 0x180063ff8\nmov     dl, 1                                                          ; +0x1bb, 0x180063ffb\nmov     rcx, rdi                                                       ; +0x1bd, 0x180063ffd\ncall    qword ptr [rax+4E8h]                                           ; +0x1c0, 0x180064000\nmov     al, 1                                                          ; +0x1c6, 0x180064006\nadd     rsp, 20h                                                       ; +0x1c8, 0x180064008\npop     rdi                                                            ; +0x1cc, 0x18006400c\nretn                                                                   ; +0x1cd, 0x18006400d\nxor     al, al                                                         ; +0x1ce, 0x18006400e\nadd     rsp, 20h                                                       ; +0x1d0, 0x180064010\npop     rdi                                                            ; +0x1d4, 0x180064014\nretn                                                                   ; +0x1d5, 0x180064015", "xrefs": ["cocos2d::CCParticleFire::createWithTotalParticles @ 0x180063307", "cocos2d::CCParticleFire::createWithTotalParticles @ 0x1800632f6", "<???> @ 0x1800fad38", "<???> @ 0x180139ae8", "<???> @ 0x180139af8", "<???> @ 0x1801438a8", "<???> @ 0x1801b39c0"], "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"}