{"type": "func", "start": 4299156936, "end": 4299157044, "name": "LevelEditorLayer::toggleLockActiveLayer", "pseudocode": "// \n// LevelEditorLayer::toggleLockActiveLayer from 0x1003fedc8 to 0x1003fee34 (108 bytes)\n// \n// 1 xrefs:\n// > EditorUI::onLockLayer @ 0x100472d4c\n// \n// This function is hookable on this platform (idp: arm, 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:04:37 +0000\n// \n\n__int64 __fastcall LevelEditorLayer::toggleLockActiveLayer(__int64 result)\n{\n  unsigned __int64 v1; // x8\n  __int64 v2; // x9\n  __int64 v3; // x10\n  __int64 v4; // x8\n  __int64 v5; // x11\n  __int64 v6; // x11\n  int v7; // w9\n  int v8; // w8\n\n  v1 = *(unsigned __int16 *)(result + 14210);\n  if ( (unsigned int)(v1 - 10000) >= 0xFFFFD8F1 && *(_BYTE *)(result + 14010) == 1 )\n  {\n    v2 = *(_QWORD *)(result + 14528);\n    v3 = (v1 >> 3) & 0x1FF8;\n    v4 = 1LL << v1;\n    v5 = *(_QWORD *)(v2 + v3);\n    if ( (v5 & v4) != 0 )\n      v6 = v5 & ~v4;\n    else\n      v6 = v5 | v4;\n    *(_QWORD *)(v2 + v3) = v6;\n    v7 = *(_DWORD *)(result + 14552);\n    if ( (v6 & v4) != 0 )\n      v8 = v7 + 1;\n    else\n      v8 = v7 - 1;\n    *(_DWORD *)(result + 14552) = v8;\n  }\n  return result;\n}", "assembly": "; \n; LevelEditorLayer::toggleLockActiveLayer from 0x1003fedc8 to 0x1003fee34 (108 bytes)\n; \n; 1 xrefs:\n; > EditorUI::onLockLayer @ 0x100472d4c\n; \n; This function is hookable on this platform (idp: arm, 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:04:37 +0000\n; \nADD             X9, X0, #3,LSL#12                                      ; +0x0, 0x1003fedc8\nLDRH            W8, [X9,#0x782]                                        ; +0x4, 0x1003fedcc\nMOV             W10, #0xFFFFD8F0                                       ; +0x8, 0x1003fedd0\nADD             W10, W8, W10                                           ; +0xc, 0x1003fedd4\nMOV             W11, #0xFFFFD8F1                                       ; +0x10, 0x1003fedd8\nCMP             W10, W11                                               ; +0x14, 0x1003feddc\nB.CC            locret_1003FEE30                                       ; +0x18, 0x1003fede0\nLDRB            W9, [X9,#0x6BA]                                        ; +0x1c, 0x1003fede4\nCMP             W9, #1                                                 ; +0x20, 0x1003fede8\nB.NE            locret_1003FEE30                                       ; +0x24, 0x1003fedec\nLDR             X9, [X0,#0x38C0]                                       ; +0x28, 0x1003fedf0\nLSR             X10, X8, #3                                            ; +0x2c, 0x1003fedf4\nAND             X10, X10, #0x1FF8                                      ; +0x30, 0x1003fedf8\nMOV             W11, #1                                                ; +0x34, 0x1003fedfc\nLSL             X8, X11, X8                                            ; +0x38, 0x1003fee00\nLDR             X11, [X9,X10]                                          ; +0x3c, 0x1003fee04\nBIC             X12, X11, X8                                           ; +0x40, 0x1003fee08\nORR             X13, X11, X8                                           ; +0x44, 0x1003fee0c\nTST             X11, X8                                                ; +0x48, 0x1003fee10\nCSEL            X11, X13, X12, EQ                                      ; +0x4c, 0x1003fee14\nSTR             X11, [X9,X10]                                          ; +0x50, 0x1003fee18\nLDR             W9, [X0,#0x38D8]                                       ; +0x54, 0x1003fee1c\nSUB             W10, W9, #1                                            ; +0x58, 0x1003fee20\nTST             X11, X8                                                ; +0x5c, 0x1003fee24\nCSINC           W8, W10, W9, EQ                                        ; +0x60, 0x1003fee28\nSTR             W8, [X0,#0x38D8]                                       ; +0x64, 0x1003fee2c\nRET                                                                    ; +0x68, 0x1003fee30", "xrefs": ["EditorUI::onLockLayer @ 0x100472d4c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}