{"type": "func", "start": 6707336, "end": 6707632, "name": "CreateParticlePopup::toggleGravityMode", "pseudocode": "// \n// CreateParticlePopup::toggleGravityMode from 0x665888 to 0x6659b0 (296 bytes)\n// \n// 3 xrefs:\n// > CreateParticlePopup::onEmitterMode @ 0x665a08\n// > CreateParticlePopup::onPage @ 0x665b6e\n// > CreateParticlePopup::init @ 0x669e8e\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:55:40 +0000\n// \n\nbool __fastcall CreateParticlePopup::toggleGravityMode(cocos2d::CCArray **this, int a2)\n{\n  int v4; // r5\n  cocos2d::CCDictionary *PageInputNodes; // r9\n  cocos2d::CCDictionary *PageSliders; // r8\n  int v7; // r0\n  int v8; // r0\n  int v9; // r0\n  int v10; // r1\n  int v11; // r0\n  int i; // r5\n  int v13; // r0\n  int v14; // r0\n  int v15; // r0\n  int v16; // r1\n  int v17; // r0\n  unsigned int j; // r5\n  int v19; // r0\n  unsigned int k; // r5\n  int v21; // r0\n  int v22; // r5\n  _BOOL4 result; // r0\n\n  v4 = 8;\n  PageInputNodes = (cocos2d::CCDictionary *)CreateParticlePopup::getPageInputNodes(this, 0);\n  PageSliders = (cocos2d::CCDictionary *)CreateParticlePopup::getPageSliders(this, 0);\n  do\n  {\n    v7 = cocos2d::CCDictionary::objectForKey(PageInputNodes, v4);\n    (*(void (__fastcall **)(int, int))(*(_DWORD *)v7 + 172))(v7, a2);\n    v8 = cocos2d::CCDictionary::objectForKey(PageInputNodes, v4);\n    (*(void (__fastcall **)(int, int))(*(_DWORD *)v8 + 500))(v8, a2);\n    v9 = cocos2d::CCDictionary::objectForKey(PageSliders, v4);\n    (*(void (__fastcall **)(int, int))(*(_DWORD *)v9 + 172))(v9, a2);\n    v10 = v4++;\n    v11 = cocos2d::CCDictionary::objectForKey(PageSliders, v10);\n    (*(void (__fastcall **)(int, int))(*(_DWORD *)v11 + 500))(v11, a2);\n  }\n  while ( v4 != 18 );\n  for ( i = 50; i != 56; ++i )\n  {\n    v13 = cocos2d::CCDictionary::objectForKey(PageInputNodes, i);\n    (*(void (__fastcall **)(int, int))(*(_DWORD *)v13 + 172))(v13, a2 ^ 1);\n    v14 = cocos2d::CCDictionary::objectForKey(PageInputNodes, i);\n    (*(void (__fastcall **)(int, int))(*(_DWORD *)v14 + 500))(v14, a2 ^ 1);\n    v15 = cocos2d::CCDictionary::objectForKey(PageSliders, i);\n    (*(void (__fastcall **)(int, int))(*(_DWORD *)v15 + 172))(v15, a2 ^ 1);\n    v16 = i;\n    v17 = cocos2d::CCDictionary::objectForKey(PageSliders, v16);\n    (*(void (__fastcall **)(int, int))(*(_DWORD *)v17 + 500))(v17, a2 ^ 1);\n  }\n  for ( j = 0; j < cocos2d::CCArray::count(*(this + 169)); ++j )\n  {\n    v19 = cocos2d::CCArray::objectAtIndex(*(this + 169), j);\n    (*(void (__fastcall **)(int, int))(*(_DWORD *)v19 + 172))(v19, a2);\n  }\n  for ( k = 0; k < cocos2d::CCArray::count(*(this + 170)); ++k )\n  {\n    v21 = cocos2d::CCArray::objectAtIndex(*(this + 170), k);\n    (*(void (__fastcall **)(int, int))(*(_DWORD *)v21 + 172))(v21, a2 ^ 1);\n  }\n  v22 = (int)*(this + 147);\n  result = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 136) + 796))(*(this + 136)) == 0;\n  *(_BYTE *)(v22 + 452) = result;\n  return result;\n}", "assembly": "; \n; CreateParticlePopup::toggleGravityMode from 0x665888 to 0x6659b0 (296 bytes)\n; \n; 3 xrefs:\n; > CreateParticlePopup::onEmitterMode @ 0x665a08\n; > CreateParticlePopup::onPage @ 0x665b6e\n; > CreateParticlePopup::init @ 0x669e8e\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:55:40 +0000\n; \nPUSH.W          {R3-R9,LR}                                             ; +0x0, 0x665888\nMOV             R6, R1                                                 ; +0x4, 0x66588c\nMOVS            R1, #0; int                                            ; +0x6, 0x66588e\nMOV             R4, R0                                                 ; +0x8, 0x665890\nBL              _ZN19CreateParticlePopup17getPageInputNodesEi; CreateParticlePopup::getPageInputNodes(int) ; +0xa, 0x665892\nMOVS            R1, #0; int                                            ; +0xe, 0x665896\nMOVS            R5, #8                                                 ; +0x10, 0x665898\nMOV             R9, R0                                                 ; +0x12, 0x66589a\nMOV             R0, R4; this                                           ; +0x14, 0x66589c\nBL              _ZN19CreateParticlePopup14getPageSlidersEi; CreateParticlePopup::getPageSliders(int) ; +0x16, 0x66589e\nMOV             R8, R0                                                 ; +0x1a, 0x6658a2\nMOV             R1, R5; int                                            ; +0x1c, 0x6658a4\nMOV             R0, R9; this                                           ; +0x1e, 0x6658a6\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x20, 0x6658a8\nMOV             R1, R6                                                 ; +0x24, 0x6658ac\nLDR             R3, [R0]                                               ; +0x26, 0x6658ae\nLDR.W           R3, [R3,#0xAC]                                         ; +0x28, 0x6658b0\nBLX             R3                                                     ; +0x2c, 0x6658b4\nMOV             R1, R5; int                                            ; +0x2e, 0x6658b6\nMOV             R0, R9; this                                           ; +0x30, 0x6658b8\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x32, 0x6658ba\nMOV             R1, R6                                                 ; +0x36, 0x6658be\nLDR             R3, [R0]                                               ; +0x38, 0x6658c0\nLDR.W           R3, [R3,#0x1F4]                                        ; +0x3a, 0x6658c2\nBLX             R3                                                     ; +0x3e, 0x6658c6\nMOV             R1, R5; int                                            ; +0x40, 0x6658c8\nMOV             R0, R8; this                                           ; +0x42, 0x6658ca\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x44, 0x6658cc\nMOV             R1, R6                                                 ; +0x48, 0x6658d0\nLDR             R3, [R0]                                               ; +0x4a, 0x6658d2\nLDR.W           R3, [R3,#0xAC]                                         ; +0x4c, 0x6658d4\nBLX             R3                                                     ; +0x50, 0x6658d8\nMOV             R1, R5; int                                            ; +0x52, 0x6658da\nMOV             R0, R8; this                                           ; +0x54, 0x6658dc\nADDS            R5, #1                                                 ; +0x56, 0x6658de\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x58, 0x6658e0\nMOV             R1, R6                                                 ; +0x5c, 0x6658e4\nLDR             R3, [R0]                                               ; +0x5e, 0x6658e6\nLDR.W           R3, [R3,#0x1F4]                                        ; +0x60, 0x6658e8\nBLX             R3                                                     ; +0x64, 0x6658ec\nCMP             R5, #0x12                                              ; +0x66, 0x6658ee\nBNE             loc_6658A4                                             ; +0x68, 0x6658f0\nEOR.W           R7, R6, #1                                             ; +0x6a, 0x6658f2\nMOVS            R5, #0x32 ; '2'                                        ; +0x6e, 0x6658f6\nMOV             R1, R5; int                                            ; +0x70, 0x6658f8\nMOV             R0, R9; this                                           ; +0x72, 0x6658fa\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x74, 0x6658fc\nMOV             R1, R7                                                 ; +0x78, 0x665900\nLDR             R3, [R0]                                               ; +0x7a, 0x665902\nLDR.W           R3, [R3,#0xAC]                                         ; +0x7c, 0x665904\nBLX             R3                                                     ; +0x80, 0x665908\nMOV             R1, R5; int                                            ; +0x82, 0x66590a\nMOV             R0, R9; this                                           ; +0x84, 0x66590c\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x86, 0x66590e\nMOV             R1, R7                                                 ; +0x8a, 0x665912\nLDR             R3, [R0]                                               ; +0x8c, 0x665914\nLDR.W           R3, [R3,#0x1F4]                                        ; +0x8e, 0x665916\nBLX             R3                                                     ; +0x92, 0x66591a\nMOV             R1, R5; int                                            ; +0x94, 0x66591c\nMOV             R0, R8; this                                           ; +0x96, 0x66591e\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x98, 0x665920\nMOV             R1, R7                                                 ; +0x9c, 0x665924\nLDR             R3, [R0]                                               ; +0x9e, 0x665926\nLDR.W           R3, [R3,#0xAC]                                         ; +0xa0, 0x665928\nBLX             R3                                                     ; +0xa4, 0x66592c\nMOV             R1, R5; int                                            ; +0xa6, 0x66592e\nMOV             R0, R8; this                                           ; +0xa8, 0x665930\nADDS            R5, #1                                                 ; +0xaa, 0x665932\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0xac, 0x665934\nMOV             R1, R7                                                 ; +0xb0, 0x665938\nLDR             R3, [R0]                                               ; +0xb2, 0x66593a\nLDR.W           R3, [R3,#0x1F4]                                        ; +0xb4, 0x66593c\nBLX             R3                                                     ; +0xb8, 0x665940\nCMP             R5, #0x38 ; '8'                                        ; +0xba, 0x665942\nBNE             loc_6658F8                                             ; +0xbc, 0x665944\nMOVS            R5, #0                                                 ; +0xbe, 0x665946\nLDR.W           R0, [R4,#0x2A4]; this                                  ; +0xc0, 0x665948\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xc4, 0x66594c\nCMP             R5, R0                                                 ; +0xc8, 0x665950\nBCS             loc_66596C                                             ; +0xca, 0x665952\nMOV             R1, R5; unsigned int                                   ; +0xcc, 0x665954\nLDR.W           R0, [R4,#0x2A4]; this                                  ; +0xce, 0x665956\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xd2, 0x66595a\nMOV             R1, R6                                                 ; +0xd6, 0x66595e\nADDS            R5, #1                                                 ; +0xd8, 0x665960\nLDR             R3, [R0]                                               ; +0xda, 0x665962\nLDR.W           R3, [R3,#0xAC]                                         ; +0xdc, 0x665964\nBLX             R3                                                     ; +0xe0, 0x665968\nB               loc_665948                                             ; +0xe2, 0x66596a\nMOVS            R5, #0                                                 ; +0xe4, 0x66596c\nLDR.W           R0, [R4,#0x2A8]; this                                  ; +0xe6, 0x66596e\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xea, 0x665972\nCMP             R5, R0                                                 ; +0xee, 0x665976\nBCS             loc_665992                                             ; +0xf0, 0x665978\nMOV             R1, R5; unsigned int                                   ; +0xf2, 0x66597a\nLDR.W           R0, [R4,#0x2A8]; this                                  ; +0xf4, 0x66597c\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xf8, 0x665980\nMOV             R1, R7                                                 ; +0xfc, 0x665984\nADDS            R5, #1                                                 ; +0xfe, 0x665986\nLDR             R3, [R0]                                               ; +0x100, 0x665988\nLDR.W           R3, [R3,#0xAC]                                         ; +0x102, 0x66598a\nBLX             R3                                                     ; +0x106, 0x66598e\nB               loc_66596E                                             ; +0x108, 0x665990\nLDR.W           R0, [R4,#0x220]                                        ; +0x10a, 0x665992\nLDR.W           R5, [R4,#0x24C]                                        ; +0x10e, 0x665996\nLDR             R3, [R0]                                               ; +0x112, 0x66599a\nLDR.W           R3, [R3,#0x31C]                                        ; +0x114, 0x66599c\nBLX             R3                                                     ; +0x118, 0x6659a0\nCLZ.W           R0, R0                                                 ; +0x11a, 0x6659a2\nLSRS            R0, R0, #5                                             ; +0x11e, 0x6659a6\nSTRB.W          R0, [R5,#0x1C4]                                        ; +0x120, 0x6659a8\nPOP.W           {R3-R9,PC}                                             ; +0x124, 0x6659ac", "xrefs": ["CreateParticlePopup::onEmitterMode @ 0x665a08", "CreateParticlePopup::onPage @ 0x665b6e", "CreateParticlePopup::init @ 0x669e8e"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}