{"type": "func", "start": 5448208, "end": 5448574, "name": "CreateParticlePopup::onPage", "pseudocode": "// \n// CreateParticlePopup::onPage from 0x532210 to 0x53237e (366 bytes)\n// \n// 1 xrefs:\n// > CreateParticlePopup::init @ 0x534e76\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::onPage(CreateParticlePopup *a1, cocos2d::CCObject *a2)\n{\n  int i; // r5\n  cocos2d::CCNode *Page; // r0\n  CCMenuItemSpriteExtra *PageButton; // r0\n  ButtonSprite *v6; // r0\n  const char *v7; // r1\n  cocos2d::CCDictionary *PageInputNodes; // r0\n  cocos2d::CCDictionary *PageSliders; // r0\n  cocos2d::CCDictElement *m_pElements; // r3\n  cocos2d::CCDictElement *next; // r6\n  cocos2d::CCObject *m_pObject; // r9\n  cocos2d::CCDictElement *v13; // r2\n  cocos2d::CCDictElement *v14; // r3\n  cocos2d::CCDictElement *v15; // r6\n  unsigned int v16; // r6\n  cocos2d::CCArray *PageContainer; // r9\n  cocos2d::CCDictElement *v18; // r2\n  int v19; // r0\n  unsigned int v20; // r1\n\n  if ( a2 )\n    a1->m_page = a2->getTag(a2);\n  for ( i = 1; i != 5; ++i )\n  {\n    Page = CreateParticlePopup::getPage(a1, i);\n    Page->setVisible(Page, a1->m_page == i);\n    PageButton = CreateParticlePopup::getPageButton(a1, i);\n    v6 = (ButtonSprite *)PageButton->getNormalImage(PageButton);\n    if ( a1->m_page == i )\n      v7 = \"GJ_button_01.png\";\n    else\n      v7 = \"GJ_button_04.png\";\n    ButtonSprite::updateBGImage(v6, v7);\n    PageInputNodes = CreateParticlePopup::getPageInputNodes(a1, i);\n    if ( PageInputNodes )\n    {\n      m_pElements = PageInputNodes->m_pElements;\n      if ( m_pElements )\n        next = (cocos2d::CCDictElement *)m_pElements->hh.next;\n      else\n        next = nullptr;\n      while ( m_pElements )\n      {\n        m_pObject = m_pElements->m_pObject;\n        m_pObject->__vftable[12].isEqual(m_pObject, (const cocos2d::CCObject *)(a1->m_page == i));\n        if ( a1->m_page != i )\n          m_pObject->__vftable[14].isEqual(m_pObject, nullptr);\n        if ( next )\n          v13 = (cocos2d::CCDictElement *)next->hh.next;\n        else\n          v13 = nullptr;\n        m_pElements = next;\n        next = v13;\n      }\n    }\n    PageSliders = CreateParticlePopup::getPageSliders(a1, i);\n    if ( PageSliders )\n    {\n      v14 = PageSliders->m_pElements;\n      if ( v14 )\n        v15 = (cocos2d::CCDictElement *)v14->hh.next;\n      else\n        v15 = nullptr;\n      while ( v14 )\n      {\n        v14->m_pObject->__vftable[12].isEqual(v14->m_pObject, (const cocos2d::CCObject *)(a1->m_page == i));\n        if ( v15 )\n          v18 = (cocos2d::CCDictElement *)v15->hh.next;\n        else\n          v18 = nullptr;\n        v14 = v15;\n        v15 = v18;\n      }\n    }\n    v16 = 0;\n    PageContainer = CreateParticlePopup::getPageContainer(a1, i);\n    while ( v16 < cocos2d::CCArray::count(PageContainer) )\n    {\n      v19 = cocos2d::CCArray::objectAtIndex(PageContainer, v16++);\n      (*(void (__fastcall **)(int, bool))(*(_DWORD *)v19 + 164))(v19, a1->m_page == i);\n    }\n  }\n  if ( a1->m_page == 1 )\n  {\n    v20 = __clz(a1->m_particle->getEmitterMode(a1->m_particle));\n    CreateParticlePopup::toggleGravityMode(a1, v20 >> 5);\n  }\n}", "assembly": "; \n; CreateParticlePopup::onPage from 0x532210 to 0x53237e (366 bytes)\n; \n; 1 xrefs:\n; > CreateParticlePopup::init @ 0x534e76\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          {R3-R9,LR}                                             ; +0x0, 0x532210\nMOV             R4, R0                                                 ; +0x4, 0x532214\nCBZ             R1, loc_532224                                         ; +0x6, 0x532216\nLDR             R3, [R1]                                               ; +0x8, 0x532218\nMOV             R0, R1                                                 ; +0xa, 0x53221a\nLDR             R3, [R3,#0x20]                                         ; +0xc, 0x53221c\nBLX             R3                                                     ; +0xe, 0x53221e\nSTR.W           R0, [R4,#0x294]                                        ; +0x10, 0x532220\nLDR             R7, =(aGjButton01Png - 0x532230); \"GJ_button_01.png\"   ; +0x14, 0x532224\nMOVS            R5, #1                                                 ; +0x16, 0x532226\nLDR.W           R8, =(aGjButton04Png - 0x532232); \"GJ_button_04.png\"   ; +0x18, 0x532228\nADD             R7, PC; \"GJ_button_01.png\"                             ; +0x1c, 0x53222c\nADD             R8, PC; \"GJ_button_04.png\"                             ; +0x1e, 0x53222e\nMOV             R1, R5; int                                            ; +0x20, 0x532230\nMOV             R0, R4; this                                           ; +0x22, 0x532232\nBL              _ZN19CreateParticlePopup7getPageEi; CreateParticlePopup::getPage(int) ; +0x24, 0x532234\nLDR.W           R1, [R4,#0x294]                                        ; +0x28, 0x532238\nRSB.W           R9, R5, R1                                             ; +0x2c, 0x53223c\nRSBS.W          R1, R9, #0                                             ; +0x30, 0x532240\nADC.W           R1, R1, R9                                             ; +0x34, 0x532244\nLDR             R3, [R0]                                               ; +0x38, 0x532248\nLDR.W           R3, [R3,#0xA4]                                         ; +0x3a, 0x53224a\nBLX             R3                                                     ; +0x3e, 0x53224e\nMOV             R1, R5; int                                            ; +0x40, 0x532250\nMOV             R0, R4; this                                           ; +0x42, 0x532252\nBL              _ZN19CreateParticlePopup13getPageButtonEi; CreateParticlePopup::getPageButton(int) ; +0x44, 0x532254\nLDR             R3, [R0]                                               ; +0x48, 0x532258\nLDR.W           R3, [R3,#0x210]                                        ; +0x4a, 0x53225a\nBLX             R3                                                     ; +0x4e, 0x53225e\nLDR.W           R3, [R4,#0x294]                                        ; +0x50, 0x532260\nCMP             R3, R5                                                 ; +0x54, 0x532264\nITE EQ                                                                 ; +0x56, 0x532266\nMOVEQ           R1, R7                                                 ; +0x58, 0x532268\nMOVNE           R1, R8; char *                                         ; +0x5a, 0x53226a\nBL              _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0x5c, 0x53226c\nMOV             R0, R4; this                                           ; +0x60, 0x532270\nMOV             R1, R5; int                                            ; +0x62, 0x532272\nBL              _ZN19CreateParticlePopup17getPageInputNodesEi; CreateParticlePopup::getPageInputNodes(int) ; +0x64, 0x532274\nCBNZ            R0, loc_532286                                         ; +0x68, 0x532278\nMOV             R0, R4; this                                           ; +0x6a, 0x53227a\nMOV             R1, R5; int                                            ; +0x6c, 0x53227c\nBL              _ZN19CreateParticlePopup14getPageSlidersEi; CreateParticlePopup::getPageSliders(int) ; +0x6e, 0x53227e\nCBNZ            R0, loc_5322DE                                         ; +0x72, 0x532282\nB               loc_5322E8                                             ; +0x74, 0x532284\nLDR             R3, [R0,#0x34]                                         ; +0x76, 0x532286\nCBZ             R3, loc_532290                                         ; +0x78, 0x532288\nLDR.W           R6, [R3,#0x110]                                        ; +0x7a, 0x53228a\nB               loc_5322D4                                             ; +0x7e, 0x53228e\nMOV             R6, R3                                                 ; +0x80, 0x532290\nB               loc_5322D4                                             ; +0x82, 0x532292\nLDR.W           R9, [R3,#0x104]                                        ; +0x84, 0x532294\nLDR.W           R1, [R4,#0x294]                                        ; +0x88, 0x532298\nLDR.W           R3, [R9]                                               ; +0x8c, 0x53229c\nRSB.W           R12, R5, R1                                            ; +0x90, 0x5322a0\nRSBS.W          R1, R12, #0                                            ; +0x94, 0x5322a4\nMOV             R0, R9                                                 ; +0x98, 0x5322a8\nADC.W           R1, R1, R12                                            ; +0x9a, 0x5322aa\nLDR.W           R3, [R3,#0x1EC]                                        ; +0x9e, 0x5322ae\nBLX             R3                                                     ; +0xa2, 0x5322b2\nLDR.W           R3, [R4,#0x294]                                        ; +0xa4, 0x5322b4\nCMP             R3, R5                                                 ; +0xa8, 0x5322b8\nBEQ             loc_5322CA                                             ; +0xaa, 0x5322ba\nLDR.W           R3, [R9]                                               ; +0xac, 0x5322bc\nMOV             R0, R9                                                 ; +0xb0, 0x5322c0\nMOVS            R1, #0                                                 ; +0xb2, 0x5322c2\nLDR.W           R3, [R3,#0x23C]                                        ; +0xb4, 0x5322c4\nBLX             R3                                                     ; +0xb8, 0x5322c8\nCBZ             R6, loc_5322DA                                         ; +0xba, 0x5322ca\nLDR.W           R2, [R6,#0x110]                                        ; +0xbc, 0x5322cc\nMOV             R3, R6                                                 ; +0xc0, 0x5322d0\nMOV             R6, R2                                                 ; +0xc2, 0x5322d2\nCMP             R3, #0                                                 ; +0xc4, 0x5322d4\nBNE             loc_532294                                             ; +0xc6, 0x5322d6\nB               loc_53227A                                             ; +0xc8, 0x5322d8\nMOV             R2, R6                                                 ; +0xca, 0x5322da\nB               loc_5322D0                                             ; +0xcc, 0x5322dc\nLDR             R3, [R0,#0x34]                                         ; +0xce, 0x5322de\nCBZ             R3, loc_5322F6                                         ; +0xd0, 0x5322e0\nLDR.W           R6, [R3,#0x110]                                        ; +0xd2, 0x5322e2\nCBNZ            R3, loc_5322FA                                         ; +0xd6, 0x5322e6\nMOV             R0, R4; this                                           ; +0xd8, 0x5322e8\nMOV             R1, R5; int                                            ; +0xda, 0x5322ea\nBL              _ZN19CreateParticlePopup16getPageContainerEi; CreateParticlePopup::getPageContainer(int) ; +0xdc, 0x5322ec\nMOVS            R6, #0                                                 ; +0xe0, 0x5322f0\nMOV             R9, R0                                                 ; +0xe2, 0x5322f2\nB               loc_532326                                             ; +0xe4, 0x5322f4\nMOV             R6, R3                                                 ; +0xe6, 0x5322f6\nB               loc_5322E6                                             ; +0xe8, 0x5322f8\nLDR.W           R0, [R3,#0x104]                                        ; +0xea, 0x5322fa\nLDR.W           R1, [R4,#0x294]                                        ; +0xee, 0x5322fe\nLDR             R3, [R0]                                               ; +0xf2, 0x532302\nRSB.W           LR, R5, R1                                             ; +0xf4, 0x532304\nRSBS.W          R1, LR, #0                                             ; +0xf8, 0x532308\nADC.W           R1, R1, LR                                             ; +0xfc, 0x53230c\nLDR.W           R3, [R3,#0x1EC]                                        ; +0x100, 0x532310\nBLX             R3                                                     ; +0x104, 0x532314\nCBZ             R6, loc_53231E                                         ; +0x106, 0x532316\nLDR.W           R2, [R6,#0x110]                                        ; +0x108, 0x532318\nB               loc_532320                                             ; +0x10c, 0x53231c\nMOV             R2, R6                                                 ; +0x10e, 0x53231e\nMOV             R3, R6                                                 ; +0x110, 0x532320\nMOV             R6, R2                                                 ; +0x112, 0x532322\nB               loc_5322E6                                             ; +0x114, 0x532324\nMOV             R0, R9; this                                           ; +0x116, 0x532326\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x118, 0x532328\nCMP             R6, R0                                                 ; +0x11c, 0x53232c\nBCS             loc_53234E                                             ; +0x11e, 0x53232e\nMOV             R1, R6; unsigned int                                   ; +0x120, 0x532330\nMOV             R0, R9; this                                           ; +0x122, 0x532332\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x124, 0x532334\nLDR.W           R1, [R4,#0x294]                                        ; +0x128, 0x532338\nADDS            R6, #1                                                 ; +0x12c, 0x53233c\nSUBS            R2, R1, R5                                             ; +0x12e, 0x53233e\nNEGS            R1, R2                                                 ; +0x130, 0x532340\nADCS            R1, R2                                                 ; +0x132, 0x532342\nLDR             R3, [R0]                                               ; +0x134, 0x532344\nLDR.W           R3, [R3,#0xA4]                                         ; +0x136, 0x532346\nBLX             R3                                                     ; +0x13a, 0x53234a\nB               loc_532326                                             ; +0x13c, 0x53234c\nADDS            R5, #1                                                 ; +0x13e, 0x53234e\nCMP             R5, #5                                                 ; +0x140, 0x532350\nBNE.W           loc_532230                                             ; +0x142, 0x532352\nLDR.W           R3, [R4,#0x294]                                        ; +0x146, 0x532356\nCMP             R3, #1                                                 ; +0x14a, 0x53235a\nBNE             locret_53237A                                          ; +0x14c, 0x53235c\nLDR.W           R0, [R4,#0x20C]                                        ; +0x14e, 0x53235e\nLDR             R3, [R0]                                               ; +0x152, 0x532362\nLDR.W           R3, [R3,#0x314]                                        ; +0x154, 0x532364\nBLX             R3                                                     ; +0x158, 0x532368\nCLZ.W           R1, R0                                                 ; +0x15a, 0x53236a\nMOV             R0, R4; this                                           ; +0x15e, 0x53236e\nPOP.W           {R3-R9,LR}                                             ; +0x160, 0x532370\nLSRS            R1, R1, #5; bool                                       ; +0x164, 0x532374\nB.W             _ZN19CreateParticlePopup17toggleGravityModeEb; CreateParticlePopup::toggleGravityMode(bool) ; +0x166, 0x532376\nPOP.W           {R3-R9,PC}                                             ; +0x16a, 0x53237a", "xrefs": ["CreateParticlePopup::init @ 0x534e76"], "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"}