{"type": "func", "start": 10224892, "end": 10225176, "name": "CreateParticlePopup::onSelectColor", "pseudocode": "// \n// CreateParticlePopup::onSelectColor from 0x9c04fc to 0x9c0618 (284 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x62d78\n// > CreateParticlePopup::init @ 0x9c5e2c\n// > CreateParticlePopup::init @ 0x9c6818\n// > CreateParticlePopup::init @ 0x9c6904\n// > <???> @ 0x122b330\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::onSelectColor(CreateParticlePopup *a1, cocos2d::CCObject *a2)\n{\n  int v4; // w0\n  ColorSelectPopup *v5; // x19\n  cocos2d::CCObject *v6; // x0\n  int (__fastcall *getTag)(const cocos2d::CCObject *__hidden); // x1\n  void (__fastcall *setTag)(cocos2d::CCObject *__hidden, int); // x20\n  unsigned int v9; // w0\n  const cocos2d::ccColor3B *v10; // x0\n  __int64 (*getStartColor)(void); // x1\n  float *v12; // x0\n  ColorAction *v13; // [xsp+38h] [xbp+38h]\n\n  v4 = a2->getTag(a2);\n  switch ( v4 )\n  {\n    case 0:\n      v10 = a1->m_previewLayer->getColor(a1->m_previewLayer);\n      LOWORD(v13) = *(_WORD *)&v10->r;\n      BYTE2(v13) = v10->b;\n      break;\n    case 1:\n      getStartColor = (__int64 (*)(void))a1->m_particle->getStartColor;\n      goto LABEL_7;\n    case 2:\n      getStartColor = (__int64 (*)(void))a1->m_particle->getEndColor;\nLABEL_7:\n      v12 = (float *)getStartColor();\n      BYTE1(v13) = (unsigned int)(float)(v12[1] * 255.0);\n      BYTE2(v13) = (unsigned int)(float)(v12[2] * 255.0);\n      LOBYTE(v13) = (unsigned int)(float)(*v12 * 255.0);\n      break;\n  }\n  v5 = ColorSelectPopup::create(v13);\n  v6 = a2;\n  getTag = a2->getTag;\n  setTag = v5->setTag;\n  v9 = getTag(v6);\n  setTag(v5, v9);\n  v5->m_delegate = &a1->ColorSelectDelegate;\n  v5->show(v5);\n}", "assembly": "; \n; CreateParticlePopup::onSelectColor from 0x9c04fc to 0x9c0618 (284 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x62d78\n; > CreateParticlePopup::init @ 0x9c5e2c\n; > CreateParticlePopup::init @ 0x9c6818\n; > CreateParticlePopup::init @ 0x9c6904\n; > <???> @ 0x122b330\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\nSTP             X29, X30, [SP,#var_40]!                                ; +0x0, 0x9c04fc\nMOV             X29, SP                                                ; +0x4, 0x9c0500\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x8, 0x9c0504\nSTR             X21, [SP,#0x40+var_20]                                 ; +0xc, 0x9c0508\nMOV             X20, X1                                                ; +0x10, 0x9c050c\nMOV             X21, X0                                                ; +0x14, 0x9c0510\nMOV             X0, X1                                                 ; +0x18, 0x9c0514\nLDR             X1, [X1]                                               ; +0x1c, 0x9c0518\nLDR             X1, [X1,#0x40]                                         ; +0x20, 0x9c051c\nBLR             X1                                                     ; +0x24, 0x9c0520\nCBZ             W0, loc_9C0590                                         ; +0x28, 0x9c0524\nCMP             W0, #1                                                 ; +0x2c, 0x9c0528\nB.EQ            loc_9C0604                                             ; +0x30, 0x9c052c\nCMP             W0, #2                                                 ; +0x34, 0x9c0530\nB.EQ            loc_9C05B8                                             ; +0x38, 0x9c0534\nLDR             X0, [X29,#0x40+var_8]                                  ; +0x3c, 0x9c0538\nADD             X21, X21, #0x280                                       ; +0x40, 0x9c053c\nBL              _ZN16ColorSelectPopup6createEN7cocos2d10_ccColor3BE; ColorSelectPopup::create(cocos2d::_ccColor3B) ; +0x44, 0x9c0540\nMOV             X19, X0                                                ; +0x48, 0x9c0544\nLDR             X1, [X20]                                              ; +0x4c, 0x9c0548\nMOV             X0, X20                                                ; +0x50, 0x9c054c\nLDR             X2, [X19]                                              ; +0x54, 0x9c0550\nLDR             X1, [X1,#0x40]                                         ; +0x58, 0x9c0554\nLDR             X20, [X2,#0x48]                                        ; +0x5c, 0x9c0558\nBLR             X1                                                     ; +0x60, 0x9c055c\nMOV             W1, W0                                                 ; +0x64, 0x9c0560\nMOV             X0, X19                                                ; +0x68, 0x9c0564\nBLR             X20                                                    ; +0x6c, 0x9c0568\nSTR             X21, [X19,#0x430]                                      ; +0x70, 0x9c056c\nLDR             X1, [X19]                                              ; +0x74, 0x9c0570\nMOV             X0, X19                                                ; +0x78, 0x9c0574\nLDR             X1, [X1,#0x508]                                        ; +0x7c, 0x9c0578\nBLR             X1                                                     ; +0x80, 0x9c057c\nLDR             X21, [SP,#0x40+var_20]                                 ; +0x84, 0x9c0580\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x88, 0x9c0584\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x8c, 0x9c0588\nRET                                                                    ; +0x90, 0x9c058c\nLDR             X1, [X21,#0x300]                                       ; +0x94, 0x9c0590\nMOV             X0, X1                                                 ; +0x98, 0x9c0594\nLDR             X1, [X1]                                               ; +0x9c, 0x9c0598\nLDR             X1, [X1,#0x4A0]                                        ; +0xa0, 0x9c059c\nBLR             X1                                                     ; +0xa4, 0x9c05a0\nLDRH            W1, [X0]                                               ; +0xa8, 0x9c05a4\nLDRB            W0, [X0,#2]                                            ; +0xac, 0x9c05a8\nSTRH            W1, [X29,#0x40+var_8]                                  ; +0xb0, 0x9c05ac\nSTRB            W0, [X29,#0x40+var_8+2]                                ; +0xb4, 0x9c05b0\nB               loc_9C0538                                             ; +0xb8, 0x9c05b4\nLDR             X1, [X21,#0x2B0]                                       ; +0xbc, 0x9c05b8\nMOV             X0, X1                                                 ; +0xc0, 0x9c05bc\nLDR             X1, [X1]                                               ; +0xc4, 0x9c05c0\nLDR             X1, [X1,#0x558]                                        ; +0xc8, 0x9c05c4\nBLR             X1                                                     ; +0xcc, 0x9c05c8\nLDR             S3, =0x437F0000                                        ; +0xd0, 0x9c05cc\nLDR             S2, [X0,#4]                                            ; +0xd4, 0x9c05d0\nLDR             S1, [X0,#8]                                            ; +0xd8, 0x9c05d4\nLDR             S0, [X0]                                               ; +0xdc, 0x9c05d8\nFMUL            S2, S2, S3                                             ; +0xe0, 0x9c05dc\nFMUL            S1, S1, S3                                             ; +0xe4, 0x9c05e0\nFMUL            S0, S0, S3                                             ; +0xe8, 0x9c05e4\nFCVTZU          W2, S2                                                 ; +0xec, 0x9c05e8\nFCVTZU          W1, S1                                                 ; +0xf0, 0x9c05ec\nFCVTZU          W0, S0                                                 ; +0xf4, 0x9c05f0\nSTRB            W2, [X29,#0x40+var_8+1]                                ; +0xf8, 0x9c05f4\nSTRB            W1, [X29,#0x40+var_8+2]                                ; +0xfc, 0x9c05f8\nSTRB            W0, [X29,#0x40+var_8]                                  ; +0x100, 0x9c05fc\nB               loc_9C0538                                             ; +0x104, 0x9c0600\nLDR             X1, [X21,#0x2B0]                                       ; +0x108, 0x9c0604\nMOV             X0, X1                                                 ; +0x10c, 0x9c0608\nLDR             X1, [X1]                                               ; +0x110, 0x9c060c\nLDR             X1, [X1,#0x538]                                        ; +0x114, 0x9c0610\nB               loc_9C05C8                                             ; +0x118, 0x9c0614", "xrefs": ["<???> @ 0x62d78", "CreateParticlePopup::init @ 0x9c5e2c", "CreateParticlePopup::init @ 0x9c6818", "CreateParticlePopup::init @ 0x9c6904", "<???> @ 0x122b330"], "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"}