{"type": "func", "start": 5374770848, "end": 5374771461, "name": "CreateParticlePopup::update", "pseudocode": "// \n// CreateParticlePopup::update from 0x1405c7ea0 to 0x1405c8105 (613 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x1407f8870\n// > <???> @ 0x1408e09a8\n// > <???> @ 0x1408e09b8\n// > <???> @ 0x14092e328\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:34:51 +0000\n// \n\nvoid __fastcall CreateParticlePopup::update(__int64 a1, float a2)\n{\n  float v3; // xmm0_4\n  cocos2d::CCParticleSystem *v4; // rsi\n  __int64 v5; // r14\n  void (__fastcall **v6)(__int64, const char *); // rbp\n  float ParticleDrawCost; // xmm0_4\n  void (__fastcall *v8)(cocos2d::CCParticleSystem *); // rbx\n  double v9; // xmm6_8\n  unsigned int v10; // edi\n  unsigned int v11; // eax\n  cocos2d::CCString *v12; // rax\n  const char *CString; // rax\n  double v14; // xmm0_8\n  float v15; // xmm8_4\n  float v16; // xmm7_4\n  __int64 v17; // rax\n  unsigned __int64 v18; // rcx\n  float v19; // xmm2_4\n  float v20; // xmm3_4\n  float v21; // xmm7_4\n  __int64 v22; // rbx\n  double v23; // xmm0_8\n  cocos2d::CCParticleSystem *v24; // rcx\n\n  if ( *(_BYTE *)(a1 + 976) )\n  {\n    v3 = a2 + *(float *)(a1 + 980);\n    *(float *)(a1 + 980) = v3;\n    if ( v3 >= 0.1 )\n    {\n      v4 = *(cocos2d::CCParticleSystem **)(a1 + 712);\n      *(_DWORD *)(a1 + 980) = 0;\n      v5 = *(_QWORD *)(a1 + 984);\n      v6 = *(void (__fastcall ***)(__int64, const char *))(v5 + 360);\n      ParticleDrawCost = cocos2d::CCParticleSystem::getParticleDrawCost(v4);\n      v8 = *(void (__fastcall **)(cocos2d::CCParticleSystem *))(*(_QWORD *)v4 + 904LL);\n      v9 = (float)(ParticleDrawCost / 10.0);\n      v10 = (*(__int64 (__fastcall **)(cocos2d::CCParticleSystem *))(*(_QWORD *)v4 + 1488LL))(v4);\n      v8(v4);\n      v12 = cocos2d::CCString::createWithFormat(\"%i/%i\\n%.0f\", v11, v10, v9);\n      CString = cocos2d::CCString::getCString(v12);\n      (*v6)(v5 + 360, CString);\n    }\n  }\n  v14 = (*(double (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 712) + 912LL))(*(_QWORD *)(a1 + 712));\n  v15 = *(float *)&v14;\n  if ( *(float *)&v14 >= 0.0 )\n  {\n    *(float *)(a1 + 824) = a2 + *(float *)(a1 + 824);\n    v16 = *(float *)(a1 + 1004);\n    if ( v16 < 0.0 )\n    {\n      v17 = *(_QWORD *)(a1 + 712);\n      v18 = 214013 * qword_14090C080 + 2531011;\n      qword_14090C080 = v18;\n      v19 = *(float *)(v17 + 544);\n      v20 = *(float *)(v17 + 548);\n      if ( (float)((float)((float)((float)((float)((float)((v18 >> 16) & 0x7FFF) / 32767.0)\n                                         + (float)((float)((v18 >> 16) & 0x7FFF) / 32767.0))\n                                 - 1.0)\n                         * v20)\n                 + v19) >= 0.0 )\n      {\n        qword_14090C080 = 214013 * v18 + 2531011;\n        v21 = (float)(((214013 * v18 + 2531011) >> 16) & 0x7FFF);\n        v16 = (float)((float)((float)((float)(v21 / 32767.0) + (float)(v21 / 32767.0)) - 1.0) * v20) + v19;\n      }\n      else\n      {\n        v16 = 0.0;\n      }\n      *(float *)(a1 + 1004) = v16;\n    }\n    v22 = *(_QWORD *)(a1 + 712);\n    v23 = (*(double (__fastcall **)(__int64))(*(_QWORD *)v22 + 976LL))(v22);\n    if ( *(float *)(a1 + 824) > (float)((float)((float)((*(float (__fastcall **)(__int64))(*(_QWORD *)v22 + 960LL))(v22)\n                                                      + *(float *)&v23)\n                                              + v16)\n                                      + v15) )\n    {\n      v24 = *(cocos2d::CCParticleSystem **)(a1 + 712);\n      *(_DWORD *)(a1 + 824) = 0;\n      *(_DWORD *)(a1 + 1004) = -1082130432;\n      cocos2d::CCParticleSystem::resetSystem(v24);\n    }\n  }\n}", "assembly": "; \n; CreateParticlePopup::update from 0x1405c7ea0 to 0x1405c8105 (613 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x1407f8870\n; > <???> @ 0x1408e09a8\n; > <???> @ 0x1408e09b8\n; > <???> @ 0x14092e328\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:34:51 +0000\n; \nmov     rax, rsp                                                       ; +0x0, 0x1405c7ea0\npush    rbx                                                            ; +0x3, 0x1405c7ea3\npush    rdi                                                            ; +0x4, 0x1405c7ea4\npush    r15                                                            ; +0x5, 0x1405c7ea5\nsub     rsp, 50h                                                       ; +0x7, 0x1405c7ea7\ncmp     byte ptr [rcx+3D0h], 0                                         ; +0xb, 0x1405c7eab\nmov     r15, rcx                                                       ; +0x12, 0x1405c7eb2\nmovaps  xmmword ptr [rax-28h], xmm6                                    ; +0x15, 0x1405c7eb5\nmovaps  xmmword ptr [rax-38h], xmm7                                    ; +0x19, 0x1405c7eb9\nmovaps  xmm7, xmm1                                                     ; +0x1d, 0x1405c7ebd\nmovaps  xmmword ptr [rax-48h], xmm8                                    ; +0x20, 0x1405c7ec0\njz      loc_1405C7F92                                                  ; +0x25, 0x1405c7ec5\nmovaps  xmm0, xmm1                                                     ; +0x2b, 0x1405c7ecb\naddss   xmm0, dword ptr [rcx+3D4h]                                     ; +0x2e, 0x1405c7ece\nmovss   dword ptr [rcx+3D4h], xmm0                                     ; +0x36, 0x1405c7ed6\ncvtss2sd xmm0, xmm0                                                    ; +0x3e, 0x1405c7ede\ncomisd  xmm0, cs:qword_140835148                                       ; +0x42, 0x1405c7ee2\njb      loc_1405C7F92                                                  ; +0x4a, 0x1405c7eea\nmov     [rax+8], rbp                                                   ; +0x50, 0x1405c7ef0\nmov     [rax+10h], rsi                                                 ; +0x54, 0x1405c7ef4\nmov     rsi, [rcx+2C8h]                                                ; +0x58, 0x1405c7ef8\nmov     dword ptr [rcx+3D4h], 0                                        ; +0x5f, 0x1405c7eff\nmov     [rax+18h], r14                                                 ; +0x69, 0x1405c7f09\nmov     r14, [rcx+3D8h]                                                ; +0x6d, 0x1405c7f0d\nmov     rcx, rsi                                                       ; +0x74, 0x1405c7f14\nmov     rbp, [r14+168h]                                                ; +0x77, 0x1405c7f17\ncall    cs:?getParticleDrawCost@CCParticleSystem@cocos2d@@QEAAMXZ; cocos2d::CCParticleSystem::getParticleDrawCost(void) ; +0x7e, 0x1405c7f1e\nmov     rax, [rsi]                                                     ; +0x84, 0x1405c7f24\nxorps   xmm6, xmm6                                                     ; +0x87, 0x1405c7f27\ndivss   xmm0, cs:flt_1408354EC                                         ; +0x8a, 0x1405c7f2a\nmov     rcx, rsi                                                       ; +0x92, 0x1405c7f32\nmov     rdx, [rax+5D0h]                                                ; +0x95, 0x1405c7f35\nmov     rbx, [rax+388h]                                                ; +0x9c, 0x1405c7f3c\ncvtss2sd xmm6, xmm0                                                    ; +0xa3, 0x1405c7f43\ncall    rdx                                                            ; +0xa7, 0x1405c7f47\nmov     rcx, rsi                                                       ; +0xa9, 0x1405c7f49\nmov     edi, eax                                                       ; +0xac, 0x1405c7f4c\ncall    rbx                                                            ; +0xae, 0x1405c7f4e\nmov     edx, eax                                                       ; +0xb0, 0x1405c7f50\nlea     rcx, aII0f; \"%i/%i\\n%.0f\"                                      ; +0xb2, 0x1405c7f52\nmovaps  xmm3, xmm6                                                     ; +0xb9, 0x1405c7f59\nmovq    r9, xmm6                                                       ; +0xbc, 0x1405c7f5c\nmov     r8d, edi                                                       ; +0xc1, 0x1405c7f61\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xc4, 0x1405c7f64\nmov     rcx, rax                                                       ; +0xca, 0x1405c7f6a\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xcd, 0x1405c7f6d\nmov     rdx, rax                                                       ; +0xd3, 0x1405c7f73\nlea     rcx, [r14+168h]                                                ; +0xd6, 0x1405c7f76\ncall    qword ptr [rbp+0]                                              ; +0xdd, 0x1405c7f7d\nmov     r14, [rsp+68h+arg_10]                                          ; +0xe0, 0x1405c7f80\nmov     rsi, [rsp+68h+arg_8]                                           ; +0xe8, 0x1405c7f88\nmov     rbp, [rsp+68h+arg_0]                                           ; +0xed, 0x1405c7f8d\nmov     rcx, [r15+2C8h]                                                ; +0xf2, 0x1405c7f92\nmov     rax, [rcx]                                                     ; +0xf9, 0x1405c7f99\ncall    qword ptr [rax+390h]                                           ; +0xfc, 0x1405c7f9c\nmovaps  xmm8, xmm0                                                     ; +0x102, 0x1405c7fa2\nxorps   xmm1, xmm1                                                     ; +0x106, 0x1405c7fa6\ncomiss  xmm1, xmm8                                                     ; +0x109, 0x1405c7fa9\nja      loc_1405C80EC                                                  ; +0x10d, 0x1405c7fad\naddss   xmm7, dword ptr [r15+338h]                                     ; +0x113, 0x1405c7fb3\nmovss   dword ptr [r15+338h], xmm7                                     ; +0x11c, 0x1405c7fbc\nmovss   xmm7, dword ptr [r15+3ECh]                                     ; +0x125, 0x1405c7fc5\ncomiss  xmm1, xmm7                                                     ; +0x12e, 0x1405c7fce\njbe     loc_1405C8089                                                  ; +0x131, 0x1405c7fd1\nimul    rcx, cs:qword_14090C080, 343FDh                                ; +0x137, 0x1405c7fd7\nmovss   xmm4, cs:dword_140835BDC                                       ; +0x142, 0x1405c7fe2\nmovss   xmm5, cs:flt_140835080                                         ; +0x14a, 0x1405c7fea\nmov     rax, [r15+2C8h]                                                ; +0x152, 0x1405c7ff2\nadd     rcx, 269EC3h                                                   ; +0x159, 0x1405c7ff9\nmov     cs:qword_14090C080, rcx                                        ; +0x160, 0x1405c8000\nmovss   xmm2, dword ptr [rax+220h]                                     ; +0x167, 0x1405c8007\nmovss   xmm3, dword ptr [rax+224h]                                     ; +0x16f, 0x1405c800f\nmov     rax, rcx                                                       ; +0x177, 0x1405c8017\nshr     rax, 10h                                                       ; +0x17a, 0x1405c801a\nand     eax, 7FFFh                                                     ; +0x17e, 0x1405c801e\nmovd    xmm0, eax                                                      ; +0x183, 0x1405c8023\ncvtdq2ps xmm0, xmm0                                                    ; +0x187, 0x1405c8027\ndivss   xmm0, xmm4                                                     ; +0x18a, 0x1405c802a\naddss   xmm0, xmm0                                                     ; +0x18e, 0x1405c802e\nsubss   xmm0, xmm5                                                     ; +0x192, 0x1405c8032\nmulss   xmm0, xmm3                                                     ; +0x196, 0x1405c8036\naddss   xmm0, xmm2                                                     ; +0x19a, 0x1405c803a\ncomiss  xmm1, xmm0                                                     ; +0x19e, 0x1405c803e\njbe     short loc_1405C8048                                            ; +0x1a1, 0x1405c8041\nxorps   xmm7, xmm7                                                     ; +0x1a3, 0x1405c8043\njmp     short loc_1405C8080                                            ; +0x1a6, 0x1405c8046\nimul    rax, rcx, 343FDh                                               ; +0x1a8, 0x1405c8048\nadd     rax, 269EC3h                                                   ; +0x1af, 0x1405c804f\nmov     cs:qword_14090C080, rax                                        ; +0x1b5, 0x1405c8055\nshr     rax, 10h                                                       ; +0x1bc, 0x1405c805c\nand     eax, 7FFFh                                                     ; +0x1c0, 0x1405c8060\nmovd    xmm7, eax                                                      ; +0x1c5, 0x1405c8065\ncvtdq2ps xmm7, xmm7                                                    ; +0x1c9, 0x1405c8069\ndivss   xmm7, xmm4                                                     ; +0x1cc, 0x1405c806c\naddss   xmm7, xmm7                                                     ; +0x1d0, 0x1405c8070\nsubss   xmm7, xmm5                                                     ; +0x1d4, 0x1405c8074\nmulss   xmm7, xmm3                                                     ; +0x1d8, 0x1405c8078\naddss   xmm7, xmm2                                                     ; +0x1dc, 0x1405c807c\nmovss   dword ptr [r15+3ECh], xmm7                                     ; +0x1e0, 0x1405c8080\nmov     rbx, [r15+2C8h]                                                ; +0x1e9, 0x1405c8089\nlea     rdi, [r15+2C8h]                                                ; +0x1f0, 0x1405c8090\nmov     rcx, rbx                                                       ; +0x1f7, 0x1405c8097\nmov     rax, [rbx]                                                     ; +0x1fa, 0x1405c809a\ncall    qword ptr [rax+3D0h]                                           ; +0x1fd, 0x1405c809d\nmov     rax, [rbx]                                                     ; +0x203, 0x1405c80a3\nmov     rcx, rbx                                                       ; +0x206, 0x1405c80a6\nmovaps  xmm6, xmm0                                                     ; +0x209, 0x1405c80a9\ncall    qword ptr [rax+3C0h]                                           ; +0x20c, 0x1405c80ac\nmovss   xmm1, dword ptr [r15+338h]                                     ; +0x212, 0x1405c80b2\naddss   xmm0, xmm6                                                     ; +0x21b, 0x1405c80bb\naddss   xmm0, xmm7                                                     ; +0x21f, 0x1405c80bf\naddss   xmm0, xmm8                                                     ; +0x223, 0x1405c80c3\ncomiss  xmm1, xmm0                                                     ; +0x228, 0x1405c80c8\njbe     short loc_1405C80EC                                            ; +0x22b, 0x1405c80cb\nmov     rcx, [rdi]                                                     ; +0x22d, 0x1405c80cd\nmov     dword ptr [r15+338h], 0                                        ; +0x230, 0x1405c80d0\nmov     dword ptr [r15+3ECh], 0BF800000h                               ; +0x23b, 0x1405c80db\ncall    cs:?resetSystem@CCParticleSystem@cocos2d@@QEAAXXZ; cocos2d::CCParticleSystem::resetSystem(void) ; +0x246, 0x1405c80e6\nmovaps  xmm6, [rsp+68h+var_28]                                         ; +0x24c, 0x1405c80ec\nmovaps  xmm7, [rsp+68h+var_38]                                         ; +0x251, 0x1405c80f1\nmovaps  xmm8, [rsp+68h+var_48]                                         ; +0x256, 0x1405c80f6\nadd     rsp, 50h                                                       ; +0x25c, 0x1405c80fc\npop     r15                                                            ; +0x260, 0x1405c8100\npop     rdi                                                            ; +0x262, 0x1405c8102\npop     rbx                                                            ; +0x263, 0x1405c8103\nretn                                                                   ; +0x264, 0x1405c8104", "xrefs": ["<???> @ 0x1407f8870", "<???> @ 0x1408e09a8", "<???> @ 0x1408e09b8", "<???> @ 0x14092e328"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}