{"type": "func", "start": 4299633856, "end": 4299634080, "name": "CreateParticlePopup::onSelectColor", "pseudocode": "// \n// CreateParticlePopup::onSelectColor from 0x1004734c0 to 0x1004735a0 (224 bytes)\n// \n// 3 xrefs:\n// > CreateParticlePopup::init @ 0x10046f6ed\n// > CreateParticlePopup::init @ 0x100470503\n// > CreateParticlePopup::init @ 0x100470664\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::onSelectColor(CreateParticlePopup *a1, cocos2d::CCObject *a2)\n{\n  int v3; // edi\n  int v4; // eax\n  unsigned __int16 *v5; // rax\n  float *v6; // rax\n  ColorSelectPopup *v7; // r15\n  unsigned int v8; // eax\n\n  v3 = (int)a2;\n  v4 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);\n  switch ( v4 )\n  {\n    case 2:\n      v6 = (float *)((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getEndColor)(a1->m_particle);\n      goto LABEL_7;\n    case 1:\n      v6 = (float *)((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->getStartColor)(a1->m_particle);\nLABEL_7:\n      v3 = ((int)(float)(255.0 * v6[2]) << 16)\n         | ((unsigned __int8)(int)(float)(_mm_movehdup_ps((__m128)*(unsigned __int64 *)v6).f32[0] * 255.0) << 8)\n         | (unsigned __int8)(int)(float)(COERCE_FLOAT(*(_QWORD *)v6) * 255.0);\n      break;\n    case 0:\n      v5 = (unsigned __int16 *)((__int64 (__fastcall *)(ParticlePreviewLayer *))a1->m_previewLayer->getColor)(a1->m_previewLayer);\n      v3 = *v5 | (*((unsigned __int8 *)v5 + 2) << 16);\n      break;\n  }\n  v7 = ColorSelectPopup::create_2((cocos2d::ccColor3B)v3);\n  v8 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);\n  ((void (__fastcall *)(ColorSelectPopup *, _QWORD))v7->setTag)(v7, v8);\n  v7->m_delegate = &a1->ColorSelectDelegate;\n  ((void (__fastcall *)(ColorSelectPopup *))v7->show)(v7);\n}", "assembly": "; \n; CreateParticlePopup::onSelectColor from 0x1004734c0 to 0x1004735a0 (224 bytes)\n; \n; 3 xrefs:\n; > CreateParticlePopup::init @ 0x10046f6ed\n; > CreateParticlePopup::init @ 0x100470503\n; > CreateParticlePopup::init @ 0x100470664\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, 0x1004734c0\nmov     rbp, rsp                                                       ; +0x1, 0x1004734c1\npush    r15                                                            ; +0x4, 0x1004734c4\npush    r14                                                            ; +0x6, 0x1004734c6\npush    rbx                                                            ; +0x8, 0x1004734c8\npush    rax                                                            ; +0x9, 0x1004734c9\nmov     r14, rsi                                                       ; +0xa, 0x1004734ca\nmov     rbx, rdi                                                       ; +0xd, 0x1004734cd\nmov     rax, [rsi]                                                     ; +0x10, 0x1004734d0\nmov     rdi, rsi                                                       ; +0x13, 0x1004734d3\ncall    qword ptr [rax+40h]                                            ; +0x16, 0x1004734d6\ncmp     eax, 2                                                         ; +0x19, 0x1004734d9\njz      short loc_100473517                                            ; +0x1c, 0x1004734dc\ncmp     eax, 1                                                         ; +0x1e, 0x1004734de\njz      short loc_100473505                                            ; +0x21, 0x1004734e1\ntest    eax, eax                                                       ; +0x23, 0x1004734e3\njnz     short loc_100473560                                            ; +0x25, 0x1004734e5\nmov     rdi, [rbx+300h]                                                ; +0x27, 0x1004734e7\nmov     rax, [rdi]                                                     ; +0x2e, 0x1004734ee\ncall    qword ptr [rax+4A0h]                                           ; +0x31, 0x1004734f1\nmovzx   ecx, word ptr [rax]                                            ; +0x37, 0x1004734f7\nmovzx   edi, byte ptr [rax+2]                                          ; +0x3a, 0x1004734fa\nshl     edi, 10h                                                       ; +0x3e, 0x1004734fe\nor      edi, ecx                                                       ; +0x41, 0x100473501\njmp     short loc_100473560                                            ; +0x43, 0x100473503\nmov     rdi, [rbx+2B0h]                                                ; +0x45, 0x100473505\nmov     rax, [rdi]                                                     ; +0x4c, 0x10047350c\ncall    qword ptr [rax+538h]                                           ; +0x4f, 0x10047350f\njmp     short loc_100473527                                            ; +0x55, 0x100473515\nmov     rdi, [rbx+2B0h]                                                ; +0x57, 0x100473517\nmov     rax, [rdi]                                                     ; +0x5e, 0x10047351e\ncall    qword ptr [rax+558h]                                           ; +0x61, 0x100473521\nmovsd   xmm0, qword ptr [rax]                                          ; +0x67, 0x100473527\nmovss   xmm1, cs:dword_100815C10                                       ; +0x6b, 0x10047352b\nmovshdup xmm2, xmm0                                                    ; +0x73, 0x100473533\nmulss   xmm0, xmm1                                                     ; +0x77, 0x100473537\ncvttss2si ecx, xmm0                                                    ; +0x7b, 0x10047353b\nmulss   xmm2, xmm1                                                     ; +0x7f, 0x10047353f\ncvttss2si edx, xmm2                                                    ; +0x83, 0x100473543\nmulss   xmm1, dword ptr [rax+8]                                        ; +0x87, 0x100473547\ncvttss2si eax, xmm1                                                    ; +0x8c, 0x10047354c\nshl     eax, 10h                                                       ; +0x90, 0x100473550\nmovzx   edx, dl                                                        ; +0x93, 0x100473553\nshl     edx, 8                                                         ; +0x96, 0x100473556\nor      edx, eax                                                       ; +0x99, 0x100473559\nmovzx   edi, cl                                                        ; +0x9b, 0x10047355b\nor      edi, edx                                                       ; +0x9e, 0x10047355e\ncall    ColorSelectPopup__create_2                                     ; +0xa0, 0x100473560\nmov     r15, rax                                                       ; +0xa5, 0x100473565\nmov     rax, [r14]                                                     ; +0xa8, 0x100473568\nmov     rdi, r14                                                       ; +0xab, 0x10047356b\ncall    qword ptr [rax+40h]                                            ; +0xae, 0x10047356e\nmov     rcx, [r15]                                                     ; +0xb1, 0x100473571\nmov     rdi, r15                                                       ; +0xb4, 0x100473574\nmov     esi, eax                                                       ; +0xb7, 0x100473577\ncall    qword ptr [rcx+48h]                                            ; +0xb9, 0x100473579\nadd     rbx, 280h                                                      ; +0xbc, 0x10047357c\nmov     [r15+418h], rbx                                                ; +0xc3, 0x100473583\nmov     rax, [r15]                                                     ; +0xca, 0x10047358a\nmov     rdi, r15                                                       ; +0xcd, 0x10047358d\nadd     rsp, 8                                                         ; +0xd0, 0x100473590\npop     rbx                                                            ; +0xd4, 0x100473594\npop     r14                                                            ; +0xd5, 0x100473595\npop     r15                                                            ; +0xd7, 0x100473597\npop     rbp                                                            ; +0xd9, 0x100473599\njmp     qword ptr [rax+508h]                                           ; +0xda, 0x10047359a", "xrefs": ["CreateParticlePopup::init @ 0x10046f6ed", "CreateParticlePopup::init @ 0x100470503", "CreateParticlePopup::init @ 0x100470664"], "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"}