{"type": "func", "start": 4297716096, "end": 4297716543, "name": "GameOptionsLayer::didToggle", "pseudocode": "// \n// GameOptionsLayer::didToggle from 0x10029f180 to 0x10029f33f (447 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x100b09688\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 12:27:54 +0000\n// \n\nvoid __fastcall GameOptionsLayer::didToggle(__int64 a1, int a2, __int64 a3)\n{\n  __int64 v3; // rsi\n  __int64 v5; // rax\n  const char *v6; // rsi\n  __int64 v7; // rax\n  __int64 v8; // rdi\n  __int64 v9; // rbx\n  __int64 v10; // rdx\n  double v11; // xmm0_8\n  __int64 v12; // rax\n  unsigned __int8 GameVariable; // al\n  __int64 v14; // rax\n  __int64 v15; // rdi\n  unsigned __int8 v16; // bl\n  __int64 v17; // rdx\n  __int64 v18; // rdx\n  __int64 v19; // rax\n  double v20; // xmm0_8\n  __int64 v21; // rax\n  __int64 v22; // rax\n  __int64 v23; // r14\n  __int64 v24; // rdx\n  unsigned __int64 v25; // xmm0_8\n  __int64 v26; // rax\n  __int64 v27; // rax\n  const char *v28; // rsi\n  double v29; // xmm0_8\n  __int64 v30; // rax\n  double v31; // xmm0_8\n  __int64 v32; // rax\n  __int64 v33; // rax\n  const char *v34; // rsi\n  __int64 v35; // rdi\n  __int64 v36; // rdx\n  __int64 v37; // rdx\n  __int64 v38; // rax\n  __int64 v39; // rax\n  __int64 v40; // rdx\n\n  v3 = (unsigned int)(a2 - 1);\n  switch ( (int)v3 )\n  {\n    case 0:\n      GameManager::sharedState(a1, v3, a3);\n      v6 = \"0026\";\n      goto LABEL_10;\n    case 1:\n      GameManager::sharedState(a1, v3, a3);\n      v6 = \"0027\";\nLABEL_10:\n      GameManager::toggleGameVariable(v5, v6);\n      return;\n    case 2:\n      GameManager::sharedState(a1, v3, a3);\n      v23 = v22;\n      v25 = GameManager::sharedState(a1, v3, v24).u64[0];\n      *(_BYTE *)(v23 + 924) = *(_BYTE *)(v26 + 924) ^ 1;\n      goto LABEL_14;\n    case 3:\n      v25 = GameManager::sharedState(a1, v3, a3).u64[0];\n      v28 = \"0040\";\n      goto LABEL_13;\n    case 4:\n      GameManager::sharedState(a1, v3, a3);\n      v8 = v7;\n      GameManager::toggleGameVariable(v7, \"0144\");\n      v9 = *(_QWORD *)(a1 + 1120);\n      *(_QWORD *)&v11 = GameManager::sharedState(v8, \"0144\", v10).u64[0];\n      GameVariable = GameManager::getGameVariable(v12, \"0144\");\n      GJBaseGameLayer::toggleAudioVisualizer(v9, GameVariable, v11);\n      return;\n    case 5:\n      *(_QWORD *)&v31 = GameManager::sharedState(a1, v3, a3).u64[0];\n      GameManager::toggleGameVariable(v32, \"0109\");\n      (*(void (__fastcall **)(_QWORD, double))(**(_QWORD **)(a1 + 1120) + 1576LL))(*(_QWORD *)(a1 + 1120), v31);\n      return;\n    case 6:\n      v25 = GameManager::sharedState(a1, v3, a3).u64[0];\n      v28 = \"0145\";\nLABEL_13:\n      GameManager::toggleGameVariable(v27, v28);\nLABEL_14:\n      (*(void (__fastcall **)(_QWORD, double))(**(_QWORD **)(a1 + 1120) + 1568LL))(\n        *(_QWORD *)(a1 + 1120),\n        *(double *)&v25);\n      return;\n    case 7:\n      *(_QWORD *)&v29 = GameManager::sharedState(a1, v3, a3).u64[0];\n      GameManager::toggleGameVariable(v30, \"0146\");\n      (*(void (__fastcall **)(_QWORD, double))(**(_QWORD **)(a1 + 1120) + 1584LL))(*(_QWORD *)(a1 + 1120), v29);\n      return;\n    case 8:\n      GameManager::sharedState(a1, v3, a3);\n      v34 = \"0166\";\n      goto LABEL_17;\n    case 9:\n      GameManager::sharedState(a1, v3, a3);\n      v15 = v14;\n      v16 = GameManager::toggleGameVariable(v14, \"0173\");\n      GameManager::sharedState(v15, \"0173\", v17);\n      if ( *(_QWORD *)(v19 + 544) )\n      {\n        *(_QWORD *)&v20 = GameManager::sharedState(v15, \"0173\", v18).u64[0];\n        sub_10007A340(*(_QWORD *)(v21 + 544), v16, v20);\n      }\n      return;\n    case 10:\n      GameManager::sharedState(a1, v3, a3);\n      v34 = \"0179\";\nLABEL_17:\n      v35 = v33;\n      GameManager::toggleGameVariable(v33, v34);\n      GameManager::sharedState(v35, v34, v36);\n      if ( *(_QWORD *)(v38 + 544) )\n      {\n        GameManager::sharedState(v35, v34, v37);\n        PlayLayer::updateDebugDrawSettings(*(_BYTE **)(v39 + 544), (__int64)v34, v40);\n      }\n      break;\n    default:\n      return;\n  }\n}", "assembly": "; \n; GameOptionsLayer::didToggle from 0x10029f180 to 0x10029f33f (447 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x100b09688\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 12:27:54 +0000\n; \npush    rbp                                                            ; +0x0, 0x10029f180\nmov     rbp, rsp                                                       ; +0x1, 0x10029f181\npush    r14                                                            ; +0x4, 0x10029f184\npush    rbx                                                            ; +0x6, 0x10029f186\ndec     esi; switch 11 cases                                           ; +0x7, 0x10029f187\ncmp     esi, 0Ah                                                       ; +0x9, 0x10029f189\nja      def_10029F1A3; jumptable 000000010029F1A3 default case         ; +0xc, 0x10029f18c\nmov     rbx, rdi                                                       ; +0x12, 0x10029f192\nlea     rax, jpt_10029F1A3                                             ; +0x15, 0x10029f195\nmovsxd  rcx, (jpt_10029F1A3 - 10029F340h)[rax+rsi*4]                   ; +0x1c, 0x10029f19c\nadd     rcx, rax                                                       ; +0x20, 0x10029f1a0\njmp     rcx; switch jump                                               ; +0x23, 0x10029f1a3\ncall    GameManager__sharedState; jumptable 000000010029F1A3 case 1    ; +0x25, 0x10029f1a5\nlea     rsi, a0026; \"0026\"                                             ; +0x2a, 0x10029f1aa\njmp     loc_10029F298                                                  ; +0x31, 0x10029f1b1\ncall    GameManager__sharedState; jumptable 000000010029F1A3 case 5    ; +0x36, 0x10029f1b6\nlea     r14, a0144; \"0144\"                                             ; +0x3b, 0x10029f1bb\nmov     rdi, rax                                                       ; +0x42, 0x10029f1c2\nmov     rsi, r14                                                       ; +0x45, 0x10029f1c5\ncall    GameManager__toggleGameVariable                                ; +0x48, 0x10029f1c8\nmov     rbx, [rbx+460h]                                                ; +0x4d, 0x10029f1cd\ncall    GameManager__sharedState                                       ; +0x54, 0x10029f1d4\nmov     rdi, rax                                                       ; +0x59, 0x10029f1d9\nmov     rsi, r14                                                       ; +0x5c, 0x10029f1dc\ncall    GameManager__getGameVariable                                   ; +0x5f, 0x10029f1df\nmovzx   esi, al                                                        ; +0x64, 0x10029f1e4\nmov     rdi, rbx                                                       ; +0x67, 0x10029f1e7\npop     rbx                                                            ; +0x6a, 0x10029f1ea\npop     r14                                                            ; +0x6b, 0x10029f1eb\npop     rbp                                                            ; +0x6d, 0x10029f1ed\njmp     GJBaseGameLayer__toggleAudioVisualizer                         ; +0x6e, 0x10029f1ee\ncall    GameManager__sharedState; jumptable 000000010029F1A3 case 10   ; +0x73, 0x10029f1f3\nlea     rsi, a0173; \"0173\"                                             ; +0x78, 0x10029f1f8\nmov     rdi, rax                                                       ; +0x7f, 0x10029f1ff\ncall    GameManager__toggleGameVariable                                ; +0x82, 0x10029f202\nmov     ebx, eax                                                       ; +0x87, 0x10029f207\ncall    GameManager__sharedState                                       ; +0x89, 0x10029f209\ncmp     qword ptr [rax+220h], 0                                        ; +0x8e, 0x10029f20e\njz      def_10029F1A3; jumptable 000000010029F1A3 default case         ; +0x96, 0x10029f216\ncall    GameManager__sharedState                                       ; +0x9c, 0x10029f21c\nmov     rdi, [rax+220h]                                                ; +0xa1, 0x10029f221\nmovzx   esi, bl                                                        ; +0xa8, 0x10029f228\npop     rbx                                                            ; +0xab, 0x10029f22b\npop     r14                                                            ; +0xac, 0x10029f22c\npop     rbp                                                            ; +0xae, 0x10029f22e\njmp     sub_10007A340                                                  ; +0xaf, 0x10029f22f\ncall    GameManager__sharedState; jumptable 000000010029F1A3 case 3    ; +0xb4, 0x10029f234\nmov     r14, rax                                                       ; +0xb9, 0x10029f239\ncall    GameManager__sharedState                                       ; +0xbc, 0x10029f23c\nmovzx   eax, byte ptr [rax+39Ch]                                       ; +0xc1, 0x10029f241\nxor     al, 1                                                          ; +0xc8, 0x10029f248\nmov     [r14+39Ch], al                                                 ; +0xca, 0x10029f24a\njmp     loc_10029F2E0                                                  ; +0xd1, 0x10029f251\ncall    GameManager__sharedState; jumptable 000000010029F1A3 case 4    ; +0xd6, 0x10029f256\nlea     rsi, a0040; \"0040\"                                             ; +0xdb, 0x10029f25b\njmp     short loc_10029F2D8                                            ; +0xe2, 0x10029f262\ncall    GameManager__sharedState; jumptable 000000010029F1A3 case 8    ; +0xe4, 0x10029f264\nlea     rsi, a0146; \"0146\"                                             ; +0xe9, 0x10029f269\nmov     rdi, rax                                                       ; +0xf0, 0x10029f270\ncall    GameManager__toggleGameVariable                                ; +0xf3, 0x10029f273\nmov     rdi, [rbx+460h]                                                ; +0xf8, 0x10029f278\nmov     rax, [rdi]                                                     ; +0xff, 0x10029f27f\npop     rbx                                                            ; +0x102, 0x10029f282\npop     r14                                                            ; +0x103, 0x10029f283\npop     rbp                                                            ; +0x105, 0x10029f285\njmp     qword ptr [rax+630h]                                           ; +0x106, 0x10029f286\ncall    GameManager__sharedState; jumptable 000000010029F1A3 case 2    ; +0x10c, 0x10029f28c\nlea     rsi, a0027; \"0027\"                                             ; +0x111, 0x10029f291\nmov     rdi, rax                                                       ; +0x118, 0x10029f298\npop     rbx                                                            ; +0x11b, 0x10029f29b\npop     r14                                                            ; +0x11c, 0x10029f29c\npop     rbp                                                            ; +0x11e, 0x10029f29e\njmp     GameManager__toggleGameVariable                                ; +0x11f, 0x10029f29f\ncall    GameManager__sharedState; jumptable 000000010029F1A3 case 6    ; +0x124, 0x10029f2a4\nlea     rsi, a0109; \"0109\"                                             ; +0x129, 0x10029f2a9\nmov     rdi, rax                                                       ; +0x130, 0x10029f2b0\ncall    GameManager__toggleGameVariable                                ; +0x133, 0x10029f2b3\nmov     rdi, [rbx+460h]                                                ; +0x138, 0x10029f2b8\nmov     rax, [rdi]                                                     ; +0x13f, 0x10029f2bf\npop     rbx                                                            ; +0x142, 0x10029f2c2\npop     r14                                                            ; +0x143, 0x10029f2c3\npop     rbp                                                            ; +0x145, 0x10029f2c5\njmp     qword ptr [rax+628h]                                           ; +0x146, 0x10029f2c6\ncall    GameManager__sharedState; jumptable 000000010029F1A3 case 7    ; +0x14c, 0x10029f2cc\nlea     rsi, a0145; \"0145\"                                             ; +0x151, 0x10029f2d1\nmov     rdi, rax                                                       ; +0x158, 0x10029f2d8\ncall    GameManager__toggleGameVariable                                ; +0x15b, 0x10029f2db\nmov     rdi, [rbx+460h]                                                ; +0x160, 0x10029f2e0\nmov     rax, [rdi]                                                     ; +0x167, 0x10029f2e7\npop     rbx                                                            ; +0x16a, 0x10029f2ea\npop     r14                                                            ; +0x16b, 0x10029f2eb\npop     rbp                                                            ; +0x16d, 0x10029f2ed\njmp     qword ptr [rax+620h]                                           ; +0x16e, 0x10029f2ee\ncall    GameManager__sharedState; jumptable 000000010029F1A3 case 11   ; +0x174, 0x10029f2f4\nlea     rsi, a0179; \"0179\"                                             ; +0x179, 0x10029f2f9\njmp     short loc_10029F30E                                            ; +0x180, 0x10029f300\ncall    GameManager__sharedState; jumptable 000000010029F1A3 case 9    ; +0x182, 0x10029f302\nlea     rsi, a0166; \"0166\"                                             ; +0x187, 0x10029f307\nmov     rdi, rax                                                       ; +0x18e, 0x10029f30e\ncall    GameManager__toggleGameVariable                                ; +0x191, 0x10029f311\ncall    GameManager__sharedState                                       ; +0x196, 0x10029f316\ncmp     qword ptr [rax+220h], 0                                        ; +0x19b, 0x10029f31b\njz      short def_10029F1A3; jumptable 000000010029F1A3 default case   ; +0x1a3, 0x10029f323\ncall    GameManager__sharedState                                       ; +0x1a5, 0x10029f325\nmov     rdi, [rax+220h]                                                ; +0x1aa, 0x10029f32a\npop     rbx                                                            ; +0x1b1, 0x10029f331\npop     r14                                                            ; +0x1b2, 0x10029f332\npop     rbp                                                            ; +0x1b4, 0x10029f334\njmp     PlayLayer__updateDebugDrawSettings                             ; +0x1b5, 0x10029f335\npop     rbx; jumptable 000000010029F1A3 default case                   ; +0x1ba, 0x10029f33a\npop     r14                                                            ; +0x1bb, 0x10029f33b\npop     rbp                                                            ; +0x1bd, 0x10029f33d\nretn                                                                   ; +0x1be, 0x10029f33e", "xrefs": ["<???> @ 0x100b09688"], "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"}