{"type": "func", "start": 4298653312, "end": 4298653482, "name": "GameManager::toggleGameVariable", "pseudocode": "// \n// GameManager::toggleGameVariable from 0x100383e80 to 0x100383f2a (170 bytes)\n// \n// 47 xrefs:\n// > EditorUI::init @ 0x10000b4dd\n// > EditorUI::init @ 0x10000b4f1\n// > EditorUI::onStickyToggle @ 0x10000c98c\n// > EditorUI::keyDown @ 0x10005091a\n// > EditorUI::keyDown @ 0x100050bce\n// > EditorUI::keyDown @ 0x100050c1c\n// > EditorUI::keyDown @ 0x100050c65\n// > EditorUI::keyDown @ 0x100050ca2\n// > EditorPauseLayer::toggleIgnoreDamage @ 0x100294024\n// > EditorPauseLayer::toggleSelectFilter @ 0x100294044\n// > EditorPauseLayer::toggleEditorGrid @ 0x100294064\n// > EditorPauseLayer::toggleShowObjectInfo @ 0x100294088\n// > EditorPauseLayer::toggleEditorGround @ 0x1002940cc\n// > EditorPauseLayer::togglePreviewShaders @ 0x100294114\n// > EditorPauseLayer::togglePreviewParticles @ 0x100294138\n// > EditorPauseLayer::togglePreviewAnim @ 0x100294168\n// > EditorPauseLayer::toggleEditorColorMode @ 0x100294198\n// > EditorPauseLayer::toggleHideInvisible @ 0x1002941c4\n// > EditorPauseLayer::toggleDebugDraw @ 0x1002941e4\n// > EditorPauseLayer::toggleFollowPlayer @ 0x1002946f4\n// > EditorPauseLayer::togglePlaytestMusic @ 0x100294714\n// > EditorPauseLayer::toggleEffectDuration @ 0x100294734\n// > EditorPauseLayer::toggleEffectLines @ 0x100294754\n// > EditorPauseLayer::toggleEditorBackground @ 0x10029477c\n// > EditorPauseLayer::toggleGridOnTop @ 0x1002947cc\n// > EditorPauseLayer::toggleRecordOrder @ 0x100294844\n// > GJOptionsLayer::onToggle @ 0x10029cf00\n// > GameOptionsLayer::didToggle @ 0x1002b1ee8\n// > GameOptionsLayer::didToggle @ 0x1002b1f22\n// > GameOptionsLayer::didToggle @ 0x1002b1f93\n// > GameOptionsLayer::didToggle @ 0x1002b1fbf\n// > GameOptionsLayer::didToggle @ 0x1002b1fd3\n// > GameOptionsLayer::didToggle @ 0x1002b1ffb\n// > GameOptionsLayer::didToggle @ 0x1002b2031\n// > UIOptionsLayer::valueDidChange @ 0x1002b48f9\n// > GJGarageLayer::onSpecial @ 0x10036ddf4\n// > SFXBrowser::onToggleCompactMode @ 0x10043f7a2\n// > SearchSFXPopup::onSearchFolders @ 0x1004411a4\n// > CreateParticlePopup::onTogglePerfLog @ 0x10047390c\n// > UILayer::handleKeypress @ 0x1004c92c6\n// > KeybindingsLayer::onToggle @ 0x10060b624\n// > OptionsLayer::onMenuMusic @ 0x10079b1e3\n// > MoreOptionsLayer::onToggle @ 0x10079df1e\n// > MoreVideoOptionsLayer::onToggle @ 0x1007a2242\n// > ParentalOptionsLayer::onToggle @ 0x1007a4714\n// > InfoLayer::toggleExtendedMode @ 0x1007b1128\n// > InfoLayer::toggleSmallCommentMode @ 0x1007b1158\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\nbool __fastcall GameManager::toggleGameVariable(GameManager *a1, const char *a2)\n{\n  GameManager *v2; // rdi\n  void *v3; // r14\n  bool GameVariable; // al\n  GameManager *v5; // rdi\n  bool v6; // r15\n  void *v7; // r14\n  bool v8; // r14\n\n  v2 = (GameManager *)qword_1009A0E18;\n  if ( !qword_1009A0E18 )\n  {\n    v3 = operator new(0x638u);\n    sub_10038CE40(v3);\n    qword_1009A0E18 = (__int64)v3;\n    (*(void (__fastcall **)(void *))(*(_QWORD *)v3 + 80LL))(v3);\n    v2 = (GameManager *)qword_1009A0E18;\n  }\n  GameVariable = GameManager::getGameVariable(v2, a2);\n  v5 = (GameManager *)qword_1009A0E18;\n  if ( !qword_1009A0E18 )\n  {\n    v6 = GameVariable;\n    v7 = operator new(0x638u);\n    sub_10038CE40(v7);\n    qword_1009A0E18 = (__int64)v7;\n    (*(void (__fastcall **)(void *))(*(_QWORD *)v7 + 80LL))(v7);\n    v5 = (GameManager *)qword_1009A0E18;\n    GameVariable = v6;\n  }\n  v8 = !GameVariable;\n  GameManager::setGameVariable(v5, a2, !GameVariable);\n  return v8;\n}", "assembly": "; \n; GameManager::toggleGameVariable from 0x100383e80 to 0x100383f2a (170 bytes)\n; \n; 47 xrefs:\n; > EditorUI::init @ 0x10000b4dd\n; > EditorUI::init @ 0x10000b4f1\n; > EditorUI::onStickyToggle @ 0x10000c98c\n; > EditorUI::keyDown @ 0x10005091a\n; > EditorUI::keyDown @ 0x100050bce\n; > EditorUI::keyDown @ 0x100050c1c\n; > EditorUI::keyDown @ 0x100050c65\n; > EditorUI::keyDown @ 0x100050ca2\n; > EditorPauseLayer::toggleIgnoreDamage @ 0x100294024\n; > EditorPauseLayer::toggleSelectFilter @ 0x100294044\n; > EditorPauseLayer::toggleEditorGrid @ 0x100294064\n; > EditorPauseLayer::toggleShowObjectInfo @ 0x100294088\n; > EditorPauseLayer::toggleEditorGround @ 0x1002940cc\n; > EditorPauseLayer::togglePreviewShaders @ 0x100294114\n; > EditorPauseLayer::togglePreviewParticles @ 0x100294138\n; > EditorPauseLayer::togglePreviewAnim @ 0x100294168\n; > EditorPauseLayer::toggleEditorColorMode @ 0x100294198\n; > EditorPauseLayer::toggleHideInvisible @ 0x1002941c4\n; > EditorPauseLayer::toggleDebugDraw @ 0x1002941e4\n; > EditorPauseLayer::toggleFollowPlayer @ 0x1002946f4\n; > EditorPauseLayer::togglePlaytestMusic @ 0x100294714\n; > EditorPauseLayer::toggleEffectDuration @ 0x100294734\n; > EditorPauseLayer::toggleEffectLines @ 0x100294754\n; > EditorPauseLayer::toggleEditorBackground @ 0x10029477c\n; > EditorPauseLayer::toggleGridOnTop @ 0x1002947cc\n; > EditorPauseLayer::toggleRecordOrder @ 0x100294844\n; > GJOptionsLayer::onToggle @ 0x10029cf00\n; > GameOptionsLayer::didToggle @ 0x1002b1ee8\n; > GameOptionsLayer::didToggle @ 0x1002b1f22\n; > GameOptionsLayer::didToggle @ 0x1002b1f93\n; > GameOptionsLayer::didToggle @ 0x1002b1fbf\n; > GameOptionsLayer::didToggle @ 0x1002b1fd3\n; > GameOptionsLayer::didToggle @ 0x1002b1ffb\n; > GameOptionsLayer::didToggle @ 0x1002b2031\n; > UIOptionsLayer::valueDidChange @ 0x1002b48f9\n; > GJGarageLayer::onSpecial @ 0x10036ddf4\n; > SFXBrowser::onToggleCompactMode @ 0x10043f7a2\n; > SearchSFXPopup::onSearchFolders @ 0x1004411a4\n; > CreateParticlePopup::onTogglePerfLog @ 0x10047390c\n; > UILayer::handleKeypress @ 0x1004c92c6\n; > KeybindingsLayer::onToggle @ 0x10060b624\n; > OptionsLayer::onMenuMusic @ 0x10079b1e3\n; > MoreOptionsLayer::onToggle @ 0x10079df1e\n; > MoreVideoOptionsLayer::onToggle @ 0x1007a2242\n; > ParentalOptionsLayer::onToggle @ 0x1007a4714\n; > InfoLayer::toggleExtendedMode @ 0x1007b1128\n; > InfoLayer::toggleSmallCommentMode @ 0x1007b1158\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, 0x100383e80\nmov     rbp, rsp                                                       ; +0x1, 0x100383e81\npush    r15                                                            ; +0x4, 0x100383e84\npush    r14                                                            ; +0x6, 0x100383e86\npush    rbx                                                            ; +0x8, 0x100383e88\npush    rax                                                            ; +0x9, 0x100383e89\nmov     rbx, rsi                                                       ; +0xa, 0x100383e8a\nmov     rdi, cs:qword_1009A0E18                                        ; +0xd, 0x100383e8d\ntest    rdi, rdi                                                       ; +0x14, 0x100383e94\njnz     short loc_100383EC5                                            ; +0x17, 0x100383e97\nmov     edi, 638h; __sz                                                ; +0x19, 0x100383e99\ncall    __Znwm; operator new(ulong)                                    ; +0x1e, 0x100383e9e\nmov     r14, rax                                                       ; +0x23, 0x100383ea3\nmov     rdi, rax                                                       ; +0x26, 0x100383ea6\ncall    sub_10038CE40                                                  ; +0x29, 0x100383ea9\nmov     cs:qword_1009A0E18, r14                                        ; +0x2e, 0x100383eae\nmov     rax, [r14]                                                     ; +0x35, 0x100383eb5\nmov     rdi, r14                                                       ; +0x38, 0x100383eb8\ncall    qword ptr [rax+50h]                                            ; +0x3b, 0x100383ebb\nmov     rdi, cs:qword_1009A0E18                                        ; +0x3e, 0x100383ebe\nmov     rsi, rbx                                                       ; +0x45, 0x100383ec5\ncall    GameManager__getGameVariable                                   ; +0x48, 0x100383ec8\nmov     rdi, cs:qword_1009A0E18                                        ; +0x4d, 0x100383ecd\ntest    rdi, rdi                                                       ; +0x54, 0x100383ed4\njnz     short loc_100383F0B                                            ; +0x57, 0x100383ed7\nmov     r15d, eax                                                      ; +0x59, 0x100383ed9\nmov     edi, 638h; __sz                                                ; +0x5c, 0x100383edc\ncall    __Znwm; operator new(ulong)                                    ; +0x61, 0x100383ee1\nmov     r14, rax                                                       ; +0x66, 0x100383ee6\nmov     rdi, rax                                                       ; +0x69, 0x100383ee9\ncall    sub_10038CE40                                                  ; +0x6c, 0x100383eec\nmov     cs:qword_1009A0E18, r14                                        ; +0x71, 0x100383ef1\nmov     rax, [r14]                                                     ; +0x78, 0x100383ef8\nmov     rdi, r14                                                       ; +0x7b, 0x100383efb\ncall    qword ptr [rax+50h]                                            ; +0x7e, 0x100383efe\nmov     rdi, cs:qword_1009A0E18                                        ; +0x81, 0x100383f01\nmov     eax, r15d                                                      ; +0x88, 0x100383f08\nxor     al, 1                                                          ; +0x8b, 0x100383f0b\nmovzx   r14d, al                                                       ; +0x8d, 0x100383f0d\nmov     rsi, rbx                                                       ; +0x91, 0x100383f11\nmov     edx, r14d                                                      ; +0x94, 0x100383f14\ncall    GameManager__setGameVariable                                   ; +0x97, 0x100383f17\nmov     eax, r14d                                                      ; +0x9c, 0x100383f1c\nadd     rsp, 8                                                         ; +0x9f, 0x100383f1f\npop     rbx                                                            ; +0xa3, 0x100383f23\npop     r14                                                            ; +0xa4, 0x100383f24\npop     r15                                                            ; +0xa6, 0x100383f26\npop     rbp                                                            ; +0xa8, 0x100383f28\nretn                                                                   ; +0xa9, 0x100383f29", "xrefs": ["EditorUI::init @ 0x10000b4dd", "EditorUI::init @ 0x10000b4f1", "EditorUI::onStickyToggle @ 0x10000c98c", "EditorUI::keyDown @ 0x10005091a", "EditorUI::keyDown @ 0x100050bce", "EditorUI::keyDown @ 0x100050c1c", "EditorUI::keyDown @ 0x100050c65", "EditorUI::keyDown @ 0x100050ca2", "EditorPauseLayer::toggleIgnoreDamage @ 0x100294024", "EditorPauseLayer::toggleSelectFilter @ 0x100294044", "EditorPauseLayer::toggleEditorGrid @ 0x100294064", "EditorPauseLayer::toggleShowObjectInfo @ 0x100294088", "EditorPauseLayer::toggleEditorGround @ 0x1002940cc", "EditorPauseLayer::togglePreviewShaders @ 0x100294114", "EditorPauseLayer::togglePreviewParticles @ 0x100294138", "EditorPauseLayer::togglePreviewAnim @ 0x100294168", "EditorPauseLayer::toggleEditorColorMode @ 0x100294198", "EditorPauseLayer::toggleHideInvisible @ 0x1002941c4", "EditorPauseLayer::toggleDebugDraw @ 0x1002941e4", "EditorPauseLayer::toggleFollowPlayer @ 0x1002946f4", "EditorPauseLayer::togglePlaytestMusic @ 0x100294714", "EditorPauseLayer::toggleEffectDuration @ 0x100294734", "EditorPauseLayer::toggleEffectLines @ 0x100294754", "EditorPauseLayer::toggleEditorBackground @ 0x10029477c", "EditorPauseLayer::toggleGridOnTop @ 0x1002947cc", "EditorPauseLayer::toggleRecordOrder @ 0x100294844", "GJOptionsLayer::onToggle @ 0x10029cf00", "GameOptionsLayer::didToggle @ 0x1002b1ee8", "GameOptionsLayer::didToggle @ 0x1002b1f22", "GameOptionsLayer::didToggle @ 0x1002b1f93", "GameOptionsLayer::didToggle @ 0x1002b1fbf", "GameOptionsLayer::didToggle @ 0x1002b1fd3", "GameOptionsLayer::didToggle @ 0x1002b1ffb", "GameOptionsLayer::didToggle @ 0x1002b2031", "UIOptionsLayer::valueDidChange @ 0x1002b48f9", "GJGarageLayer::onSpecial @ 0x10036ddf4", "SFXBrowser::onToggleCompactMode @ 0x10043f7a2", "SearchSFXPopup::onSearchFolders @ 0x1004411a4", "CreateParticlePopup::onTogglePerfLog @ 0x10047390c", "UILayer::handleKeypress @ 0x1004c92c6", "KeybindingsLayer::onToggle @ 0x10060b624", "OptionsLayer::onMenuMusic @ 0x10079b1e3", "MoreOptionsLayer::onToggle @ 0x10079df1e", "MoreVideoOptionsLayer::onToggle @ 0x1007a2242", "ParentalOptionsLayer::onToggle @ 0x1007a4714", "InfoLayer::toggleExtendedMode @ 0x1007b1128", "InfoLayer::toggleSmallCommentMode @ 0x1007b1158"], "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"}