{"type": "func", "start": 5438576, "end": 5438760, "name": "CreateParticlePopup::onSelectColor", "pseudocode": "// \n// CreateParticlePopup::onSelectColor from 0x52fc70 to 0x52fd28 (184 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 CreateParticlePopup::onSelectColor(CreateParticlePopup *a1, cocos2d::CCObject *a2)\n{\n  int v4; // r0\n  const cocos2d::ccColor3B *v5; // r0\n  unsigned int v6; // r3\n  int (*getStartColor)(void); // r3\n  float *v8; // r0\n  ColorSelectPopup *v9; // r5\n  void (__fastcall *setTag)(cocos2d::CCObject *__hidden, int); // r7\n  int v11; // r0\n  ColorSelectPopup_vtbl *v12; // r3\n  ColorAction *v13; // [sp+4h] [bp-8h]\n\n  v13 = (ColorAction *)a2;\n  v4 = a2->getTag(a2);\n  switch ( v4 )\n  {\n    case 0:\n      v5 = a1->m_previewLayer->getColor(a1->m_previewLayer);\n      LOBYTE(v6) = v5->b;\n      LOWORD(v13) = *(_WORD *)&v5->r;\nLABEL_8:\n      BYTE2(v13) = v6;\n      break;\n    case 1:\n      getStartColor = (int (*)(void))a1->m_particle->getStartColor;\nLABEL_7:\n      v8 = (float *)getStartColor();\n      v6 = (unsigned int)(float)(v8[2] * 255.0);\n      BYTE1(v13) = (unsigned int)(float)(v8[1] * 255.0);\n      LOBYTE(v13) = (unsigned int)(float)(*v8 * 255.0);\n      goto LABEL_8;\n    case 2:\n      getStartColor = (int (*)(void))a1->m_particle->getEndColor;\n      goto LABEL_7;\n  }\n  v9 = ColorSelectPopup::create(v13);\n  setTag = v9->setTag;\n  v11 = a2->getTag(a2);\n  setTag(v9, v11);\n  v12 = v9->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v9->m_delegate = &a1->ColorSelectDelegate;\n  v12->show(v9);\n}", "assembly": "; \n; CreateParticlePopup::onSelectColor from 0x52fc70 to 0x52fd28 (184 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\nLDR             R3, [R1]                                               ; +0x0, 0x52fc70\nPUSH            {R0-R2,R4-R7,LR}                                       ; +0x2, 0x52fc72\nMOV             R4, R0                                                 ; +0x4, 0x52fc74\nLDR             R3, [R3,#0x20]                                         ; +0x6, 0x52fc76\nMOV             R0, R1                                                 ; +0x8, 0x52fc78\nMOV             R6, R1                                                 ; +0xa, 0x52fc7a\nBLX             R3                                                     ; +0xc, 0x52fc7c\nCBNZ            R0, loc_52FC96                                         ; +0xe, 0x52fc7e\nLDR.W           R0, [R4,#0x238]                                        ; +0x10, 0x52fc80\nLDR             R3, [R0]                                               ; +0x14, 0x52fc84\nLDR.W           R3, [R3,#0x250]                                        ; +0x16, 0x52fc86\nBLX             R3                                                     ; +0x1a, 0x52fc8a\nLDRH            R2, [R0]                                               ; +0x1c, 0x52fc8c\nLDRB            R3, [R0,#2]                                            ; +0x1e, 0x52fc8e\nSTRH.W          R2, [SP,#0xC+var_8]                                    ; +0x20, 0x52fc90\nB               loc_52FCF2                                             ; +0x24, 0x52fc94\nCMP             R0, #1                                                 ; +0x26, 0x52fc96\nBNE             loc_52FCA6                                             ; +0x28, 0x52fc98\nLDR.W           R0, [R4,#0x20C]                                        ; +0x2a, 0x52fc9a\nLDR             R3, [R0]                                               ; +0x2e, 0x52fc9e\nLDR.W           R3, [R3,#0x29C]                                        ; +0x30, 0x52fca0\nB               loc_52FCB4                                             ; +0x34, 0x52fca4\nCMP             R0, #2                                                 ; +0x36, 0x52fca6\nBNE             loc_52FCF6                                             ; +0x38, 0x52fca8\nLDR.W           R0, [R4,#0x20C]                                        ; +0x3a, 0x52fcaa\nLDR             R3, [R0]                                               ; +0x3e, 0x52fcae\nLDR.W           R3, [R3,#0x2AC]                                        ; +0x40, 0x52fcb0\nBLX             R3                                                     ; +0x44, 0x52fcb4\nVLDR            S14, =255.0                                            ; +0x46, 0x52fcb6\nVLDR            S15, [R0,#4]                                           ; +0x4a, 0x52fcba\nVMUL.F32        S15, S15, S14                                          ; +0x4e, 0x52fcbe\nVCVT.U32.F32    S15, S15                                               ; +0x52, 0x52fcc2\nVMOV            R2, S15                                                ; +0x56, 0x52fcc6\nVLDR            S15, [R0,#8]                                           ; +0x5a, 0x52fcca\nVMUL.F32        S15, S15, S14                                          ; +0x5e, 0x52fcce\nVCVT.U32.F32    S15, S15                                               ; +0x62, 0x52fcd2\nVMOV            R3, S15                                                ; +0x66, 0x52fcd6\nVLDR            S15, [R0]                                              ; +0x6a, 0x52fcda\nSTRB.W          R2, [SP,#0xC+var_8+1]                                  ; +0x6e, 0x52fcde\nVMUL.F32        S15, S15, S14                                          ; +0x72, 0x52fce2\nVCVT.U32.F32    S15, S15                                               ; +0x76, 0x52fce6\nVMOV            R1, S15                                                ; +0x7a, 0x52fcea\nSTRB.W          R1, [SP,#0xC+var_8]                                    ; +0x7e, 0x52fcee\nSTRB.W          R3, [SP,#0xC+var_8+2]                                  ; +0x82, 0x52fcf2\nLDR             R0, [SP,#0xC+var_8]                                    ; +0x86, 0x52fcf6\nADD.W           R4, R4, #0x1F4                                         ; +0x88, 0x52fcf8\nBL              _ZN16ColorSelectPopup6createEN7cocos2d10_ccColor3BE; ColorSelectPopup::create(cocos2d::_ccColor3B) ; +0x8c, 0x52fcfc\nLDR             R3, [R0]                                               ; +0x90, 0x52fd00\nMOV             R5, R0                                                 ; +0x92, 0x52fd02\nMOV             R0, R6                                                 ; +0x94, 0x52fd04\nLDR             R7, [R3,#0x24]                                         ; +0x96, 0x52fd06\nLDR             R3, [R6]                                               ; +0x98, 0x52fd08\nLDR             R3, [R3,#0x20]                                         ; +0x9a, 0x52fd0a\nBLX             R3                                                     ; +0x9c, 0x52fd0c\nMOV             R1, R0                                                 ; +0x9e, 0x52fd0e\nMOV             R0, R5                                                 ; +0xa0, 0x52fd10\nBLX             R7                                                     ; +0xa2, 0x52fd12\nLDR             R3, [R5]                                               ; +0xa4, 0x52fd14\nSTR.W           R4, [R5,#0x2DC]                                        ; +0xa6, 0x52fd16\nMOV             R0, R5                                                 ; +0xaa, 0x52fd1a\nLDR.W           R3, [R3,#0x284]                                        ; +0xac, 0x52fd1c\nADD             SP, SP, #0xC                                           ; +0xb0, 0x52fd20\nPOP.W           {R4-R7,LR}                                             ; +0xb2, 0x52fd22\nBX              R3                                                     ; +0xb6, 0x52fd26", "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"}