{"type": "func", "start": 5448816, "end": 5449024, "name": "CreateParticlePopup::onClose", "pseudocode": "// \n// CreateParticlePopup::onClose from 0x532470 to 0x532540 (208 bytes)\n// \n// 1 xrefs:\n// > CreateParticlePopup::keyBackClicked @ 0x532546\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::onClose(CreateParticlePopup *a1, cocos2d::CCObject *a2)\n{\n  ParticleGameObject *m_targetObject; // r5\n  ParticleGameObject *v4; // r0\n  ParticleGameObject *v5; // r8\n  cocos2d::CCParticleSystemQuad *v6; // r9\n  _DWORD v7[3]; // [sp+0h] [bp-Ch] BYREF\n\n  v7[0] = a1;\n  v7[1] = a2;\n  CreateParticlePopup::willClose(a1);\n  m_targetObject = a1->m_targetObject;\n  if ( m_targetObject )\n  {\n    GameToolbox::saveParticleToString((GameToolbox *)v7, a1->m_particle);\n    ParticleGameObject::setParticleString((int)m_targetObject, (int)v7);\n    sub_774008(v7);\n    v4 = a1->m_targetObject;\n    v4->m_popupPage = a1->m_page;\n    v4->m_hasUniformObjectColor = a1->m_particle->m_bUseUniformColorMode;\n    ParticleGameObject::updateParticle(v4);\n  }\n  else if ( a1->m_targetObjects )\n  {\n    while ( (unsigned int)m_targetObject < cocos2d::CCArray::count(a1->m_targetObjects) )\n    {\n      v5 = (ParticleGameObject *)cocos2d::CCArray::objectAtIndex(a1->m_targetObjects, (unsigned int)m_targetObject);\n      v6 = (cocos2d::CCParticleSystemQuad *)cocos2d::CCArray::objectAtIndex(\n                                              a1->m_particles,\n                                              (unsigned int)m_targetObject);\n      GameToolbox::saveParticleToString((GameToolbox *)v7, v6);\n      ParticleGameObject::setParticleString((int)v5, (int)v7);\n      m_targetObject = (ParticleGameObject *)((char *)m_targetObject + 1);\n      sub_774008(v7);\n      v5->m_hasUniformObjectColor = v6->m_bUseUniformColorMode;\n      ParticleGameObject::updateParticle(v5);\n    }\n  }\n  a1->removeFromParentAndCleanup(a1, 1);\n}", "assembly": "; \n; CreateParticlePopup::onClose from 0x532470 to 0x532540 (208 bytes)\n; \n; 1 xrefs:\n; > CreateParticlePopup::keyBackClicked @ 0x532546\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.W          {R0-R2,R4-R9,LR}                                       ; +0x0, 0x532470\nMOV             R4, R0                                                 ; +0x4, 0x532474\nLDR             R7, =(__stack_chk_guard_ptr - 0x53247C)                ; +0x6, 0x532476\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0x8, 0x532478\nLDR             R7, [R7]; __stack_chk_guard                            ; +0xa, 0x53247a\nLDR             R3, [R7]                                               ; +0xc, 0x53247c\nSTR             R3, [SP,#0xC+var_8]                                    ; +0xe, 0x53247e\nBL              _ZN19CreateParticlePopup9willCloseEv; CreateParticlePopup::willClose(void) ; +0x10, 0x532480\nLDR.W           R5, [R4,#0x1FC]                                        ; +0x14, 0x532484\nCBZ             R5, loc_5324C2                                         ; +0x18, 0x532488\nMOV             R0, SP; this                                           ; +0x1a, 0x53248a\nLDR.W           R1, [R4,#0x20C]; cocos2d::CCParticleSystemQuad *       ; +0x1c, 0x53248c\nBL              _ZN11GameToolbox20saveParticleToStringEPN7cocos2d20CCParticleSystemQuadE; GameToolbox::saveParticleToString(cocos2d::CCParticleSystemQuad *) ; +0x20, 0x532490\nMOV             R0, R5                                                 ; +0x24, 0x532494\nMOV             R1, SP                                                 ; +0x26, 0x532496\nMOV             R6, SP                                                 ; +0x28, 0x532498\nBL              _ZN18ParticleGameObject17setParticleStringESs; ParticleGameObject::setParticleString(std::string) ; +0x2a, 0x53249a\nMOV             R0, SP                                                 ; +0x2e, 0x53249e\nBL              sub_774008                                             ; +0x30, 0x5324a0\nLDR.W           R3, [R4,#0x294]                                        ; +0x34, 0x5324a4\nLDR.W           R0, [R4,#0x1FC]; this                                  ; +0x38, 0x5324a8\nSTR.W           R3, [R0,#0x604]                                        ; +0x3c, 0x5324ac\nLDR.W           R3, [R4,#0x20C]                                        ; +0x40, 0x5324b0\nLDRB.W          R3, [R3,#0x284]                                        ; +0x44, 0x5324b4\nSTRB.W          R3, [R0,#0x600]                                        ; +0x48, 0x5324b8\nBL              _ZN18ParticleGameObject14updateParticleEv; ParticleGameObject::updateParticle(void) ; +0x4c, 0x5324bc\nB               loc_532516                                             ; +0x50, 0x5324c0\nLDR.W           R3, [R4,#0x200]                                        ; +0x52, 0x5324c2\nCBZ             R3, loc_532516                                         ; +0x56, 0x5324c6\nMOV             R6, SP                                                 ; +0x58, 0x5324c8\nLDR.W           R0, [R4,#0x200]; this                                  ; +0x5a, 0x5324ca\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x5e, 0x5324ce\nCMP             R5, R0                                                 ; +0x62, 0x5324d2\nBCS             loc_532516                                             ; +0x64, 0x5324d4\nMOV             R1, R5; unsigned int                                   ; +0x66, 0x5324d6\nLDR.W           R0, [R4,#0x200]; this                                  ; +0x68, 0x5324d8\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x6c, 0x5324dc\nMOV             R1, R5; unsigned int                                   ; +0x70, 0x5324e0\nMOV             R8, R0                                                 ; +0x72, 0x5324e2\nLDR.W           R0, [R4,#0x204]; this                                  ; +0x74, 0x5324e4\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x78, 0x5324e8\nMOV             R9, R0                                                 ; +0x7c, 0x5324ec\nMOV             R0, R6; this                                           ; +0x7e, 0x5324ee\nMOV             R1, R9; cocos2d::CCParticleSystemQuad *                ; +0x80, 0x5324f0\nBL              _ZN11GameToolbox20saveParticleToStringEPN7cocos2d20CCParticleSystemQuadE; GameToolbox::saveParticleToString(cocos2d::CCParticleSystemQuad *) ; +0x82, 0x5324f2\nMOV             R0, R8                                                 ; +0x86, 0x5324f6\nMOV             R1, R6                                                 ; +0x88, 0x5324f8\nBL              _ZN18ParticleGameObject17setParticleStringESs; ParticleGameObject::setParticleString(std::string) ; +0x8a, 0x5324fa\nMOV             R0, R6                                                 ; +0x8e, 0x5324fe\nADDS            R5, #1                                                 ; +0x90, 0x532500\nBL              sub_774008                                             ; +0x92, 0x532502\nLDRB.W          R3, [R9,#0x284]                                        ; +0x96, 0x532506\nMOV             R0, R8; this                                           ; +0x9a, 0x53250a\nSTRB.W          R3, [R8,#0x600]                                        ; +0x9c, 0x53250c\nBL              _ZN18ParticleGameObject14updateParticleEv; ParticleGameObject::updateParticle(void) ; +0xa0, 0x532510\nB               loc_5324CA                                             ; +0xa4, 0x532514\nLDR             R3, [R4]                                               ; +0xa6, 0x532516\nMOV             R0, R4                                                 ; +0xa8, 0x532518\nMOVS            R1, #1                                                 ; +0xaa, 0x53251a\nLDR.W           R3, [R3,#0x100]                                        ; +0xac, 0x53251c\nBLX             R3                                                     ; +0xb0, 0x532520\nLDR             R2, [SP,#0xC+var_8]                                    ; +0xb2, 0x532522\nLDR             R3, [R7]                                               ; +0xb4, 0x532524\nCMP             R2, R3                                                 ; +0xb6, 0x532526\nBEQ             loc_53253A                                             ; +0xb8, 0x532528\nBLX             __stack_chk_fail                                       ; +0xba, 0x53252a\nB               loc_532530                                             ; +0xbe, 0x53252e\nMOV             R0, R6                                                 ; +0xc0, 0x532530\nBL              sub_774008                                             ; +0xc2, 0x532532\nBL              __cxa_end_cleanup                                      ; +0xc6, 0x532536\nADD             SP, SP, #0xC                                           ; +0xca, 0x53253a\nPOP.W           {R4-R9,PC}                                             ; +0xcc, 0x53253c", "xrefs": ["CreateParticlePopup::keyBackClicked @ 0x532546"], "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"}