{"type": "func", "start": 5373109680, "end": 5373110273, "name": "CreateParticlePopup::update", "pseudocode": "// \n// CreateParticlePopup::update from 0x1404325b0 to 0x140432801 (593 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x1405e97e8\n// > <???> @ 0x1406a1440\n// > <???> @ 0x1406a1450\n// > <???> @ 0x1406d9ba8\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\nvoid CreateParticlePopup::update(CreateParticlePopup *a1, float a2)\n{\n  float v4; // xmm0_4\n  cocos2d::CCLabelBMFont *m_perfLogLabel; // rax\n  cocos2d::CCLabelProtocol_vtbl *v6; // rbp\n  cocos2d::CCParticleSystemQuad *m_particle; // rdi\n  cocos2d::CCParticleSystemQuad_vtbl *v8; // rbx\n  int ParticleDrawCost; // esi\n  unsigned int v10; // eax\n  cocos2d::CCString *v11; // rax\n  const char *CString; // rax\n  double v13; // xmm0_8\n  float v14; // xmm7_4\n  float v15; // xmm1_4\n  bool v16; // cc\n  cocos2d::CCParticleSystemQuad *v17; // rax\n  float m_fRespawnVar; // xmm3_4\n  float m_fRespawn; // xmm4_4\n  double v20; // xmm0_8\n  cocos2d::CCParticleSystemQuad *v21; // rcx\n\n  if ( a1->m_perfLogEnabled )\n  {\n    v4 = a2 + a1->m_perfLogElapsed;\n    a1->m_perfLogElapsed = v4;\n    if ( v4 >= 0.1 )\n    {\n      m_perfLogLabel = a1->m_perfLogLabel;\n      a1->m_perfLogElapsed = 0.0;\n      v6 = m_perfLogLabel->cocos2d::CCLabelProtocol::__vftable;\n      m_particle = a1->m_particle;\n      v8 = m_particle->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n      ParticleDrawCost = cocos2d::CCParticleSystem::getParticleDrawCost(m_particle);\n      LODWORD(v8) = v8->getTotalParticles(m_particle);\n      v10 = m_particle->getParticleCount(m_particle);\n      v11 = cocos2d::CCString::createWithFormat(\"%i/%i\\n%i\", v10, (_DWORD)v8, ParticleDrawCost);\n      CString = cocos2d::CCString::getCString(v11);\n      v6->setString(&a1->m_perfLogLabel->cocos2d::CCLabelProtocol, CString);\n    }\n  }\n  v13 = ((double (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getDuration)(a1->m_particle);\n  v14 = *(float *)&v13;\n  v15 = 0.0;\n  if ( *(float *)&v13 >= 0.0 )\n  {\n    v16 = a1->m_respawnResult >= 0.0;\n    a1->m_elapsed = a2 + a1->m_elapsed;\n    if ( !v16 )\n    {\n      qword_1406C2F40 = 214013 * qword_1406C2F40 + 2531011;\n      v17 = a1->m_particle;\n      m_fRespawnVar = v17->m_fRespawnVar;\n      m_fRespawn = v17->m_fRespawn;\n      if ( (float)((float)((float)((float)((float)((float)(((unsigned __int64)qword_1406C2F40 >> 16) & 0x7FFF) / 32767.0)\n                                         + (float)((float)(((unsigned __int64)qword_1406C2F40 >> 16) & 0x7FFF) / 32767.0))\n                                 - 1.0)\n                         * m_fRespawnVar)\n                 + m_fRespawn) >= 0.0 )\n      {\n        qword_1406C2F40 = 214013 * qword_1406C2F40 + 2531011;\n        v15 = (float)((float)((float)((float)((float)(((unsigned __int64)qword_1406C2F40 >> 16) & 0x7FFF) / 32767.0)\n                                    + (float)((float)(((unsigned __int64)qword_1406C2F40 >> 16) & 0x7FFF) / 32767.0))\n                            - 1.0)\n                    * m_fRespawnVar)\n            + m_fRespawn;\n      }\n      a1->m_respawnResult = v15;\n    }\n    v20 = ((double (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getLifeVar)(a1->m_particle);\n    if ( a1->m_elapsed > (float)((float)((float)(a1->m_particle->getLife(a1->m_particle) + *(float *)&v20)\n                                       + a1->m_respawnResult)\n                               + v14) )\n    {\n      v21 = a1->m_particle;\n      a1->m_elapsed = 0.0;\n      a1->m_respawnResult = -1.0;\n      cocos2d::CCParticleSystem::resetSystem(v21);\n    }\n  }\n}", "assembly": "; \n; CreateParticlePopup::update from 0x1404325b0 to 0x140432801 (593 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x1405e97e8\n; > <???> @ 0x1406a1440\n; > <???> @ 0x1406a1450\n; > <???> @ 0x1406d9ba8\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\nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1404325b0\nmov     [rsp+arg_18], rdi                                              ; +0x5, 0x1404325b5\npush    r14                                                            ; +0xa, 0x1404325ba\nsub     rsp, 40h                                                       ; +0xc, 0x1404325bc\ncmp     byte ptr [rcx+390h], 0                                         ; +0x10, 0x1404325c0\nmov     r14, rcx                                                       ; +0x17, 0x1404325c7\nmovaps  [rsp+48h+var_18], xmm6                                         ; +0x1a, 0x1404325ca\nmovaps  xmm6, xmm1                                                     ; +0x1f, 0x1404325cf\nmovaps  [rsp+48h+var_28], xmm7                                         ; +0x22, 0x1404325d2\njz      loc_14043268F                                                  ; +0x27, 0x1404325d7\nmovaps  xmm0, xmm1                                                     ; +0x2d, 0x1404325dd\naddss   xmm0, dword ptr [rcx+394h]                                     ; +0x30, 0x1404325e0\nmovss   dword ptr [rcx+394h], xmm0                                     ; +0x38, 0x1404325e8\ncvtss2sd xmm0, xmm0                                                    ; +0x40, 0x1404325f0\ncomisd  xmm0, cs:qword_140622CE8                                       ; +0x44, 0x1404325f4\njb      loc_14043268F                                                  ; +0x4c, 0x1404325fc\nmov     rax, [rcx+398h]                                                ; +0x52, 0x140432602\nmov     dword ptr [rcx+394h], 0                                        ; +0x59, 0x140432609\nmov     [rsp+48h+arg_0], rbp                                           ; +0x63, 0x140432613\nmov     [rsp+48h+arg_8], rsi                                           ; +0x68, 0x140432618\nmov     rbp, [rax+168h]                                                ; +0x6d, 0x14043261d\nmov     rax, [rcx+2B0h]                                                ; +0x74, 0x140432624\nmov     rcx, rax                                                       ; +0x7b, 0x14043262b\nmov     rdi, rax                                                       ; +0x7e, 0x14043262e\nmov     rbx, [rax]                                                     ; +0x81, 0x140432631\ncall    cs:?getParticleDrawCost@CCParticleSystem@cocos2d@@QEAAHXZ; cocos2d::CCParticleSystem::getParticleDrawCost(void) ; +0x84, 0x140432634\nmov     rcx, rdi                                                       ; +0x8a, 0x14043263a\nmov     esi, eax                                                       ; +0x8d, 0x14043263d\ncall    qword ptr [rbx+5C0h]                                           ; +0x8f, 0x14043263f\nmov     rdx, [rdi]                                                     ; +0x95, 0x140432645\nmov     rcx, rdi                                                       ; +0x98, 0x140432648\nmov     ebx, eax                                                       ; +0x9b, 0x14043264b\ncall    qword ptr [rdx+378h]                                           ; +0x9d, 0x14043264d\nmov     r9d, esi                                                       ; +0xa3, 0x140432653\nlea     rcx, aIII_0; \"%i/%i\\n%i\"                                       ; +0xa6, 0x140432656\nmov     edx, eax                                                       ; +0xad, 0x14043265d\nmov     r8d, ebx                                                       ; +0xaf, 0x14043265f\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xb2, 0x140432662\nmov     rcx, rax                                                       ; +0xb8, 0x140432668\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xbb, 0x14043266b\nmov     rcx, [r14+398h]                                                ; +0xc1, 0x140432671\nmov     rdx, rax                                                       ; +0xc8, 0x140432678\nadd     rcx, 168h                                                      ; +0xcb, 0x14043267b\ncall    qword ptr [rbp+0]                                              ; +0xd2, 0x140432682\nmov     rsi, [rsp+48h+arg_8]                                           ; +0xd5, 0x140432685\nmov     rbp, [rsp+48h+arg_0]                                           ; +0xda, 0x14043268a\nmov     rcx, [r14+2B0h]                                                ; +0xdf, 0x14043268f\nmov     rax, [rcx]                                                     ; +0xe6, 0x140432696\ncall    qword ptr [rax+380h]                                           ; +0xe9, 0x140432699\nmovaps  xmm7, xmm0                                                     ; +0xef, 0x14043269f\nxorps   xmm1, xmm1                                                     ; +0xf2, 0x1404326a2\ncomiss  xmm1, xmm7                                                     ; +0xf5, 0x1404326a5\nja      loc_1404327E6                                                  ; +0xf8, 0x1404326a8\ncomiss  xmm1, dword ptr [r14+3ACh]                                     ; +0xfe, 0x1404326ae\naddss   xmm6, dword ptr [r14+320h]                                     ; +0x106, 0x1404326b6\nmovss   dword ptr [r14+320h], xmm6                                     ; +0x10f, 0x1404326bf\njbe     loc_14043277E                                                  ; +0x118, 0x1404326c8\nimul    rcx, cs:qword_1406C2F40, 343FDh                                ; +0x11e, 0x1404326ce\nmovss   xmm2, cs:dword_140623644                                       ; +0x129, 0x1404326d9\nmovss   xmm5, cs:flt_140622C24                                         ; +0x131, 0x1404326e1\nadd     rcx, 269EC3h                                                   ; +0x139, 0x1404326e9\nmov     rax, rcx                                                       ; +0x140, 0x1404326f0\nmov     cs:qword_1406C2F40, rcx                                        ; +0x143, 0x1404326f3\nshr     rax, 10h                                                       ; +0x14a, 0x1404326fa\nand     eax, 7FFFh                                                     ; +0x14e, 0x1404326fe\nmovd    xmm0, eax                                                      ; +0x153, 0x140432703\nmov     rax, [r14+2B0h]                                                ; +0x157, 0x140432707\ncvtdq2ps xmm0, xmm0                                                    ; +0x15e, 0x14043270e\nmovss   xmm3, dword ptr [rax+224h]                                     ; +0x161, 0x140432711\nmovss   xmm4, dword ptr [rax+220h]                                     ; +0x169, 0x140432719\ndivss   xmm0, xmm2                                                     ; +0x171, 0x140432721\naddss   xmm0, xmm0                                                     ; +0x175, 0x140432725\nsubss   xmm0, xmm5                                                     ; +0x179, 0x140432729\nmulss   xmm0, xmm3                                                     ; +0x17d, 0x14043272d\naddss   xmm0, xmm4                                                     ; +0x181, 0x140432731\ncomiss  xmm1, xmm0                                                     ; +0x185, 0x140432735\nja      short loc_140432775                                            ; +0x188, 0x140432738\nimul    rax, rcx, 343FDh                                               ; +0x18a, 0x14043273a\nadd     rax, 269EC3h                                                   ; +0x191, 0x140432741\nmov     cs:qword_1406C2F40, rax                                        ; +0x197, 0x140432747\nshr     rax, 10h                                                       ; +0x19e, 0x14043274e\nand     eax, 7FFFh                                                     ; +0x1a2, 0x140432752\nmovd    xmm0, eax                                                      ; +0x1a7, 0x140432757\ncvtdq2ps xmm0, xmm0                                                    ; +0x1ab, 0x14043275b\ndivss   xmm0, xmm2                                                     ; +0x1ae, 0x14043275e\naddss   xmm0, xmm0                                                     ; +0x1b2, 0x140432762\nsubss   xmm0, xmm5                                                     ; +0x1b6, 0x140432766\nmulss   xmm0, xmm3                                                     ; +0x1ba, 0x14043276a\naddss   xmm0, xmm4                                                     ; +0x1be, 0x14043276e\nmovaps  xmm1, xmm0                                                     ; +0x1c2, 0x140432772\nmovss   dword ptr [r14+3ACh], xmm1                                     ; +0x1c5, 0x140432775\nmov     rcx, [r14+2B0h]                                                ; +0x1ce, 0x14043277e\nlea     rdi, [r14+2B0h]                                                ; +0x1d5, 0x140432785\nmov     rax, [rcx]                                                     ; +0x1dc, 0x14043278c\ncall    qword ptr [rax+3C0h]                                           ; +0x1df, 0x14043278f\nmov     rcx, [r14+2B0h]                                                ; +0x1e5, 0x140432795\nmovaps  xmm6, xmm0                                                     ; +0x1ec, 0x14043279c\nmov     rax, [rcx]                                                     ; +0x1ef, 0x14043279f\ncall    qword ptr [rax+3B0h]                                           ; +0x1f2, 0x1404327a2\nmovss   xmm1, dword ptr [r14+320h]                                     ; +0x1f8, 0x1404327a8\naddss   xmm0, xmm6                                                     ; +0x201, 0x1404327b1\naddss   xmm0, dword ptr [r14+3ACh]                                     ; +0x205, 0x1404327b5\naddss   xmm0, xmm7                                                     ; +0x20e, 0x1404327be\ncomiss  xmm1, xmm0                                                     ; +0x212, 0x1404327c2\njbe     short loc_1404327E6                                            ; +0x215, 0x1404327c5\nmov     rcx, [rdi]                                                     ; +0x217, 0x1404327c7\nmov     dword ptr [r14+320h], 0                                        ; +0x21a, 0x1404327ca\nmov     dword ptr [r14+3ACh], 0BF800000h                               ; +0x225, 0x1404327d5\ncall    cs:?resetSystem@CCParticleSystem@cocos2d@@QEAAXXZ; cocos2d::CCParticleSystem::resetSystem(void) ; +0x230, 0x1404327e0\nmov     rbx, [rsp+48h+arg_10]                                          ; +0x236, 0x1404327e6\nmov     rdi, [rsp+48h+arg_18]                                          ; +0x23b, 0x1404327eb\nmovaps  xmm6, [rsp+48h+var_18]                                         ; +0x240, 0x1404327f0\nmovaps  xmm7, [rsp+48h+var_28]                                         ; +0x245, 0x1404327f5\nadd     rsp, 40h                                                       ; +0x24a, 0x1404327fa\npop     r14                                                            ; +0x24e, 0x1404327fe\nretn                                                                   ; +0x250, 0x140432800", "xrefs": ["<???> @ 0x1405e97e8", "<???> @ 0x1406a1440", "<???> @ 0x1406a1450", "<???> @ 0x1406d9ba8"], "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"}