{"type": "func", "start": 4299635024, "end": 4299635259, "name": "CreateParticlePopup::updateColorSprite", "pseudocode": "// \n// CreateParticlePopup::updateColorSprite from 0x100473950 to 0x100473a3b (235 bytes)\n// \n// 0 xrefs:\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 __fastcall CreateParticlePopup::updateColorSprite(CreateParticlePopup *a1, int a2)\n{\n  __int64 v2; // rax\n  float *v3; // rax\n  __m128 v4; // xmm0\n  cocos2d::CCSprite *m_endColorSprite; // rdi\n  cocos2d::CCSprite_vtbl *v6; // rax\n  char *v7; // rsi\n  float *v8; // rax\n  __m128 v9; // xmm0\n  _QWORD v10[2]; // [rsp+0h] [rbp-10h] BYREF\n\n  v10[0] = v2;\n  if ( a2 == 2 )\n  {\n    v8 = (float *)((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getEndColor)(a1->m_particle);\n    v9 = (__m128)*(unsigned __int64 *)v8;\n    BYTE6(v10[0]) = (int)(float)(255.0 * v8[2]);\n    WORD2(v10[0]) = ((unsigned __int8)(int)(float)(_mm_movehdup_ps(v9).f32[0] * 255.0) << 8)\n                  | (unsigned __int8)(int)(float)(v9.f32[0] * 255.0);\n    m_endColorSprite = a1->m_endColorSprite;\n    v6 = m_endColorSprite->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    v7 = (char *)v10 + 4;\n  }\n  else\n  {\n    if ( a2 != 1 )\n      return;\n    v3 = (float *)((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getStartColor)(a1->m_particle);\n    v4 = (__m128)*(unsigned __int64 *)v3;\n    BYTE2(v10[0]) = (int)(float)(255.0 * v3[2]);\n    LOWORD(v10[0]) = ((unsigned __int8)(int)(float)(_mm_movehdup_ps(v4).f32[0] * 255.0) << 8)\n                   | (unsigned __int8)(int)(float)(v4.f32[0] * 255.0);\n    m_endColorSprite = a1->m_startColorSprite;\n    v6 = m_endColorSprite->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    v7 = (char *)v10;\n  }\n  ((void (__fastcall *)(cocos2d::CCSprite *, char *))v6->setColor)(m_endColorSprite, v7);\n}", "assembly": "; \n; CreateParticlePopup::updateColorSprite from 0x100473950 to 0x100473a3b (235 bytes)\n; \n; 0 xrefs:\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    rbp                                                            ; +0x0, 0x100473950\nmov     rbp, rsp                                                       ; +0x1, 0x100473951\npush    rbx                                                            ; +0x4, 0x100473954\npush    rax                                                            ; +0x5, 0x100473955\ncmp     esi, 2                                                         ; +0x6, 0x100473956\njz      short loc_1004739CA                                            ; +0x9, 0x100473959\ncmp     esi, 1                                                         ; +0xb, 0x10047395b\njnz     loc_100473A34                                                  ; +0xe, 0x10047395e\nmov     rax, [rdi+2B0h]                                                ; +0x14, 0x100473964\nmov     rcx, [rax]                                                     ; +0x1b, 0x10047396b\nmov     rbx, rdi                                                       ; +0x1e, 0x10047396e\nmov     rdi, rax                                                       ; +0x21, 0x100473971\ncall    qword ptr [rcx+538h]                                           ; +0x24, 0x100473974\nmovsd   xmm0, qword ptr [rax]                                          ; +0x2a, 0x10047397a\nmovss   xmm1, cs:dword_100815C10                                       ; +0x2e, 0x10047397e\nmovshdup xmm2, xmm0                                                    ; +0x36, 0x100473986\nmulss   xmm0, xmm1                                                     ; +0x3a, 0x10047398a\ncvttss2si ecx, xmm0                                                    ; +0x3e, 0x10047398e\nmulss   xmm2, xmm1                                                     ; +0x42, 0x100473992\ncvttss2si edx, xmm2                                                    ; +0x46, 0x100473996\nmulss   xmm1, dword ptr [rax+8]                                        ; +0x4a, 0x10047399a\ncvttss2si eax, xmm1                                                    ; +0x4f, 0x10047399f\nmov     [rbp+var_E], al                                                ; +0x53, 0x1004739a3\nshl     eax, 10h                                                       ; +0x56, 0x1004739a6\nmovzx   edx, dl                                                        ; +0x59, 0x1004739a9\nshl     edx, 8                                                         ; +0x5c, 0x1004739ac\nor      edx, eax                                                       ; +0x5f, 0x1004739af\nmovzx   eax, cl                                                        ; +0x61, 0x1004739b1\nor      eax, edx                                                       ; +0x64, 0x1004739b4\nmov     [rbp+var_10], ax                                               ; +0x66, 0x1004739b6\nmov     rdi, [rbx+370h]                                                ; +0x6a, 0x1004739ba\nmov     rax, [rdi]                                                     ; +0x71, 0x1004739c1\nlea     rsi, [rbp+var_10]                                              ; +0x74, 0x1004739c4\njmp     short loc_100473A2E                                            ; +0x78, 0x1004739c8\nmov     rax, [rdi+2B0h]                                                ; +0x7a, 0x1004739ca\nmov     rcx, [rax]                                                     ; +0x81, 0x1004739d1\nmov     rbx, rdi                                                       ; +0x84, 0x1004739d4\nmov     rdi, rax                                                       ; +0x87, 0x1004739d7\ncall    qword ptr [rcx+558h]                                           ; +0x8a, 0x1004739da\nmovsd   xmm0, qword ptr [rax]                                          ; +0x90, 0x1004739e0\nmovss   xmm1, cs:dword_100815C10                                       ; +0x94, 0x1004739e4\nmovshdup xmm2, xmm0                                                    ; +0x9c, 0x1004739ec\nmulss   xmm0, xmm1                                                     ; +0xa0, 0x1004739f0\ncvttss2si ecx, xmm0                                                    ; +0xa4, 0x1004739f4\nmulss   xmm2, xmm1                                                     ; +0xa8, 0x1004739f8\ncvttss2si edx, xmm2                                                    ; +0xac, 0x1004739fc\nmulss   xmm1, dword ptr [rax+8]                                        ; +0xb0, 0x100473a00\ncvttss2si eax, xmm1                                                    ; +0xb5, 0x100473a05\nmov     [rbp+var_A], al                                                ; +0xb9, 0x100473a09\nshl     eax, 10h                                                       ; +0xbc, 0x100473a0c\nmovzx   edx, dl                                                        ; +0xbf, 0x100473a0f\nshl     edx, 8                                                         ; +0xc2, 0x100473a12\nor      edx, eax                                                       ; +0xc5, 0x100473a15\nmovzx   eax, cl                                                        ; +0xc7, 0x100473a17\nor      eax, edx                                                       ; +0xca, 0x100473a1a\nmov     [rbp+var_C], ax                                                ; +0xcc, 0x100473a1c\nmov     rdi, [rbx+378h]                                                ; +0xd0, 0x100473a20\nmov     rax, [rdi]                                                     ; +0xd7, 0x100473a27\nlea     rsi, [rbp+var_C]                                               ; +0xda, 0x100473a2a\ncall    qword ptr [rax+3B0h]                                           ; +0xde, 0x100473a2e\nadd     rsp, 8                                                         ; +0xe4, 0x100473a34\npop     rbx                                                            ; +0xe8, 0x100473a38\npop     rbp                                                            ; +0xe9, 0x100473a39\nretn                                                                   ; +0xea, 0x100473a3a", "xrefs": [], "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"}