//
// GJKeybindManager::sharedState from 0x140388320 to 0x140388418 (248 bytes)
//
// 38 xrefs:
// > AppDelegate::setupGLView @ 0x140097d48
// > GameManager::dataLoaded @ 0x1402832de
// > GameManager::encodeDataTo @ 0x140285ebd
// > GameSettingsLayer::onCustomButton @ 0x1402c7b60
// > GlobalKeybindSource::chordsForAction @ 0x1403d5210
// > GlobalKeybindSource::actionsForChord @ 0x1403d5250
// > GlobalKeybindSource::bindChord @ 0x1403d528f
// > GlobalKeybindSource::unbindChord @ 0x1403d52bf
// > KeybindingsLayer::buildContentForTab @ 0x1403d6ee7
// > KeybindingsLayer::buildContentForTab @ 0x1403d6f98
// > KeybindingsLayer::buildContentForTab @ 0x1403d700b
// > KeybindingsLayer::buildContentForTab @ 0x1403d7063
// > KeybindingsSettingsPopup::onExport @ 0x1403d9492
// > KeybindingsSettingsPopup::onImport @ 0x1403d969a
// > KeybindingsSettingsPopup::FLAlert_Clicked @ 0x1403d9e08
// > KeybindingsSettingsPopup::FLAlert_Clicked @ 0x1403d9e1c
// > LevelEditorLayer::init @ 0x1403eda86
// > LevelEditorLayer::init @ 0x1403eda9d
// > LevelEditorLayer::onPlaytest @ 0x1403fe901
// > LevelEditorLayer::onPlaytest @ 0x1403fe918
// > LevelEditorLayer::onPausePlaytest @ 0x1403ffbb6
// > LevelEditorLayer::onPausePlaytest @ 0x1403ffbcb
// > LevelEditorLayer::onResumePlaytest @ 0x1403ffd77
// > LevelEditorLayer::onResumePlaytest @ 0x1403ffd8c
// > LevelEditorLayer::onStopPlaytest @ 0x1403fff64
// > LevelEditorLayer::onStopPlaytest @ 0x1403fff7b
// > LevelControlConfig::bindGlobalBinds @ 0x14044b421
// > KeybindCapturePopup::updateConflictLabel @ 0x14044e58d
// > KeybindCapturePopup::updateConflictLabel @ 0x14044e628
// > KeybindCapturePopup::updateConflictLabel @ 0x14044e827
// > KeybindCapturePopup::updateConflictLabel @ 0x14044e880
// > PlatformerControlsPopup::reapplyRuntime @ 0x1404509a8
// > PlatformerControlsPopup::reapplyRuntime @ 0x1404509bf
// > UILayer::dUILayer @ 0x14066fef9
// > UILayer::applyLevelBindings @ 0x140670c27
// > UILayer::applyLevelBindings @ 0x140670c44
// > UILayer::handleAction @ 0x140671406
// > ??> @ 0x140922c7c
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:31:08 +0000
//
// Hidden C++ exception states: #wind=5
__int64 GJKeybindManager::sharedState()
{
__int64 result; // rax
_QWORD *v1; // rax
_QWORD *v2; // rax
_QWORD *v3; // [rsp+30h] [rbp+8h]
result = qword_14090C000;
if ( !qword_14090C000 )
{
v3 = operator new(0xE0u);
memset(v3, 0, 0xE0u);
cocos2d::CCKeyboardActionManager::CCKeyboardActionManager((cocos2d::CCKeyboardActionManager *)v3);
*v3 = &GJKeybindManager::`vftable';
sub_14038D060(v3 + 7);
sub_14038D060(v3 + 15);
v3[23] = 0;
v3[24] = 0;
v1 = operator new(0x38u);
*v1 = v1;
v1[1] = v1;
v1[2] = v1;
*((_WORD *)v1 + 12) = 257;
v3[23] = v1;
v3[25] = 0;
v3[26] = 0;
v2 = operator new(0x38u);
*v2 = v2;
v2[1] = v2;
v2[2] = v2;
*((_WORD *)v2 + 12) = 257;
v3[25] = v2;
*((_BYTE *)v3 + 216) = 0;
qword_14090C000 = (__int64)v3;
GJKeybindManager::loadDefaults(v3);
return qword_14090C000;
}
return result;
}