{"type": "func", "start": 5369823168, "end": 5369823326, "name": "EditorUI::toggleSwipe", "pseudocode": "// \n// EditorUI::toggleSwipe from 0x14010ffc0 to 0x14011005e (158 bytes)\n// \n// 4 xrefs:\n// > EditorUI::init @ 0x1400e183e\n// > EditorUI::keyDown @ 0x140125a9b\n// > EditorUI::init @ 0x1400dfea8\n// > <???> @ 0x1406c8e80\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\n// Hidden C++ exception states: #wind=1\nvoid EditorUI::toggleSwipe(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  ButtonSprite *v3; // rax\n  const char *v4; // rdx\n  GameManager *v5; // rcx\n  void *v6; // [rsp+30h] [rbp+8h]\n\n  a1->m_swipeEnabled = !a1->m_swipeEnabled;\n  v3 = (ButtonSprite *)((__int64 (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCObject *))a1->m_swipeBtn->getNormalImage)(\n                         a1->m_swipeBtn,\n                         a2);\n  v4 = \"GJ_button_01.png\";\n  if ( a1->m_swipeEnabled )\n    v4 = \"GJ_button_02.png\";\n  ButtonSprite::updateBGImage(v3, v4);\n  v5 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v6 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v6);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v5 = (GameManager *)qword_1406C2ED8;\n  }\n  GameManager::setGameVariable(v5, \"0003\", a1->m_swipeEnabled);\n}", "assembly": "; \n; EditorUI::toggleSwipe from 0x14010ffc0 to 0x14011005e (158 bytes)\n; \n; 4 xrefs:\n; > EditorUI::init @ 0x1400e183e\n; > EditorUI::keyDown @ 0x140125a9b\n; > EditorUI::init @ 0x1400dfea8\n; > <???> @ 0x1406c8e80\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    rbx                                                            ; +0x0, 0x14010ffc0\nsub     rsp, 20h                                                       ; +0x2, 0x14010ffc2\nmov     rbx, rcx                                                       ; +0x6, 0x14010ffc6\ncmp     byte ptr [rcx+31Ch], 0                                         ; +0x9, 0x14010ffc9\nsetz    al                                                             ; +0x10, 0x14010ffd0\nmov     [rcx+31Ch], al                                                 ; +0x13, 0x14010ffd3\nmov     rcx, [rcx+370h]                                                ; +0x19, 0x14010ffd9\nmov     rax, [rcx]                                                     ; +0x20, 0x14010ffe0\ncall    qword ptr [rax+3A8h]                                           ; +0x23, 0x14010ffe3\nlea     rcx, aGjButton02Png; \"GJ_button_02.png\"                        ; +0x29, 0x14010ffe9\nlea     rdx, aGjButton01Png; \"GJ_button_01.png\"                        ; +0x30, 0x14010fff0\ncmp     byte ptr [rbx+31Ch], 0                                         ; +0x37, 0x14010fff7\ncmovnz  rdx, rcx                                                       ; +0x3e, 0x14010fffe\nmov     rcx, rax                                                       ; +0x42, 0x140110002\ncall    ButtonSprite__updateBGImage                                    ; +0x45, 0x140110005\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x4a, 0x14011000a\ntest    rcx, rcx                                                       ; +0x51, 0x140110011\njnz     short loc_140110045                                            ; +0x54, 0x140110014\nmov     ecx, 668h; Size                                                ; +0x56, 0x140110016\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x5b, 0x14011001b\nmov     [rsp+28h+arg_0], rax                                           ; +0x60, 0x140110020\nmov     rcx, rax                                                       ; +0x65, 0x140110025\ncall    sub_14017AB00                                                  ; +0x68, 0x140110028\nnop                                                                    ; +0x6d, 0x14011002d\nmov     cs:qword_1406C2ED8, rax                                        ; +0x6e, 0x14011002e\nmov     rdx, [rax]                                                     ; +0x75, 0x140110035\nmov     rcx, rax                                                       ; +0x78, 0x140110038\ncall    qword ptr [rdx+48h]                                            ; +0x7b, 0x14011003b\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x7e, 0x14011003e\nmovzx   r8d, byte ptr [rbx+31Ch]                                       ; +0x85, 0x140110045\nlea     rdx, a0003; \"0003\"                                             ; +0x8d, 0x14011004d\nadd     rsp, 20h                                                       ; +0x94, 0x140110054\npop     rbx                                                            ; +0x98, 0x140110058\njmp     GameManager__setGameVariable                                   ; +0x99, 0x140110059", "xrefs": ["EditorUI::init @ 0x1400e183e", "EditorUI::keyDown @ 0x140125a9b", "EditorUI::init @ 0x1400dfea8", "<???> @ 0x1406c8e80"], "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"}