{"type": "func", "start": 4297907712, "end": 4297907984, "name": "CreateParticlePopup::onSelectColor", "pseudocode": "// \n// CreateParticlePopup::onSelectColor from 0x1002cde00 to 0x1002cdf10 (272 bytes)\n// \n// 2 xrefs:\n// > CreateParticlePopup::init @ 0x1002caf14\n// > CreateParticlePopup::init @ 0x1002cb838\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 v4; // w0\n  unsigned __int32 v5; // w8\n  unsigned __int16 *v6; // x0\n  __int64 (*getEndColor)(void); // x8\n  __int64 v8; // x0\n  int32x2_t v9; // d0\n  ColorSelectPopup *v10; // x21\n  __int64 v11; // x0\n\n  v4 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);\n  switch ( v4 )\n  {\n    case 2:\n      getEndColor = (__int64 (*)(void))a1->m_particle->getEndColor;\n      goto LABEL_7;\n    case 1:\n      getEndColor = (__int64 (*)(void))a1->m_particle->getStartColor;\nLABEL_7:\n      v8 = getEndColor();\n      v9 = (int32x2_t)vshl_u32(\n                        (uint32x2_t)vcvt_s32_f32(vmul_f32(*(float32x2_t *)(v8 + 4), (float32x2_t)vdup_n_s32(0x437F0000u))),\n                        (uint32x2_t)0x1000000008LL);\n      v5 = vorr_s8((int8x8_t)vdup_lane_s32(v9, 1), (int8x8_t)v9).u32[0] | (int)(float)(*(float *)v8 * 255.0);\n      break;\n    case 0:\n      v6 = (unsigned __int16 *)((__int64 (__fastcall *)(ParticlePreviewLayer *))a1->m_previewLayer->getColor)(a1->m_previewLayer);\n      v5 = *v6 | (*((unsigned __int8 *)v6 + 2) << 16);\n      break;\n  }\n  v10 = ColorSelectPopup::create_2((cocos2d::ccColor3B)(v5 & 0xFFFFFF));\n  v11 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);\n  ((void (__fastcall *)(ColorSelectPopup *, __int64))v10->setTag)(v10, v11);\n  v10->m_delegate = &a1->ColorSelectDelegate;\n  ((void (__fastcall *)(ColorSelectPopup *))v10->show)(v10);\n}", "assembly": "; \n; CreateParticlePopup::onSelectColor from 0x1002cde00 to 0x1002cdf10 (272 bytes)\n; \n; 2 xrefs:\n; > CreateParticlePopup::init @ 0x1002caf14\n; > CreateParticlePopup::init @ 0x1002cb838\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             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x1002cde00\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1002cde04\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1002cde08\nADD             X29, SP, #0x20                                         ; +0xc, 0x1002cde0c\nMOV             X20, X1                                                ; +0x10, 0x1002cde10\nMOV             X19, X0                                                ; +0x14, 0x1002cde14\nLDR             X8, [X1]                                               ; +0x18, 0x1002cde18\nLDR             X8, [X8,#0x40]                                         ; +0x1c, 0x1002cde1c\nMOV             X0, X1                                                 ; +0x20, 0x1002cde20\nBLR             X8                                                     ; +0x24, 0x1002cde24\nCMP             W0, #2                                                 ; +0x28, 0x1002cde28\nB.EQ            loc_1002CDE6C                                          ; +0x2c, 0x1002cde2c\nCMP             W0, #1                                                 ; +0x30, 0x1002cde30\nB.EQ            loc_1002CDE5C                                          ; +0x34, 0x1002cde34\nCBNZ            W0, loc_1002CDEBC                                      ; +0x38, 0x1002cde38\nLDR             X0, [X19,#0x300]                                       ; +0x3c, 0x1002cde3c\nLDR             X8, [X0]                                               ; +0x40, 0x1002cde40\nLDR             X8, [X8,#0x4A0]                                        ; +0x44, 0x1002cde44\nBLR             X8                                                     ; +0x48, 0x1002cde48\nLDRB            W8, [X0,#2]                                            ; +0x4c, 0x1002cde4c\nLDRH            W9, [X0]                                               ; +0x50, 0x1002cde50\nORR             W8, W9, W8,LSL#16                                      ; +0x54, 0x1002cde54\nB               loc_1002CDEBC                                          ; +0x58, 0x1002cde58\nLDR             X0, [X19,#0x2B0]                                       ; +0x5c, 0x1002cde5c\nLDR             X8, [X0]                                               ; +0x60, 0x1002cde60\nLDR             X8, [X8,#0x538]                                        ; +0x64, 0x1002cde64\nB               loc_1002CDE78                                          ; +0x68, 0x1002cde68\nLDR             X0, [X19,#0x2B0]                                       ; +0x6c, 0x1002cde6c\nLDR             X8, [X0]                                               ; +0x70, 0x1002cde70\nLDR             X8, [X8,#0x558]                                        ; +0x74, 0x1002cde74\nBLR             X8                                                     ; +0x78, 0x1002cde78\nLDR             S0, [X0]                                               ; +0x7c, 0x1002cde7c\nMOV             W8, #0x437F0000                                        ; +0x80, 0x1002cde80\nDUP             V1.2S, W8                                              ; +0x84, 0x1002cde84\nFMOV            S2, W8                                                 ; +0x88, 0x1002cde88\nFMUL            S0, S0, S2                                             ; +0x8c, 0x1002cde8c\nFCVTZS          W8, S0                                                 ; +0x90, 0x1002cde90\nLDUR            D0, [X0,#4]                                            ; +0x94, 0x1002cde94\nFMUL            V0.2S, V0.2S, V1.2S                                    ; +0x98, 0x1002cde98\nFCVTZS          V0.2S, V0.2S                                           ; +0x9c, 0x1002cde9c\nADRP            X9, #qword_1006442A8@PAGE                              ; +0xa0, 0x1002cdea0\nLDR             D1, [X9,#qword_1006442A8@PAGEOFF]                      ; +0xa4, 0x1002cdea4\nUSHL            V0.2S, V0.2S, V1.2S                                    ; +0xa8, 0x1002cdea8\nDUP             V1.2S, V0.S[1]                                         ; +0xac, 0x1002cdeac\nORR             V0.8B, V1.8B, V0.8B                                    ; +0xb0, 0x1002cdeb0\nFMOV            W9, S0                                                 ; +0xb4, 0x1002cdeb4\nORR             W8, W9, W8                                             ; +0xb8, 0x1002cdeb8\nAND             X0, X8, #0xFFFFFF                                      ; +0xbc, 0x1002cdebc\nBL              ColorSelectPopup__create_2                             ; +0xc0, 0x1002cdec0\nMOV             X21, X0                                                ; +0xc4, 0x1002cdec4\nLDR             X8, [X20]                                              ; +0xc8, 0x1002cdec8\nLDR             X8, [X8,#0x40]                                         ; +0xcc, 0x1002cdecc\nMOV             X0, X20                                                ; +0xd0, 0x1002cded0\nBLR             X8                                                     ; +0xd4, 0x1002cded4\nMOV             X1, X0                                                 ; +0xd8, 0x1002cded8\nLDR             X8, [X21]                                              ; +0xdc, 0x1002cdedc\nLDR             X8, [X8,#0x48]                                         ; +0xe0, 0x1002cdee0\nMOV             X0, X21                                                ; +0xe4, 0x1002cdee4\nBLR             X8                                                     ; +0xe8, 0x1002cdee8\nADD             X8, X19, #0x280                                        ; +0xec, 0x1002cdeec\nSTR             X8, [X21,#0x418]                                       ; +0xf0, 0x1002cdef0\nLDR             X8, [X21]                                              ; +0xf4, 0x1002cdef4\nLDR             X1, [X8,#0x508]                                        ; +0xf8, 0x1002cdef8\nMOV             X0, X21                                                ; +0xfc, 0x1002cdefc\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x100, 0x1002cdf00\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x104, 0x1002cdf04\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0x108, 0x1002cdf08\nBR              X1                                                     ; +0x10c, 0x1002cdf0c", "xrefs": ["CreateParticlePopup::init @ 0x1002caf14", "CreateParticlePopup::init @ 0x1002cb838"], "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"}