{"type": "func", "start": 4295141504, "end": 4295141634, "name": "EditorUI::toggleMode", "pseudocode": "// \n// EditorUI::toggleMode from 0x10002a880 to 0x10002a902 (130 bytes)\n// \n// 3 xrefs:\n// > EditorUI::keyDown @ 0x100050b0e\n// > EditorUI::init @ 0x100009686\n// > EditorUI::getModeBtn @ 0x10000bc44\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 __fastcall EditorUI::toggleMode(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  int v2; // eax\n  unsigned int v3; // eax\n  const char *v4; // r14\n  __int64 v5; // rdi\n  __int64 v6; // rbx\n  cocos2d::CCSpriteFrameCache *v7; // rax\n  cocos2d::CCSpriteFrame *v8; // rax\n\n  v2 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);\n  if ( a1->m_selectedMode != v2 )\n  {\n    a1->m_selectedMode = v2;\n    EditorUI::resetUI(a1);\n    v3 = a1->m_selectedMode - 1;\n    if ( v3 <= 2 )\n    {\n      v4 = off_1008B1FA8[v3];\n      v5 = *((_QWORD *)&a1->m_deleteModeBtn + v3);\n      v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 1056LL))(v5);\n      v7 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n      v8 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v7, v4);\n      (*(void (__fastcall **)(__int64, cocos2d::CCSpriteFrame *))(*(_QWORD *)v6 + 1144LL))(v6, v8);\n    }\n  }\n}", "assembly": "; \n; EditorUI::toggleMode from 0x10002a880 to 0x10002a902 (130 bytes)\n; \n; 3 xrefs:\n; > EditorUI::keyDown @ 0x100050b0e\n; > EditorUI::init @ 0x100009686\n; > EditorUI::getModeBtn @ 0x10000bc44\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    rbp                                                            ; +0x0, 0x10002a880\nmov     rbp, rsp                                                       ; +0x1, 0x10002a881\npush    r14                                                            ; +0x4, 0x10002a884\npush    rbx                                                            ; +0x6, 0x10002a886\nmov     rbx, rdi                                                       ; +0x7, 0x10002a887\nmov     rax, [rsi]                                                     ; +0xa, 0x10002a88a\nmov     rdi, rsi                                                       ; +0xd, 0x10002a88d\ncall    qword ptr [rax+40h]                                            ; +0x10, 0x10002a890\ncmp     [rbx+4E0h], eax                                                ; +0x13, 0x10002a893\njz      short loc_10002A8FD                                            ; +0x19, 0x10002a899\nmov     [rbx+4E0h], eax                                                ; +0x1b, 0x10002a89b\nmov     rdi, rbx                                                       ; +0x21, 0x10002a8a1\ncall    EditorUI__resetUI                                              ; +0x24, 0x10002a8a4\nmov     eax, [rbx+4E0h]                                                ; +0x29, 0x10002a8a9\ndec     eax                                                            ; +0x2f, 0x10002a8af\ncmp     eax, 2                                                         ; +0x31, 0x10002a8b1\nja      short loc_10002A8FD                                            ; +0x34, 0x10002a8b4\nmov     eax, eax                                                       ; +0x36, 0x10002a8b6\nlea     rcx, off_1008B1FA8; \"edit_deleteSBtn_001.png\"                  ; +0x38, 0x10002a8b8\nmov     r14, [rcx+rax*8]                                               ; +0x3f, 0x10002a8bf\nmov     rdi, [rbx+rax*8+340h]                                          ; +0x43, 0x10002a8c3\nmov     rax, [rdi]                                                     ; +0x4b, 0x10002a8cb\ncall    qword ptr [rax+420h]                                           ; +0x4e, 0x10002a8ce\nmov     rbx, rax                                                       ; +0x54, 0x10002a8d4\ncall    cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache            ; +0x57, 0x10002a8d7\nmov     rdi, rax                                                       ; +0x5c, 0x10002a8dc\nmov     rsi, r14                                                       ; +0x5f, 0x10002a8df\ncall    cocos2d__CCSpriteFrameCache__spriteFrameByName                 ; +0x62, 0x10002a8e2\nmov     rcx, [rbx]                                                     ; +0x67, 0x10002a8e7\nmov     rcx, [rcx+478h]                                                ; +0x6a, 0x10002a8ea\nmov     rdi, rbx                                                       ; +0x71, 0x10002a8f1\nmov     rsi, rax                                                       ; +0x74, 0x10002a8f4\npop     rbx                                                            ; +0x77, 0x10002a8f7\npop     r14                                                            ; +0x78, 0x10002a8f8\npop     rbp                                                            ; +0x7a, 0x10002a8fa\njmp     rcx                                                            ; +0x7b, 0x10002a8fb\npop     rbx                                                            ; +0x7d, 0x10002a8fd\npop     r14                                                            ; +0x7e, 0x10002a8fe\npop     rbp                                                            ; +0x80, 0x10002a900\nretn                                                                   ; +0x81, 0x10002a901", "xrefs": ["EditorUI::keyDown @ 0x100050b0e", "EditorUI::init @ 0x100009686", "EditorUI::getModeBtn @ 0x10000bc44"], "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"}