{"type": "func", "start": 6442864992, "end": 6442865479, "name": "cocos2d::CCParticleSun::initWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleSun::initWithTotalParticles from 0x180065160 to 0x180065347 (487 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCParticleSun::createWithTotalParticles @ 0x180063a57\n// > cocos2d::CCParticleSun::createWithTotalParticles @ 0x180063a46\n// > <???> @ 0x1800fba18\n// > <???> @ 0x180139b84\n// > <???> @ 0x180139b94\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b3b04\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::CCParticleSun::initWithTotalParticles(cocos2d::CCParticleSun *this, unsigned int a2)\n{\n  __int64 v3; // rdx\n  cocos2d::CCParticleSun_vtbl *v4; // rax\n  cocos2d::CCParticleSun_vtbl *v5; // rbx\n  float *v6; // rax\n  cocos2d::CCDirector *v7; // rax\n  cocos2d::CCParticleSun_vtbl *v8; // rbx\n  float *v9; // rax\n  signed int m_uTotalParticles; // eax\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  LOBYTE(v3) = 1;\n  ((void (__fastcall *)(cocos2d::CCParticleSun *, __int64))this->setBlendAdditive)(this, v3);\n  v4 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  this->m_fDuration = -1.0;\n  ((void (__fastcall *)(cocos2d::CCParticleSun *, _QWORD))v4->setEmitterMode)(this, 0);\n  v5 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v6 = kmVec2Fill(&v15, 0.0, 0.0);\n  ((void (__fastcall *)(cocos2d::CCParticleSun *, float *))v5->setGravity)(this, v6);\n  ((void (__fastcall *)(cocos2d::CCParticleSun *))this->setRadialAccel)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleSun *))this->setRadialAccelVar)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleSun *))this->setSpeed)(this);\n  ((void (__fastcall *)(cocos2d::CCParticleSun *))this->setSpeedVar)(this);\n  this->m_fAngle = 90.0;\n  this->m_fAngleVar = 360.0;\n  v7 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(v7);\n  v8 = this->cocos2d::CCParticleSystemQuad::cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v9 = kmVec2Fill(&v15, v13 * 0.5, v14 * 0.5);\n  ((void (__fastcall *)(cocos2d::CCParticleSun *, float *))v8->setPosition_0)(this, v9);\n  ((void (__fastcall *)(cocos2d::CCParticleSun *, void *))this->setPosVar)(this, &unk_1801A8408);\n  m_uTotalParticles = this->m_uTotalParticles;\n  this->m_fLife = 1.0;\n  this->m_fLifeVar = 0.5;\n  this->m_fStartSize = 30.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  this->m_fEmissionRate = (float)m_uTotalParticles;\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  v11 = sub_180063AC0();\n  if ( v11 )\n    ((void (__fastcall *)(cocos2d::CCTextureProtocol *, struct cocos2d::CCTexture2D *))this->setTexture)(\n      &this->cocos2d::CCTextureProtocol,\n      v11);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCParticleSun::initWithTotalParticles from 0x180065160 to 0x180065347 (487 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCParticleSun::createWithTotalParticles @ 0x180063a57\n; > cocos2d::CCParticleSun::createWithTotalParticles @ 0x180063a46\n; > <???> @ 0x1800fba18\n; > <???> @ 0x180139b84\n; > <???> @ 0x180139b94\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b3b04\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, 0x180065160\nsub     rsp, 20h                                                       ; +0x2, 0x180065162\nxor     r8d, r8d; bool                                                 ; +0x6, 0x180065166\nmov     rdi, rcx                                                       ; +0x9, 0x180065169\ncall    ?initWithTotalParticles@CCParticleSystemQuad@cocos2d@@UEAA_NI_N@Z; cocos2d::CCParticleSystemQuad::initWithTotalParticles(uint,bool) ; +0xc, 0x18006516c\ntest    al, al                                                         ; +0x11, 0x180065171\njz      loc_18006533F                                                  ; +0x13, 0x180065173\nmov     rax, [rdi]                                                     ; +0x19, 0x180065179\nmov     dl, 1                                                          ; +0x1c, 0x18006517c\nmov     rcx, rdi                                                       ; +0x1e, 0x18006517e\nmov     [rsp+28h+arg_0], rbx                                           ; +0x21, 0x180065181\ncall    qword ptr [rax+4E8h]                                           ; +0x26, 0x180065186\nmov     rax, [rdi]                                                     ; +0x2c, 0x18006518c\nxor     edx, edx                                                       ; +0x2f, 0x18006518f\nmov     rcx, rdi                                                       ; +0x31, 0x180065191\nmov     dword ptr [rdi+1D4h], 0BF800000h                               ; +0x34, 0x180065194\ncall    qword ptr [rax+608h]                                           ; +0x3e, 0x18006519e\nmov     rbx, [rdi]                                                     ; +0x44, 0x1800651a4\nlea     rcx, [rsp+28h+arg_18]                                          ; +0x47, 0x1800651a7\nxorps   xmm2, xmm2                                                     ; +0x4c, 0x1800651ac\nxorps   xmm1, xmm1                                                     ; +0x4f, 0x1800651af\ncall    kmVec2Fill                                                     ; +0x52, 0x1800651b2\nmov     rdx, rax                                                       ; +0x57, 0x1800651b7\nmov     rcx, rdi                                                       ; +0x5a, 0x1800651ba\ncall    qword ptr [rbx+400h]                                           ; +0x5d, 0x1800651bd\nmov     rax, [rdi]                                                     ; +0x63, 0x1800651c3\nxorps   xmm1, xmm1                                                     ; +0x66, 0x1800651c6\nmov     rcx, rdi                                                       ; +0x69, 0x1800651c9\ncall    qword ptr [rax+450h]                                           ; +0x6c, 0x1800651cc\nmov     rax, [rdi]                                                     ; +0x72, 0x1800651d2\nxorps   xmm1, xmm1                                                     ; +0x75, 0x1800651d5\nmov     rcx, rdi                                                       ; +0x78, 0x1800651d8\ncall    qword ptr [rax+460h]                                           ; +0x7b, 0x1800651db\nmov     rax, [rdi]                                                     ; +0x81, 0x1800651e1\nmov     rcx, rdi                                                       ; +0x84, 0x1800651e4\nmovss   xmm1, cs:dword_1800FEDE0                                       ; +0x87, 0x1800651e7\ncall    qword ptr [rax+410h]                                           ; +0x8f, 0x1800651ef\nmov     rax, [rdi]                                                     ; +0x95, 0x1800651f5\nmov     rcx, rdi                                                       ; +0x98, 0x1800651f8\nmovss   xmm1, cs:flt_1800F7238                                         ; +0x9b, 0x1800651fb\ncall    qword ptr [rax+420h]                                           ; +0xa3, 0x180065203\nmov     dword ptr [rdi+1F0h], 42B40000h                                ; +0xa9, 0x180065209\nmov     dword ptr [rdi+1F4h], 43B40000h                                ; +0xb3, 0x180065213\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xbd, 0x18006521d\nmov     rcx, rax                                                       ; +0xc2, 0x180065222\nlea     rdx, [rsp+28h+arg_10]                                          ; +0xc5, 0x180065225\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xca, 0x18006522a\nmovss   xmm2, [rsp+28h+arg_14]                                         ; +0xcf, 0x18006522f\nlea     rcx, [rsp+28h+arg_18]                                          ; +0xd5, 0x180065235\nmovss   xmm1, [rsp+28h+arg_10]                                         ; +0xda, 0x18006523a\nmulss   xmm2, cs:dword_1800E6308                                       ; +0xe0, 0x180065240\nmov     rbx, [rdi]                                                     ; +0xe8, 0x180065248\nmulss   xmm1, cs:dword_1800E6308                                       ; +0xeb, 0x18006524b\ncall    kmVec2Fill                                                     ; +0xf3, 0x180065253\nmov     rdx, rax                                                       ; +0xf8, 0x180065258\nmov     rcx, rdi                                                       ; +0xfb, 0x18006525b\ncall    qword ptr [rbx+0B8h]                                           ; +0xfe, 0x18006525e\nmov     rax, [rdi]                                                     ; +0x104, 0x180065264\nlea     rdx, unk_1801A8408                                             ; +0x107, 0x180065267\nmov     rcx, rdi                                                       ; +0x10e, 0x18006526e\ncall    qword ptr [rax+3A8h]                                           ; +0x111, 0x180065271\nmov     eax, [rdi+298h]                                                ; +0x117, 0x180065277\nxorps   xmm0, xmm0                                                     ; +0x11d, 0x18006527d\nmov     dword ptr [rdi+1E8h], 3F800000h                                ; +0x120, 0x180065280\nmov     dword ptr [rdi+1ECh], 3F000000h                                ; +0x12a, 0x18006528a\nmov     dword ptr [rdi+234h], 41F00000h                                ; +0x134, 0x180065294\ncvtsi2ss xmm0, rax                                                     ; +0x13e, 0x18006529e\nxor     eax, eax                                                       ; +0x143, 0x1800652a3\nmov     dword ptr [rdi+238h], 41200000h                                ; +0x145, 0x1800652a5\nmov     dword ptr [rdi+23Ch], 0BF800000h                               ; +0x14f, 0x1800652af\nmov     dword ptr [rdi+244h], 3F428F5Ch                                ; +0x159, 0x1800652b9\nmov     dword ptr [rdi+248h], 3E800000h                                ; +0x163, 0x1800652c3\nmov     dword ptr [rdi+24Ch], 3DF5C28Fh                                ; +0x16d, 0x1800652cd\nmov     qword ptr [rdi+250h], 3F800000h                                ; +0x177, 0x1800652d7\nmovss   dword ptr [rdi+294h], xmm0                                     ; +0x182, 0x1800652e2\nmov     [rdi+258h], rax                                                ; +0x18a, 0x1800652ea\nmov     [rdi+260h], rax                                                ; +0x191, 0x1800652f1\nmov     [rdi+268h], rax                                                ; +0x198, 0x1800652f8\nmov     qword ptr [rdi+270h], 3F800000h                                ; +0x19f, 0x1800652ff\nmov     [rdi+278h], rax                                                ; +0x1aa, 0x18006530a\nmov     [rdi+280h], eax                                                ; +0x1b1, 0x180065311\ncall    sub_180063AC0                                                  ; +0x1b7, 0x180065317\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1bc, 0x18006531c\ntest    rax, rax                                                       ; +0x1c1, 0x180065321\njz      short loc_180065337                                            ; +0x1c4, 0x180065324\nlea     rcx, [rdi+140h]                                                ; +0x1c6, 0x180065326\nmov     rdx, rax                                                       ; +0x1cd, 0x18006532d\nmov     r8, [rcx]                                                      ; +0x1d0, 0x180065330\ncall    qword ptr [r8+18h]                                             ; +0x1d3, 0x180065333\nmov     al, 1                                                          ; +0x1d7, 0x180065337\nadd     rsp, 20h                                                       ; +0x1d9, 0x180065339\npop     rdi                                                            ; +0x1dd, 0x18006533d\nretn                                                                   ; +0x1de, 0x18006533e\nxor     al, al                                                         ; +0x1df, 0x18006533f\nadd     rsp, 20h                                                       ; +0x1e1, 0x180065341\npop     rdi                                                            ; +0x1e5, 0x180065345\nretn                                                                   ; +0x1e6, 0x180065346", "xrefs": ["cocos2d::CCParticleSun::createWithTotalParticles @ 0x180063a57", "cocos2d::CCParticleSun::createWithTotalParticles @ 0x180063a46", "<???> @ 0x1800fba18", "<???> @ 0x180139b84", "<???> @ 0x180139b94", "<???> @ 0x1801438a8", "<???> @ 0x1801b3b04"], "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"}