{"type": "func", "start": 6442863328, "end": 6442863851, "name": "cocos2d::CCParticleSmoke::initWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleSmoke::initWithTotalParticles from 0x180064ae0 to 0x180064ceb (523 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCParticleSmoke::createWithTotalParticles @ 0x1800637e7\n// > cocos2d::CCParticleSmoke::createWithTotalParticles @ 0x1800637d6\n// > <???> @ 0x1800fe0b8\n// > <???> @ 0x180139c60\n// > <???> @ 0x180139c70\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b3a98\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::CCParticleSmoke::initWithTotalParticles(cocos2d::CCParticleSmoke *this, unsigned int a2)\n{\n  cocos2d::CCParticleSmoke_vtbl *v3; // rax\n  cocos2d::CCParticleSmoke_vtbl *v4; // rbx\n  float *v5; // rax\n  cocos2d::CCDirector *v6; // rax\n  cocos2d::CCParticleSmoke_vtbl *v7; // rbx\n  float *v8; // rax\n  cocos2d::CCParticleSmoke_vtbl *v9; // rbx\n  float *v10; // rax\n  signed int m_uTotalParticles; // eax\n  struct cocos2d::CCTexture2D *v12; // rax\n  float v14; // [rsp+40h] [rbp+18h]\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::CCParticleSmoke *, _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::CCParticleSmoke *, float *))v4->setGravity)(this, v5);\n  ((void (__fastcall *)(cocos2d::CCParticleSmoke *))this->setRadialAccel)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleSmoke *))this->setRadialAccelVar)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleSmoke *))this->setSpeed)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleSmoke *))this->setSpeedVar)(this);\n  this->m_fAngle = 90.0;\n  this->m_fAngleVar = 5.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, v14 * 0.5, 0.0);\n  ((void (__fastcall *)(cocos2d::CCParticleSmoke *, float *))v7->setPosition_0)(this, v8);\n  v9 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v10 = kmVec2Fill(&v15, 20.0, 0.0);\n  ((void (__fastcall *)(cocos2d::CCParticleSmoke *, float *))v9->setPosVar)(this, v10);\n  m_uTotalParticles = this->m_uTotalParticles;\n  this->m_fLife = 4.0;\n  this->m_fLifeVar = 1.0;\n  this->m_fStartSize = 60.0;\n  this->m_fStartSizeVar = 10.0;\n  this->m_fEndSize = -1.0;\n  this->m_tStartColor.r = 0.80000001;\n  this->m_tStartColor.g = 0.80000001;\n  this->m_tStartColor.b = 0.80000001;\n  this->m_tStartColor.a = 1.0;\n  this->m_tStartColorVar.r = 0.02;\n  this->m_tStartColorVar.g = 0.02;\n  *(_QWORD *)&this->m_tStartColorVar.b = 1017370378;\n  this->m_fEmissionRate = (float)m_uTotalParticles * 0.25;\n  *(_QWORD *)&this->m_tEndColor.r = 0;\n  this->m_tEndColor.b = 0.0;\n  *(_QWORD *)&this->m_tEndColor.a = 1065353216;\n  *(_QWORD *)&this->m_tEndColorVar.g = 0;\n  this->m_tEndColorVar.a = 0.0;\n  v12 = sub_180063AC0();\n  if ( v12 )\n    ((void (__fastcall *)(cocos2d::CCTextureProtocol *, struct cocos2d::CCTexture2D *))this->setTexture)(\n      &this->cocos2d::CCTextureProtocol,\n      v12);\n  ((void (__fastcall *)(cocos2d::CCParticleSmoke *, _QWORD))this->setBlendAdditive)(this, 0);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCParticleSmoke::initWithTotalParticles from 0x180064ae0 to 0x180064ceb (523 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCParticleSmoke::createWithTotalParticles @ 0x1800637e7\n; > cocos2d::CCParticleSmoke::createWithTotalParticles @ 0x1800637d6\n; > <???> @ 0x1800fe0b8\n; > <???> @ 0x180139c60\n; > <???> @ 0x180139c70\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b3a98\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, 0x180064ae0\nsub     rsp, 20h                                                       ; +0x2, 0x180064ae2\nxor     r8d, r8d; bool                                                 ; +0x6, 0x180064ae6\nmov     rdi, rcx                                                       ; +0x9, 0x180064ae9\ncall    ?initWithTotalParticles@CCParticleSystemQuad@cocos2d@@UEAA_NI_N@Z; cocos2d::CCParticleSystemQuad::initWithTotalParticles(uint,bool) ; +0xc, 0x180064aec\ntest    al, al                                                         ; +0x11, 0x180064af1\njz      loc_180064CE3                                                  ; +0x13, 0x180064af3\nmov     rax, [rdi]                                                     ; +0x19, 0x180064af9\nxor     edx, edx                                                       ; +0x1c, 0x180064afc\nmov     rcx, rdi                                                       ; +0x1e, 0x180064afe\nmov     [rsp+28h+arg_0], rbx                                           ; +0x21, 0x180064b01\nmov     dword ptr [rdi+1D4h], 0BF800000h                               ; +0x26, 0x180064b06\ncall    qword ptr [rax+608h]                                           ; +0x30, 0x180064b10\nmov     rbx, [rdi]                                                     ; +0x36, 0x180064b16\nlea     rcx, [rsp+28h+arg_18]                                          ; +0x39, 0x180064b19\nxorps   xmm2, xmm2                                                     ; +0x3e, 0x180064b1e\nxorps   xmm1, xmm1                                                     ; +0x41, 0x180064b21\ncall    kmVec2Fill                                                     ; +0x44, 0x180064b24\nmov     rdx, rax                                                       ; +0x49, 0x180064b29\nmov     rcx, rdi                                                       ; +0x4c, 0x180064b2c\ncall    qword ptr [rbx+400h]                                           ; +0x4f, 0x180064b2f\nmov     rax, [rdi]                                                     ; +0x55, 0x180064b35\nxorps   xmm1, xmm1                                                     ; +0x58, 0x180064b38\nmov     rcx, rdi                                                       ; +0x5b, 0x180064b3b\ncall    qword ptr [rax+450h]                                           ; +0x5e, 0x180064b3e\nmov     rax, [rdi]                                                     ; +0x64, 0x180064b44\nxorps   xmm1, xmm1                                                     ; +0x67, 0x180064b47\nmov     rcx, rdi                                                       ; +0x6a, 0x180064b4a\ncall    qword ptr [rax+460h]                                           ; +0x6d, 0x180064b4d\nmov     rax, [rdi]                                                     ; +0x73, 0x180064b53\nmov     rcx, rdi                                                       ; +0x76, 0x180064b56\nmovss   xmm1, cs:dword_1800FEDE4                                       ; +0x79, 0x180064b59\ncall    qword ptr [rax+410h]                                           ; +0x81, 0x180064b61\nmov     rax, [rdi]                                                     ; +0x87, 0x180064b67\nmov     rcx, rdi                                                       ; +0x8a, 0x180064b6a\nmovss   xmm1, cs:dword_1800E8440                                       ; +0x8d, 0x180064b6d\ncall    qword ptr [rax+420h]                                           ; +0x95, 0x180064b75\nmov     dword ptr [rdi+1F0h], 42B40000h                                ; +0x9b, 0x180064b7b\nmov     dword ptr [rdi+1F4h], 40A00000h                                ; +0xa5, 0x180064b85\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xaf, 0x180064b8f\nmov     rcx, rax                                                       ; +0xb4, 0x180064b94\nlea     rdx, [rsp+28h+arg_10]                                          ; +0xb7, 0x180064b97\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xbc, 0x180064b9c\nmovss   xmm1, [rsp+28h+arg_10]                                         ; +0xc1, 0x180064ba1\nlea     rcx, [rsp+28h+arg_18]                                          ; +0xc7, 0x180064ba7\nmulss   xmm1, cs:dword_1800E6308                                       ; +0xcc, 0x180064bac\nxorps   xmm2, xmm2                                                     ; +0xd4, 0x180064bb4\nmov     rbx, [rdi]                                                     ; +0xd7, 0x180064bb7\ncall    kmVec2Fill                                                     ; +0xda, 0x180064bba\nmov     rdx, rax                                                       ; +0xdf, 0x180064bbf\nmov     rcx, rdi                                                       ; +0xe2, 0x180064bc2\ncall    qword ptr [rbx+0B8h]                                           ; +0xe5, 0x180064bc5\nmovss   xmm1, cs:dword_1800FEDE0                                       ; +0xeb, 0x180064bcb\nlea     rcx, [rsp+28h+arg_18]                                          ; +0xf3, 0x180064bd3\nmov     rbx, [rdi]                                                     ; +0xf8, 0x180064bd8\nxorps   xmm2, xmm2                                                     ; +0xfb, 0x180064bdb\ncall    kmVec2Fill                                                     ; +0xfe, 0x180064bde\nmov     rdx, rax                                                       ; +0x103, 0x180064be3\nmov     rcx, rdi                                                       ; +0x106, 0x180064be6\ncall    qword ptr [rbx+3A8h]                                           ; +0x109, 0x180064be9\nmov     eax, [rdi+298h]                                                ; +0x10f, 0x180064bef\nxorps   xmm0, xmm0                                                     ; +0x115, 0x180064bf5\nmov     dword ptr [rdi+1E8h], 40800000h                                ; +0x118, 0x180064bf8\nmov     dword ptr [rdi+1ECh], 3F800000h                                ; +0x122, 0x180064c02\nmov     dword ptr [rdi+234h], 42700000h                                ; +0x12c, 0x180064c0c\ncvtsi2ss xmm0, rax                                                     ; +0x136, 0x180064c16\nxor     eax, eax                                                       ; +0x13b, 0x180064c1b\nmov     dword ptr [rdi+238h], 41200000h                                ; +0x13d, 0x180064c1d\nmov     dword ptr [rdi+23Ch], 0BF800000h                               ; +0x147, 0x180064c27\nmov     dword ptr [rdi+244h], 3F4CCCCDh                                ; +0x151, 0x180064c31\nmov     dword ptr [rdi+248h], 3F4CCCCDh                                ; +0x15b, 0x180064c3b\nmov     dword ptr [rdi+24Ch], 3F4CCCCDh                                ; +0x165, 0x180064c45\nmov     dword ptr [rdi+250h], 3F800000h                                ; +0x16f, 0x180064c4f\nmulss   xmm0, cs:dword_1800E83F4                                       ; +0x179, 0x180064c59\nmov     dword ptr [rdi+254h], 3CA3D70Ah                                ; +0x181, 0x180064c61\nmov     dword ptr [rdi+258h], 3CA3D70Ah                                ; +0x18b, 0x180064c6b\nmov     qword ptr [rdi+25Ch], 3CA3D70Ah                                ; +0x195, 0x180064c75\nmovss   dword ptr [rdi+294h], xmm0                                     ; +0x1a0, 0x180064c80\nmov     [rdi+264h], rax                                                ; +0x1a8, 0x180064c88\nmov     [rdi+26Ch], eax                                                ; +0x1af, 0x180064c8f\nmov     qword ptr [rdi+270h], 3F800000h                                ; +0x1b5, 0x180064c95\nmov     [rdi+278h], rax                                                ; +0x1c0, 0x180064ca0\nmov     [rdi+280h], eax                                                ; +0x1c7, 0x180064ca7\ncall    sub_180063AC0                                                  ; +0x1cd, 0x180064cad\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1d2, 0x180064cb2\ntest    rax, rax                                                       ; +0x1d7, 0x180064cb7\njz      short loc_180064CCD                                            ; +0x1da, 0x180064cba\nlea     rcx, [rdi+140h]                                                ; +0x1dc, 0x180064cbc\nmov     rdx, rax                                                       ; +0x1e3, 0x180064cc3\nmov     r8, [rcx]                                                      ; +0x1e6, 0x180064cc6\ncall    qword ptr [r8+18h]                                             ; +0x1e9, 0x180064cc9\nmov     rax, [rdi]                                                     ; +0x1ed, 0x180064ccd\nxor     edx, edx                                                       ; +0x1f0, 0x180064cd0\nmov     rcx, rdi                                                       ; +0x1f2, 0x180064cd2\ncall    qword ptr [rax+4E8h]                                           ; +0x1f5, 0x180064cd5\nmov     al, 1                                                          ; +0x1fb, 0x180064cdb\nadd     rsp, 20h                                                       ; +0x1fd, 0x180064cdd\npop     rdi                                                            ; +0x201, 0x180064ce1\nretn                                                                   ; +0x202, 0x180064ce2\nxor     al, al                                                         ; +0x203, 0x180064ce3\nadd     rsp, 20h                                                       ; +0x205, 0x180064ce5\npop     rdi                                                            ; +0x209, 0x180064ce9\nretn                                                                   ; +0x20a, 0x180064cea", "xrefs": ["cocos2d::CCParticleSmoke::createWithTotalParticles @ 0x1800637e7", "cocos2d::CCParticleSmoke::createWithTotalParticles @ 0x1800637d6", "<???> @ 0x1800fe0b8", "<???> @ 0x180139c60", "<???> @ 0x180139c70", "<???> @ 0x1801438a8", "<???> @ 0x1801b3a98"], "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"}