{"type": "func", "start": 5370300608, "end": 5370300748, "name": "EditorSFXActionConfigLayer::onToggleMode", "pseudocode": "// \n// EditorSFXActionConfigLayer::onToggleMode from 0x1401848c0 to 0x14018494c (140 bytes)\n// \n// 2 xrefs:\n// > EditorSFXActionConfigLayer::init @ 0x140183b29\n// > <???> @ 0x140918d10\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:27:38 +0000\n// \n\n__int64 __fastcall EditorSFXActionConfigLayer::onToggleMode(__int64 a1)\n{\n  unsigned int v1; // ebx\n  __int64 v3; // rax\n  __int64 Binding; // rax\n  int v5; // edi\n  unsigned int v6; // ebx\n  __int64 v7; // rax\n  __int64 v8; // rax\n  __int64 v9; // rcx\n\n  v1 = *(_DWORD *)(a1 + 1008);\n  v3 = EditorSFXManager::sharedState();\n  Binding = EditorSFXManager::findBinding(v3, v1);\n  if ( Binding )\n    v5 = *(_DWORD *)(Binding + 8);\n  else\n    v5 = 1;\n  v6 = *(_DWORD *)(a1 + 1008);\n  v7 = EditorSFXManager::sharedState();\n  v8 = EditorSFXManager::getOrCreateBinding(v7, v6);\n  *(_DWORD *)(v8 + 12) = 0;\n  *(_DWORD *)(v8 + 8) = v5 == 0;\n  v9 = *(_QWORD *)(v8 + 48);\n  if ( v9 != *(_QWORD *)(v8 + 56) )\n    *(_QWORD *)(v8 + 56) = v9;\n  *(_DWORD *)(v8 + 72) = 0;\n  *(_DWORD *)(v8 + 76) = -1;\n  *(_DWORD *)(v8 + 80) = 0;\n  return EditorSFXActionConfigLayer::refreshModeButtons(a1);\n}", "assembly": "; \n; EditorSFXActionConfigLayer::onToggleMode from 0x1401848c0 to 0x14018494c (140 bytes)\n; \n; 2 xrefs:\n; > EditorSFXActionConfigLayer::init @ 0x140183b29\n; > <???> @ 0x140918d10\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:27:38 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1401848c0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1401848c5\npush    rdi                                                            ; +0xa, 0x1401848ca\nsub     rsp, 20h                                                       ; +0xb, 0x1401848cb\nmov     ebx, [rcx+3F0h]                                                ; +0xf, 0x1401848cf\nmov     rsi, rcx                                                       ; +0x15, 0x1401848d5\ncall    EditorSFXManager__sharedState                                  ; +0x18, 0x1401848d8\nmov     edx, ebx                                                       ; +0x1d, 0x1401848dd\nmov     rcx, rax                                                       ; +0x1f, 0x1401848df\ncall    EditorSFXManager__findBinding                                  ; +0x22, 0x1401848e2\ntest    rax, rax                                                       ; +0x27, 0x1401848e7\njz      short loc_1401848F1                                            ; +0x2a, 0x1401848ea\nmov     edi, [rax+8]                                                   ; +0x2c, 0x1401848ec\njmp     short loc_1401848F6                                            ; +0x2f, 0x1401848ef\nmov     edi, 1                                                         ; +0x31, 0x1401848f1\nmov     ebx, [rsi+3F0h]                                                ; +0x36, 0x1401848f6\ncall    EditorSFXManager__sharedState                                  ; +0x3c, 0x1401848fc\nmov     edx, ebx                                                       ; +0x41, 0x140184901\nmov     rcx, rax                                                       ; +0x43, 0x140184903\ncall    EditorSFXManager__getOrCreateBinding                           ; +0x46, 0x140184906\nxor     edx, edx                                                       ; +0x4b, 0x14018490b\nmov     ecx, edx                                                       ; +0x4d, 0x14018490d\ntest    edi, edi                                                       ; +0x4f, 0x14018490f\nsetz    cl                                                             ; +0x51, 0x140184911\nmov     [rax+0Ch], edx                                                 ; +0x54, 0x140184914\nmov     [rax+8], ecx                                                   ; +0x57, 0x140184917\nmov     rcx, [rax+30h]                                                 ; +0x5a, 0x14018491a\ncmp     rcx, [rax+38h]                                                 ; +0x5e, 0x14018491e\njz      short loc_140184928                                            ; +0x62, 0x140184922\nmov     [rax+38h], rcx                                                 ; +0x64, 0x140184924\nmov     rcx, rsi                                                       ; +0x68, 0x140184928\nmov     [rax+48h], edx                                                 ; +0x6b, 0x14018492b\nmov     dword ptr [rax+4Ch], 0FFFFFFFFh                                ; +0x6e, 0x14018492e\nmov     [rax+50h], edx                                                 ; +0x75, 0x140184935\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x78, 0x140184938\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x7d, 0x14018493d\nadd     rsp, 20h                                                       ; +0x82, 0x140184942\npop     rdi                                                            ; +0x86, 0x140184946\njmp     EditorSFXActionConfigLayer__refreshModeButtons                 ; +0x87, 0x140184947", "xrefs": ["EditorSFXActionConfigLayer::init @ 0x140183b29", "<???> @ 0x140918d10"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}