{"type": "func", "start": 5447912, "end": 5448208, "name": "CreateParticlePopup::toggleGravityMode", "pseudocode": "// \n// CreateParticlePopup::toggleGravityMode from 0x5320e8 to 0x532210 (296 bytes)\n// \n// 3 xrefs:\n// > CreateParticlePopup::onPage @ 0x532376\n// > CreateParticlePopup::onEmitterMode @ 0x5323e0\n// > CreateParticlePopup::init @ 0x534e8e\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::toggleGravityMode(CreateParticlePopup *a1, bool a2)\n{\n  _BOOL4 v2; // r6\n  intptr_t v4; // r5\n  cocos2d::CCDictionary *PageInputNodes; // r9\n  cocos2d::CCDictionary *PageSliders; // r8\n  cocos2d::CCObject *v7; // r0\n  cocos2d::CCObject *v8; // r0\n  cocos2d::CCObject *v9; // r0\n  intptr_t v10; // r1\n  cocos2d::CCObject *v11; // r0\n  intptr_t i; // r5\n  cocos2d::CCObject *v13; // r0\n  cocos2d::CCObject *v14; // r0\n  cocos2d::CCObject *v15; // r0\n  intptr_t v16; // r1\n  cocos2d::CCObject *v17; // r0\n  unsigned int j; // r5\n  int v19; // r0\n  unsigned int k; // r5\n  int v21; // r0\n  ParticlePreviewLayer *m_previewLayer; // r5\n\n  v2 = a2;\n  v4 = 8;\n  PageInputNodes = CreateParticlePopup::getPageInputNodes(a1, 0);\n  PageSliders = CreateParticlePopup::getPageSliders(a1, 0);\n  do\n  {\n    v7 = cocos2d::CCDictionary::objectForKey(PageInputNodes, v4);\n    ((void (__fastcall *)(cocos2d::CCObject *, _BOOL4))v7->__vftable[4].~CCObject)(v7, v2);\n    v8 = cocos2d::CCDictionary::objectForKey(PageInputNodes, v4);\n    v8->__vftable[12].isEqual(v8, (const cocos2d::CCObject *)v2);\n    v9 = cocos2d::CCDictionary::objectForKey(PageSliders, v4);\n    ((void (__fastcall *)(cocos2d::CCObject *, _BOOL4))v9->__vftable[4].~CCObject)(v9, v2);\n    v10 = v4++;\n    v11 = cocos2d::CCDictionary::objectForKey(PageSliders, v10);\n    v11->__vftable[12].isEqual(v11, (const cocos2d::CCObject *)v2);\n  }\n  while ( v4 != 18 );\n  for ( i = 50; i != 56; ++i )\n  {\n    v13 = cocos2d::CCDictionary::objectForKey(PageInputNodes, i);\n    ((void (__fastcall *)(cocos2d::CCObject *, bool))v13->__vftable[4].~CCObject)(v13, !v2);\n    v14 = cocos2d::CCDictionary::objectForKey(PageInputNodes, i);\n    v14->__vftable[12].isEqual(v14, (const cocos2d::CCObject *)!v2);\n    v15 = cocos2d::CCDictionary::objectForKey(PageSliders, i);\n    ((void (__fastcall *)(cocos2d::CCObject *, bool))v15->__vftable[4].~CCObject)(v15, !v2);\n    v16 = i;\n    v17 = cocos2d::CCDictionary::objectForKey(PageSliders, v16);\n    v17->__vftable[12].isEqual(v17, (const cocos2d::CCObject *)!v2);\n  }\n  for ( j = 0; j < cocos2d::CCArray::count(a1->m_gravityObjects); ++j )\n  {\n    v19 = cocos2d::CCArray::objectAtIndex(a1->m_gravityObjects, j);\n    (*(void (__fastcall **)(int, _BOOL4))(*(_DWORD *)v19 + 164))(v19, v2);\n  }\n  for ( k = 0; k < cocos2d::CCArray::count(a1->m_radiusObjects); ++k )\n  {\n    v21 = cocos2d::CCArray::objectAtIndex(a1->m_radiusObjects, k);\n    (*(void (__fastcall **)(int, bool))(*(_DWORD *)v21 + 164))(v21, !v2);\n  }\n  m_previewLayer = a1->m_previewLayer;\n  m_previewLayer->m_gravityMode = a1->m_particle->getEmitterMode(a1->m_particle) == 0;\n}", "assembly": "; \n; CreateParticlePopup::toggleGravityMode from 0x5320e8 to 0x532210 (296 bytes)\n; \n; 3 xrefs:\n; > CreateParticlePopup::onPage @ 0x532376\n; > CreateParticlePopup::onEmitterMode @ 0x5323e0\n; > CreateParticlePopup::init @ 0x534e8e\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, 0x5320e8\nMOV             R6, R1                                                 ; +0x4, 0x5320ec\nMOVS            R1, #0; int                                            ; +0x6, 0x5320ee\nMOV             R4, R0                                                 ; +0x8, 0x5320f0\nBL              _ZN19CreateParticlePopup17getPageInputNodesEi; CreateParticlePopup::getPageInputNodes(int) ; +0xa, 0x5320f2\nMOVS            R1, #0; int                                            ; +0xe, 0x5320f6\nMOVS            R5, #8                                                 ; +0x10, 0x5320f8\nMOV             R9, R0                                                 ; +0x12, 0x5320fa\nMOV             R0, R4; this                                           ; +0x14, 0x5320fc\nBL              _ZN19CreateParticlePopup14getPageSlidersEi; CreateParticlePopup::getPageSliders(int) ; +0x16, 0x5320fe\nMOV             R8, R0                                                 ; +0x1a, 0x532102\nMOV             R1, R5; int                                            ; +0x1c, 0x532104\nMOV             R0, R9; this                                           ; +0x1e, 0x532106\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x20, 0x532108\nMOV             R1, R6                                                 ; +0x24, 0x53210c\nLDR             R3, [R0]                                               ; +0x26, 0x53210e\nLDR.W           R3, [R3,#0xA4]                                         ; +0x28, 0x532110\nBLX             R3                                                     ; +0x2c, 0x532114\nMOV             R1, R5; int                                            ; +0x2e, 0x532116\nMOV             R0, R9; this                                           ; +0x30, 0x532118\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x32, 0x53211a\nMOV             R1, R6                                                 ; +0x36, 0x53211e\nLDR             R3, [R0]                                               ; +0x38, 0x532120\nLDR.W           R3, [R3,#0x1EC]                                        ; +0x3a, 0x532122\nBLX             R3                                                     ; +0x3e, 0x532126\nMOV             R1, R5; int                                            ; +0x40, 0x532128\nMOV             R0, R8; this                                           ; +0x42, 0x53212a\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x44, 0x53212c\nMOV             R1, R6                                                 ; +0x48, 0x532130\nLDR             R3, [R0]                                               ; +0x4a, 0x532132\nLDR.W           R3, [R3,#0xA4]                                         ; +0x4c, 0x532134\nBLX             R3                                                     ; +0x50, 0x532138\nMOV             R1, R5; int                                            ; +0x52, 0x53213a\nMOV             R0, R8; this                                           ; +0x54, 0x53213c\nADDS            R5, #1                                                 ; +0x56, 0x53213e\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x58, 0x532140\nMOV             R1, R6                                                 ; +0x5c, 0x532144\nLDR             R3, [R0]                                               ; +0x5e, 0x532146\nLDR.W           R3, [R3,#0x1EC]                                        ; +0x60, 0x532148\nBLX             R3                                                     ; +0x64, 0x53214c\nCMP             R5, #0x12                                              ; +0x66, 0x53214e\nBNE             loc_532104                                             ; +0x68, 0x532150\nEOR.W           R7, R6, #1                                             ; +0x6a, 0x532152\nMOVS            R5, #0x32 ; '2'                                        ; +0x6e, 0x532156\nMOV             R1, R5; int                                            ; +0x70, 0x532158\nMOV             R0, R9; this                                           ; +0x72, 0x53215a\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x74, 0x53215c\nMOV             R1, R7                                                 ; +0x78, 0x532160\nLDR             R3, [R0]                                               ; +0x7a, 0x532162\nLDR.W           R3, [R3,#0xA4]                                         ; +0x7c, 0x532164\nBLX             R3                                                     ; +0x80, 0x532168\nMOV             R1, R5; int                                            ; +0x82, 0x53216a\nMOV             R0, R9; this                                           ; +0x84, 0x53216c\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x86, 0x53216e\nMOV             R1, R7                                                 ; +0x8a, 0x532172\nLDR             R3, [R0]                                               ; +0x8c, 0x532174\nLDR.W           R3, [R3,#0x1EC]                                        ; +0x8e, 0x532176\nBLX             R3                                                     ; +0x92, 0x53217a\nMOV             R1, R5; int                                            ; +0x94, 0x53217c\nMOV             R0, R8; this                                           ; +0x96, 0x53217e\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x98, 0x532180\nMOV             R1, R7                                                 ; +0x9c, 0x532184\nLDR             R3, [R0]                                               ; +0x9e, 0x532186\nLDR.W           R3, [R3,#0xA4]                                         ; +0xa0, 0x532188\nBLX             R3                                                     ; +0xa4, 0x53218c\nMOV             R1, R5; int                                            ; +0xa6, 0x53218e\nMOV             R0, R8; this                                           ; +0xa8, 0x532190\nADDS            R5, #1                                                 ; +0xaa, 0x532192\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0xac, 0x532194\nMOV             R1, R7                                                 ; +0xb0, 0x532198\nLDR             R3, [R0]                                               ; +0xb2, 0x53219a\nLDR.W           R3, [R3,#0x1EC]                                        ; +0xb4, 0x53219c\nBLX             R3                                                     ; +0xb8, 0x5321a0\nCMP             R5, #0x38 ; '8'                                        ; +0xba, 0x5321a2\nBNE             loc_532158                                             ; +0xbc, 0x5321a4\nMOVS            R5, #0                                                 ; +0xbe, 0x5321a6\nLDR.W           R0, [R4,#0x27C]; this                                  ; +0xc0, 0x5321a8\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xc4, 0x5321ac\nCMP             R5, R0                                                 ; +0xc8, 0x5321b0\nBCS             loc_5321CC                                             ; +0xca, 0x5321b2\nMOV             R1, R5; unsigned int                                   ; +0xcc, 0x5321b4\nLDR.W           R0, [R4,#0x27C]; this                                  ; +0xce, 0x5321b6\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xd2, 0x5321ba\nMOV             R1, R6                                                 ; +0xd6, 0x5321be\nADDS            R5, #1                                                 ; +0xd8, 0x5321c0\nLDR             R3, [R0]                                               ; +0xda, 0x5321c2\nLDR.W           R3, [R3,#0xA4]                                         ; +0xdc, 0x5321c4\nBLX             R3                                                     ; +0xe0, 0x5321c8\nB               loc_5321A8                                             ; +0xe2, 0x5321ca\nMOVS            R5, #0                                                 ; +0xe4, 0x5321cc\nLDR.W           R0, [R4,#0x280]; this                                  ; +0xe6, 0x5321ce\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xea, 0x5321d2\nCMP             R5, R0                                                 ; +0xee, 0x5321d6\nBCS             loc_5321F2                                             ; +0xf0, 0x5321d8\nMOV             R1, R5; unsigned int                                   ; +0xf2, 0x5321da\nLDR.W           R0, [R4,#0x280]; this                                  ; +0xf4, 0x5321dc\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xf8, 0x5321e0\nMOV             R1, R7                                                 ; +0xfc, 0x5321e4\nADDS            R5, #1                                                 ; +0xfe, 0x5321e6\nLDR             R3, [R0]                                               ; +0x100, 0x5321e8\nLDR.W           R3, [R3,#0xA4]                                         ; +0x102, 0x5321ea\nBLX             R3                                                     ; +0x106, 0x5321ee\nB               loc_5321CE                                             ; +0x108, 0x5321f0\nLDR.W           R0, [R4,#0x20C]                                        ; +0x10a, 0x5321f2\nLDR.W           R5, [R4,#0x238]                                        ; +0x10e, 0x5321f6\nLDR             R3, [R0]                                               ; +0x112, 0x5321fa\nLDR.W           R3, [R3,#0x314]                                        ; +0x114, 0x5321fc\nBLX             R3                                                     ; +0x118, 0x532200\nCLZ.W           R0, R0                                                 ; +0x11a, 0x532202\nLSRS            R0, R0, #5                                             ; +0x11e, 0x532206\nSTRB.W          R0, [R5,#0x1C4]                                        ; +0x120, 0x532208\nPOP.W           {R3-R9,PC}                                             ; +0x124, 0x53220c", "xrefs": ["CreateParticlePopup::onPage @ 0x532376", "CreateParticlePopup::onEmitterMode @ 0x5323e0", "CreateParticlePopup::init @ 0x534e8e"], "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"}