{"type": "func", "start": 4758788, "end": 4758952, "name": "EditorUI::toggleMode", "pseudocode": "// \n// EditorUI::toggleMode from 0x489d04 to 0x489da8 (164 bytes)\n// \n// 6 xrefs:\n// > EditorUI::onPlaytest @ 0x489e7a\n// > EditorUI::init @ 0x48b260\n// > EditorUI::handleEditorAction @ 0x6f1a2e\n// > EditorUI::handleEditorAction @ 0x6f1a40\n// > EditorUI::handleEditorAction @ 0x6f1a52\n// > EditorUI::handleEditorAction @ 0x6f1a64\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:49:28 +0000\n// \n\nchar *__fastcall EditorUI::toggleMode(EditorUI *this, cocos2d::CCObject *a2)\n{\n  char *result; // r0\n  unsigned int v4; // r5\n  EditorSFXManager *v5; // r0\n  int v6; // r5\n  EditorSFXManager *v7; // r0\n  int v8; // r3\n  char *v9; // r0\n\n  result = (char *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);\n  if ( *((char **)this + 235) != result )\n  {\n    *((_DWORD *)this + 235) = result;\n    v4 = (unsigned int)(result - 1);\n    v5 = (EditorSFXManager *)EditorUI::resetUI(this);\n    if ( v4 > 3 )\n      v6 = 169;\n    else\n      v6 = *((unsigned __int8 *)&word_BEBDD8[56] + v4);\n    v7 = (EditorSFXManager *)EditorSFXManager::sharedState(v5);\n    result = (char *)EditorSFXManager::playAction(v7, v6, 169);\n    v8 = *((_DWORD *)this + 235);\n    switch ( v8 )\n    {\n      case 1:\n        v9 = (char *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 170) + 536))(*((_DWORD *)this + 170));\n        break;\n      case 2:\n        v9 = (char *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 171) + 536))(*((_DWORD *)this + 171));\n        break;\n      case 3:\n        v9 = (char *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 172) + 536))(*((_DWORD *)this + 172));\n        break;\n      case 4:\n        v9 = (char *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 173) + 536))(*((_DWORD *)this + 173));\n        break;\n      default:\n        return result;\n    }\n    return ButtonSprite::updateBGImage(v9, \"GJ_button_02.png\");\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::toggleMode from 0x489d04 to 0x489da8 (164 bytes)\n; \n; 6 xrefs:\n; > EditorUI::onPlaytest @ 0x489e7a\n; > EditorUI::init @ 0x48b260\n; > EditorUI::handleEditorAction @ 0x6f1a2e\n; > EditorUI::handleEditorAction @ 0x6f1a40\n; > EditorUI::handleEditorAction @ 0x6f1a52\n; > EditorUI::handleEditorAction @ 0x6f1a64\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:49:28 +0000\n; \nPUSH            {R3-R5,LR}                                             ; +0x0, 0x489d04\nMOV             R4, R0                                                 ; +0x2, 0x489d06\nLDR             R3, [R1]                                               ; +0x4, 0x489d08\nMOV             R0, R1                                                 ; +0x6, 0x489d0a\nLDR             R3, [R3,#0x20]                                         ; +0x8, 0x489d0c\nBLX             R3                                                     ; +0xa, 0x489d0e\nLDR.W           R3, [R4,#0x3AC]                                        ; +0xc, 0x489d10\nCMP             R3, R0                                                 ; +0x10, 0x489d14\nMOV             R5, R0                                                 ; +0x12, 0x489d16\nBEQ             locret_489DA6                                          ; +0x14, 0x489d18\nSTR.W           R0, [R4,#0x3AC]                                        ; +0x16, 0x489d1a\nSUBS            R5, #1                                                 ; +0x1a, 0x489d1e\nMOV             R0, R4; this                                           ; +0x1c, 0x489d20\nBL              _ZN8EditorUI7resetUIEv; EditorUI::resetUI(void)        ; +0x1e, 0x489d22\nCMP             R5, #3                                                 ; +0x22, 0x489d26\nBHI             loc_489D36                                             ; +0x24, 0x489d28\nLDR             R3, =(word_BEBDD8 - 0x489D30)                          ; +0x26, 0x489d2a\nADD             R3, PC; word_BEBDD8                                    ; +0x28, 0x489d2c\nADD             R5, R3                                                 ; +0x2a, 0x489d2e\nLDRB.W          R5, [R5,#0x70]                                         ; +0x2c, 0x489d30\nB               loc_489D38                                             ; +0x30, 0x489d34\nMOVS            R5, #0xA9                                              ; +0x32, 0x489d36\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x34, 0x489d38\nMOV             R1, R5; int                                            ; +0x38, 0x489d3c\nMOVS            R2, #0xA9; int                                         ; +0x3a, 0x489d3e\nBL              _ZN16EditorSFXManager10playActionEii; EditorSFXManager::playAction(int,int) ; +0x3c, 0x489d40\nLDR.W           R3, [R4,#0x3AC]                                        ; +0x40, 0x489d44\nCMP             R3, #1                                                 ; +0x44, 0x489d48\nBNE             loc_489D5E                                             ; +0x46, 0x489d4a\nLDR.W           R0, [R4,#0x2A8]                                        ; +0x48, 0x489d4c\nLDR             R3, [R0]                                               ; +0x4c, 0x489d50\nLDR.W           R3, [R3,#0x218]                                        ; +0x4e, 0x489d52\nBLX             R3                                                     ; +0x52, 0x489d56\nLDR             R1, =(aGjButton02Png - 0x489D5E); \"GJ_button_02.png\"   ; +0x54, 0x489d58\nADD             R1, PC; \"GJ_button_02.png\"                             ; +0x56, 0x489d5a\nB               loc_489D9E                                             ; +0x58, 0x489d5c\nCMP             R3, #2                                                 ; +0x5a, 0x489d5e\nBNE             loc_489D74                                             ; +0x5c, 0x489d60\nLDR.W           R0, [R4,#0x2AC]                                        ; +0x5e, 0x489d62\nLDR             R3, [R0]                                               ; +0x62, 0x489d66\nLDR.W           R3, [R3,#0x218]                                        ; +0x64, 0x489d68\nBLX             R3                                                     ; +0x68, 0x489d6c\nLDR             R1, =(aGjButton02Png - 0x489D74); \"GJ_button_02.png\"   ; +0x6a, 0x489d6e\nADD             R1, PC; \"GJ_button_02.png\"                             ; +0x6c, 0x489d70\nB               loc_489D9E                                             ; +0x6e, 0x489d72\nCMP             R3, #3                                                 ; +0x70, 0x489d74\nBNE             loc_489D8A                                             ; +0x72, 0x489d76\nLDR.W           R0, [R4,#0x2B0]                                        ; +0x74, 0x489d78\nLDR             R3, [R0]                                               ; +0x78, 0x489d7c\nLDR.W           R3, [R3,#0x218]                                        ; +0x7a, 0x489d7e\nBLX             R3                                                     ; +0x7e, 0x489d82\nLDR             R1, =(aGjButton02Png - 0x489D8A); \"GJ_button_02.png\"   ; +0x80, 0x489d84\nADD             R1, PC; \"GJ_button_02.png\"                             ; +0x82, 0x489d86\nB               loc_489D9E                                             ; +0x84, 0x489d88\nCMP             R3, #4                                                 ; +0x86, 0x489d8a\nBNE             locret_489DA6                                          ; +0x88, 0x489d8c\nLDR.W           R0, [R4,#0x2B4]                                        ; +0x8a, 0x489d8e\nLDR             R3, [R0]                                               ; +0x8e, 0x489d92\nLDR.W           R3, [R3,#0x218]                                        ; +0x90, 0x489d94\nBLX             R3                                                     ; +0x94, 0x489d98\nLDR             R1, =(aGjButton02Png - 0x489DA0); \"GJ_button_02.png\"   ; +0x96, 0x489d9a\nADD             R1, PC; \"GJ_button_02.png\"                             ; +0x98, 0x489d9c\nPOP.W           {R3-R5,LR}                                             ; +0x9a, 0x489d9e\nB.W             _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0x9e, 0x489da2\nPOP             {R3-R5,PC}                                             ; +0xa2, 0x489da6", "xrefs": ["EditorUI::onPlaytest @ 0x489e7a", "EditorUI::init @ 0x48b260", "EditorUI::handleEditorAction @ 0x6f1a2e", "EditorUI::handleEditorAction @ 0x6f1a40", "EditorUI::handleEditorAction @ 0x6f1a52", "EditorUI::handleEditorAction @ 0x6f1a64"], "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"}