{"type": "func", "start": 5446268, "end": 5446784, "name": "CreateParticlePopup::colorSelectClosed", "pseudocode": "// \n// CreateParticlePopup::colorSelectClosed from 0x531a7c to 0x531c80 (516 bytes)\n// \n// 1 xrefs:\n// > `non-virtual thunk to'CreateParticlePopup::colorSelectClosed @ 0x531c8c\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::colorSelectClosed(CreateParticlePopup *a1, cocos2d::CCNode *a2)\n{\n  int v4; // r0\n  void *m_pUserData; // r3\n  cocos2d::CCLabelBMFont *m_perfLogLabel; // r0\n  cocos2d::CCLabelBMFont_vtbl *v7; // r3\n  void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r4\n  cocos2d::CCParticleSystemQuad *m_particle; // r5\n  cocos2d::CCParticleSystemQuad_vtbl *v10; // r3\n  cocos2d::CCParticleSystemQuad_vtbl **v11; // r0\n  cocos2d::CCParticleSystemQuad *v12; // r4\n  unsigned int v13; // r1\n  int v14; // r2\n  int v15; // r3\n  cocos2d::CCParticleSystemQuad *v16; // r0\n  cocos2d::CCParticleSystemQuad_vtbl *v17; // r3\n  cocos2d::CCParticleSystemQuad_vtbl **v18; // r0\n  unsigned int v19; // r1\n  int v20; // r2\n  int v21; // r3\n  __int16 v22; // [sp+4h] [bp-Ch] BYREF\n  unsigned __int8 v23; // [sp+6h] [bp-Ah]\n  __int16 v24; // [sp+8h] [bp-8h] BYREF\n  char v25; // [sp+Ah] [bp-6h]\n\n  v4 = a2->getTag(a2);\n  m_pUserData = a2[2].m_pUserData;\n  v22 = (__int16)m_pUserData;\n  v23 = BYTE2(m_pUserData);\n  if ( v4 )\n  {\n    if ( v4 == 1 )\n    {\n      CreateParticlePopup::updateParticleValueForType(a1, (float)(unsigned __int8)v22 / 255.0, StartR, nullptr);\n      CreateParticlePopup::updateParticleValueForType(a1, (float)HIBYTE(v22) / 255.0, StartG, nullptr);\n      CreateParticlePopup::updateParticleValueForType(a1, (float)v23 / 255.0, StartB, nullptr);\n      CreateParticlePopup::updateInputNodeStringForType(a1, StartR);\n      CreateParticlePopup::updateInputNodeStringForType(a1, StartG);\n      CreateParticlePopup::updateInputNodeStringForType(a1, StartB);\n      CreateParticlePopup::updateSliderForType(a1, StartR);\n      CreateParticlePopup::updateSliderForType(a1, StartG);\n      CreateParticlePopup::updateSliderForType(a1, StartB);\n      a1->m_startColorSprite->setColor(a1->m_startColorSprite, (const cocos2d::ccColor3B *)&v22);\n      m_particle = a1->m_particle;\n      v10 = m_particle->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n      m_particle = (cocos2d::CCParticleSystemQuad *)((char *)m_particle + 612);\n      v11 = (cocos2d::CCParticleSystemQuad_vtbl **)v10->getStartColor(a1->m_particle);\n      v12 = a1->m_particle;\n      v13 = (unsigned int)v11[1];\n      v14 = (int)v11[2];\n      v15 = (int)v11[3];\n      m_particle->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = *v11;\n      m_particle->m_uID = v13;\n      m_particle->m_nLuaID = v14;\n      m_particle->m_nTag = v15;\n      v16 = v12;\n      v17 = v12->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n      v12 = (cocos2d::CCParticleSystemQuad *)((char *)v12 + 628);\n      v18 = (cocos2d::CCParticleSystemQuad_vtbl **)v17->getEndColor(v16);\n      v19 = (unsigned int)v18[1];\n      v20 = (int)v18[2];\n      v21 = (int)v18[3];\n      v12->cocos2d::CCParticleSystem::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = *v18;\n      v12->m_uID = v19;\n      v12->m_nLuaID = v20;\n      v12->m_nTag = v21;\n    }\n    else if ( v4 == 2 )\n    {\n      CreateParticlePopup::updateParticleValueForType(a1, (float)(unsigned __int8)v22 / 255.0, EndR, nullptr);\n      CreateParticlePopup::updateParticleValueForType(a1, (float)HIBYTE(v22) / 255.0, EndG, nullptr);\n      CreateParticlePopup::updateParticleValueForType(a1, (float)v23 / 255.0, EndB, nullptr);\n      CreateParticlePopup::updateInputNodeStringForType(a1, EndR);\n      CreateParticlePopup::updateInputNodeStringForType(a1, EndG);\n      CreateParticlePopup::updateInputNodeStringForType(a1, EndB);\n      CreateParticlePopup::updateSliderForType(a1, EndR);\n      CreateParticlePopup::updateSliderForType(a1, EndG);\n      CreateParticlePopup::updateSliderForType(a1, EndB);\n      a1->m_endColorSprite->setColor(a1->m_endColorSprite, (const cocos2d::ccColor3B *)&v22);\n    }\n  }\n  else\n  {\n    a1->m_previewLayer->setColor(a1->m_previewLayer, (const cocos2d::ccColor3B *)&v22);\n    a1->m_particleColorSprite->setColor(a1->m_particleColorSprite, (const cocos2d::ccColor3B *)&v22);\n    m_perfLogLabel = a1->m_perfLogLabel;\n    v7 = m_perfLogLabel->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    v24 = ~v22;\n    setColor = v7->setColor;\n    v25 = ~v23;\n    setColor(m_perfLogLabel, (const cocos2d::ccColor3B *)&v24);\n  }\n}", "assembly": "; \n; CreateParticlePopup::colorSelectClosed from 0x531a7c to 0x531c80 (516 bytes)\n; \n; 1 xrefs:\n; > `non-virtual thunk to'CreateParticlePopup::colorSelectClosed @ 0x531c8c\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            {R4-R6,LR}                                             ; +0x0, 0x531a7c\nMOV             R4, R0                                                 ; +0x2, 0x531a7e\nLDR             R6, =(__stack_chk_guard_ptr - 0x531A8E)                ; +0x4, 0x531a80\nMOV             R0, R1                                                 ; +0x6, 0x531a82\nVPUSH           {D8}                                                   ; +0x8, 0x531a84\nMOV             R5, R1                                                 ; +0xc, 0x531a88\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xe, 0x531a8a\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x10, 0x531a8c\nLDR             R3, [R6]                                               ; +0x12, 0x531a8e\nSUB             SP, SP, #0x10                                          ; +0x14, 0x531a90\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x16, 0x531a92\nLDR             R3, [R1]                                               ; +0x18, 0x531a94\nLDR             R3, [R3,#0x20]                                         ; +0x1a, 0x531a96\nBLX             R3                                                     ; +0x1c, 0x531a98\nLDR.W           R3, [R5,#0x2D8]                                        ; +0x1e, 0x531a9a\nSTRH.W          R3, [SP,#0x10+var_C]                                   ; +0x22, 0x531a9e\nLSRS            R3, R3, #0x10                                          ; +0x26, 0x531aa2\nSTRB.W          R3, [SP,#0x10+var_A]                                   ; +0x28, 0x531aa4\nCBNZ            R0, loc_531AF6                                         ; +0x2c, 0x531aa8\nLDR.W           R0, [R4,#0x238]                                        ; +0x2e, 0x531aaa\nADD             R5, SP, #0x10+var_C                                    ; +0x32, 0x531aae\nMOV             R1, R5                                                 ; +0x34, 0x531ab0\nLDR             R3, [R0]                                               ; +0x36, 0x531ab2\nLDR.W           R3, [R3,#0x258]                                        ; +0x38, 0x531ab4\nBLX             R3                                                     ; +0x3c, 0x531ab8\nLDR.W           R0, [R4,#0x270]                                        ; +0x3e, 0x531aba\nMOV             R1, R5                                                 ; +0x42, 0x531abe\nLDR             R3, [R0]                                               ; +0x44, 0x531ac0\nLDR.W           R3, [R3,#0x1D8]                                        ; +0x46, 0x531ac2\nBLX             R3                                                     ; +0x4a, 0x531ac6\nLDR.W           R0, [R4,#0x28C]                                        ; +0x4c, 0x531ac8\nLDRB.W          R2, [SP,#0x10+var_C+1]                                 ; +0x50, 0x531acc\nLDRB.W          R1, [SP,#0x10+var_C]                                   ; +0x54, 0x531ad0\nLDR             R3, [R0]                                               ; +0x58, 0x531ad4\nMVNS            R2, R2                                                 ; +0x5a, 0x531ad6\nSTRB.W          R2, [SP,#0x10+var_8+1]                                 ; +0x5c, 0x531ad8\nMVNS            R1, R1                                                 ; +0x60, 0x531adc\nSTRB.W          R1, [SP,#0x10+var_8]                                   ; +0x62, 0x531ade\nLDR.W           R4, [R3,#0x210]                                        ; +0x66, 0x531ae2\nADD             R1, SP, #0x10+var_8                                    ; +0x6a, 0x531ae6\nLDRB.W          R3, [SP,#0x10+var_A]                                   ; +0x6c, 0x531ae8\nMVNS            R3, R3                                                 ; +0x70, 0x531aec\nSTRB.W          R3, [SP,#0x10+var_6]                                   ; +0x72, 0x531aee\nBLX             R4                                                     ; +0x76, 0x531af2\nB               loc_531C6C                                             ; +0x78, 0x531af4\nCMP             R0, #1                                                 ; +0x7a, 0x531af6\nBNE             loc_531BCA                                             ; +0x7c, 0x531af8\nLDRB.W          R3, [SP,#0x10+var_C+1]                                 ; +0x7e, 0x531afa\nADD             R5, SP, #0x10+var_s0                                   ; +0x82, 0x531afe\nVLDR            S15, =255.0                                            ; +0x84, 0x531b00\nMOV             R0, R4                                                 ; +0x88, 0x531b04\nMOVS            R2, #0x1A                                              ; +0x8a, 0x531b06\nVMOV            S17, R3                                                ; +0x8c, 0x531b08\nLDRB.W          R3, [SP,#0x10+var_A]                                   ; +0x90, 0x531b0c\nVCVT.F32.S32    S17, S17                                               ; +0x94, 0x531b10\nVMOV            S16, R3                                                ; +0x98, 0x531b14\nLDRB.W          R3, [R5,#-0xC]!                                        ; +0x9c, 0x531b18\nVMOV            S14, R3                                                ; +0xa0, 0x531b1c\nMOVS            R3, #0                                                 ; +0xa4, 0x531b20\nVCVT.F32.S32    S14, S14                                               ; +0xa6, 0x531b22\nVCVT.F32.S32    S16, S16                                               ; +0xaa, 0x531b26\nVDIV.F32        S17, S17, S15                                          ; +0xae, 0x531b2a\nVDIV.F32        S16, S16, S15                                          ; +0xb2, 0x531b2e\nVDIV.F32        S15, S14, S15                                          ; +0xb6, 0x531b32\nVMOV            R1, S15                                                ; +0xba, 0x531b36\nBL              _ZN19CreateParticlePopup26updateParticleValueForTypeEf15gjParticleValuePN7cocos2d20CCParticleSystemQuadE; CreateParticlePopup::updateParticleValueForType(float,gjParticleValue,cocos2d::CCParticleSystemQuad *) ; +0xbe, 0x531b3a\nMOV             R0, R4                                                 ; +0xc2, 0x531b3e\nVMOV            R1, S17                                                ; +0xc4, 0x531b40\nMOVS            R2, #0x1C                                              ; +0xc8, 0x531b44\nMOVS            R3, #0                                                 ; +0xca, 0x531b46\nBL              _ZN19CreateParticlePopup26updateParticleValueForTypeEf15gjParticleValuePN7cocos2d20CCParticleSystemQuadE; CreateParticlePopup::updateParticleValueForType(float,gjParticleValue,cocos2d::CCParticleSystemQuad *) ; +0xcc, 0x531b48\nMOVS            R2, #0x1E                                              ; +0xd0, 0x531b4c\nMOVS            R3, #0                                                 ; +0xd2, 0x531b4e\nMOV             R0, R4                                                 ; +0xd4, 0x531b50\nVMOV            R1, S16                                                ; +0xd6, 0x531b52\nBL              _ZN19CreateParticlePopup26updateParticleValueForTypeEf15gjParticleValuePN7cocos2d20CCParticleSystemQuadE; CreateParticlePopup::updateParticleValueForType(float,gjParticleValue,cocos2d::CCParticleSystemQuad *) ; +0xda, 0x531b56\nMOV             R0, R4                                                 ; +0xde, 0x531b5a\nMOVS            R1, #0x1A                                              ; +0xe0, 0x531b5c\nBL              _ZN19CreateParticlePopup28updateInputNodeStringForTypeE15gjParticleValue; CreateParticlePopup::updateInputNodeStringForType(gjParticleValue) ; +0xe2, 0x531b5e\nMOV             R0, R4                                                 ; +0xe6, 0x531b62\nMOVS            R1, #0x1C                                              ; +0xe8, 0x531b64\nBL              _ZN19CreateParticlePopup28updateInputNodeStringForTypeE15gjParticleValue; CreateParticlePopup::updateInputNodeStringForType(gjParticleValue) ; +0xea, 0x531b66\nMOV             R0, R4                                                 ; +0xee, 0x531b6a\nMOVS            R1, #0x1E                                              ; +0xf0, 0x531b6c\nBL              _ZN19CreateParticlePopup28updateInputNodeStringForTypeE15gjParticleValue; CreateParticlePopup::updateInputNodeStringForType(gjParticleValue) ; +0xf2, 0x531b6e\nMOV             R0, R4                                                 ; +0xf6, 0x531b72\nMOVS            R1, #0x1A                                              ; +0xf8, 0x531b74\nBL              _ZN19CreateParticlePopup19updateSliderForTypeE15gjParticleValue; CreateParticlePopup::updateSliderForType(gjParticleValue) ; +0xfa, 0x531b76\nMOV             R0, R4                                                 ; +0xfe, 0x531b7a\nMOVS            R1, #0x1C                                              ; +0x100, 0x531b7c\nBL              _ZN19CreateParticlePopup19updateSliderForTypeE15gjParticleValue; CreateParticlePopup::updateSliderForType(gjParticleValue) ; +0x102, 0x531b7e\nMOV             R0, R4                                                 ; +0x106, 0x531b82\nMOVS            R1, #0x1E                                              ; +0x108, 0x531b84\nBL              _ZN19CreateParticlePopup19updateSliderForTypeE15gjParticleValue; CreateParticlePopup::updateSliderForType(gjParticleValue) ; +0x10a, 0x531b86\nLDR.W           R0, [R4,#0x274]                                        ; +0x10e, 0x531b8a\nMOV             R1, R5                                                 ; +0x112, 0x531b8e\nLDR             R3, [R0]                                               ; +0x114, 0x531b90\nLDR.W           R3, [R3,#0x1D8]                                        ; +0x116, 0x531b92\nBLX             R3                                                     ; +0x11a, 0x531b96\nLDR.W           R5, [R4,#0x20C]                                        ; +0x11c, 0x531b98\nLDR             R3, [R5]                                               ; +0x120, 0x531b9c\nMOV             R0, R5                                                 ; +0x122, 0x531b9e\nADD.W           R5, R5, #0x264                                         ; +0x124, 0x531ba0\nLDR.W           R3, [R3,#0x29C]                                        ; +0x128, 0x531ba4\nBLX             R3                                                     ; +0x12c, 0x531ba8\nLDR.W           R4, [R4,#0x20C]                                        ; +0x12e, 0x531baa\nLDM             R0, {R0-R3}                                            ; +0x132, 0x531bae\nSTM.W           R5, {R0-R3}                                            ; +0x134, 0x531bb0\nMOV             R0, R4                                                 ; +0x138, 0x531bb4\nLDR             R3, [R4]                                               ; +0x13a, 0x531bb6\nADD.W           R4, R4, #0x274                                         ; +0x13c, 0x531bb8\nLDR.W           R3, [R3,#0x2AC]                                        ; +0x140, 0x531bbc\nBLX             R3                                                     ; +0x144, 0x531bc0\nLDM             R0, {R0-R3}                                            ; +0x146, 0x531bc2\nSTM.W           R4, {R0-R3}                                            ; +0x148, 0x531bc4\nB               loc_531C6C                                             ; +0x14c, 0x531bc8\nCMP             R0, #2                                                 ; +0x14e, 0x531bca\nBNE             loc_531C6C                                             ; +0x150, 0x531bcc\nLDRB.W          R3, [SP,#0x10+var_C+1]                                 ; +0x152, 0x531bce\nADD             R5, SP, #0x10+var_s0                                   ; +0x156, 0x531bd2\nVLDR            S15, =255.0                                            ; +0x158, 0x531bd4\nMOV             R0, R4                                                 ; +0x15c, 0x531bd8\nMOVS            R2, #0x22 ; '\"'                                        ; +0x15e, 0x531bda\nVMOV            S17, R3                                                ; +0x160, 0x531bdc\nLDRB.W          R3, [SP,#0x10+var_A]                                   ; +0x164, 0x531be0\nVCVT.F32.S32    S17, S17                                               ; +0x168, 0x531be4\nVMOV            S16, R3                                                ; +0x16c, 0x531be8\nLDRB.W          R3, [R5,#-0xC]!                                        ; +0x170, 0x531bec\nVMOV            S14, R3                                                ; +0x174, 0x531bf0\nMOVS            R3, #0                                                 ; +0x178, 0x531bf4\nVCVT.F32.S32    S14, S14                                               ; +0x17a, 0x531bf6\nVCVT.F32.S32    S16, S16                                               ; +0x17e, 0x531bfa\nVDIV.F32        S17, S17, S15                                          ; +0x182, 0x531bfe\nVDIV.F32        S16, S16, S15                                          ; +0x186, 0x531c02\nVDIV.F32        S15, S14, S15                                          ; +0x18a, 0x531c06\nVMOV            R1, S15                                                ; +0x18e, 0x531c0a\nBL              _ZN19CreateParticlePopup26updateParticleValueForTypeEf15gjParticleValuePN7cocos2d20CCParticleSystemQuadE; CreateParticlePopup::updateParticleValueForType(float,gjParticleValue,cocos2d::CCParticleSystemQuad *) ; +0x192, 0x531c0e\nMOV             R0, R4                                                 ; +0x196, 0x531c12\nVMOV            R1, S17                                                ; +0x198, 0x531c14\nMOVS            R2, #0x24 ; '$'                                        ; +0x19c, 0x531c18\nMOVS            R3, #0                                                 ; +0x19e, 0x531c1a\nBL              _ZN19CreateParticlePopup26updateParticleValueForTypeEf15gjParticleValuePN7cocos2d20CCParticleSystemQuadE; CreateParticlePopup::updateParticleValueForType(float,gjParticleValue,cocos2d::CCParticleSystemQuad *) ; +0x1a0, 0x531c1c\nMOVS            R3, #0                                                 ; +0x1a4, 0x531c20\nMOVS            R2, #0x26 ; '&'                                        ; +0x1a6, 0x531c22\nMOV             R0, R4                                                 ; +0x1a8, 0x531c24\nVMOV            R1, S16                                                ; +0x1aa, 0x531c26\nBL              _ZN19CreateParticlePopup26updateParticleValueForTypeEf15gjParticleValuePN7cocos2d20CCParticleSystemQuadE; CreateParticlePopup::updateParticleValueForType(float,gjParticleValue,cocos2d::CCParticleSystemQuad *) ; +0x1ae, 0x531c2a\nMOV             R0, R4                                                 ; +0x1b2, 0x531c2e\nMOVS            R1, #0x22 ; '\"'                                        ; +0x1b4, 0x531c30\nBL              _ZN19CreateParticlePopup28updateInputNodeStringForTypeE15gjParticleValue; CreateParticlePopup::updateInputNodeStringForType(gjParticleValue) ; +0x1b6, 0x531c32\nMOV             R0, R4                                                 ; +0x1ba, 0x531c36\nMOVS            R1, #0x24 ; '$'                                        ; +0x1bc, 0x531c38\nBL              _ZN19CreateParticlePopup28updateInputNodeStringForTypeE15gjParticleValue; CreateParticlePopup::updateInputNodeStringForType(gjParticleValue) ; +0x1be, 0x531c3a\nMOV             R0, R4                                                 ; +0x1c2, 0x531c3e\nMOVS            R1, #0x26 ; '&'                                        ; +0x1c4, 0x531c40\nBL              _ZN19CreateParticlePopup28updateInputNodeStringForTypeE15gjParticleValue; CreateParticlePopup::updateInputNodeStringForType(gjParticleValue) ; +0x1c6, 0x531c42\nMOV             R0, R4                                                 ; +0x1ca, 0x531c46\nMOVS            R1, #0x22 ; '\"'                                        ; +0x1cc, 0x531c48\nBL              _ZN19CreateParticlePopup19updateSliderForTypeE15gjParticleValue; CreateParticlePopup::updateSliderForType(gjParticleValue) ; +0x1ce, 0x531c4a\nMOV             R0, R4                                                 ; +0x1d2, 0x531c4e\nMOVS            R1, #0x24 ; '$'                                        ; +0x1d4, 0x531c50\nBL              _ZN19CreateParticlePopup19updateSliderForTypeE15gjParticleValue; CreateParticlePopup::updateSliderForType(gjParticleValue) ; +0x1d6, 0x531c52\nMOV             R0, R4                                                 ; +0x1da, 0x531c56\nMOVS            R1, #0x26 ; '&'                                        ; +0x1dc, 0x531c58\nBL              _ZN19CreateParticlePopup19updateSliderForTypeE15gjParticleValue; CreateParticlePopup::updateSliderForType(gjParticleValue) ; +0x1de, 0x531c5a\nLDR.W           R0, [R4,#0x278]                                        ; +0x1e2, 0x531c5e\nMOV             R1, R5                                                 ; +0x1e6, 0x531c62\nLDR             R3, [R0]                                               ; +0x1e8, 0x531c64\nLDR.W           R3, [R3,#0x1D8]                                        ; +0x1ea, 0x531c66\nBLX             R3                                                     ; +0x1ee, 0x531c6a\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x1f0, 0x531c6c\nLDR             R3, [R6]                                               ; +0x1f2, 0x531c6e\nCMP             R2, R3                                                 ; +0x1f4, 0x531c70\nBEQ             loc_531C78                                             ; +0x1f6, 0x531c72\nBLX             __stack_chk_fail                                       ; +0x1f8, 0x531c74\nADD             SP, SP, #0x10                                          ; +0x1fc, 0x531c78\nVPOP            {D8}                                                   ; +0x1fe, 0x531c7a\nPOP             {R4-R6,PC}                                             ; +0x202, 0x531c7e", "xrefs": ["`non-virtual thunk to'CreateParticlePopup::colorSelectClosed @ 0x531c8c"], "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"}