//
// GameManager::setIntGameVariable from 0x5ecf2c to 0x5ed06c (320 bytes)
//
// 22 xrefs:
// > GameManager::firstLoad @ 0x5f0be8
// > GameManager::firstLoad @ 0x5f0e10
// > GameManager::firstLoad @ 0x5f0e24
// > GameManager::dataLoaded @ 0x5fb5ec
// > GameManager::dataLoaded @ 0x5fb610
// > EditorUI::onResetSpecialFilter @ 0x685db0
// > EditorUI::onResetSpecialFilter @ 0x685dd0
// > EditorUI::onUpdateDeleteFilter @ 0x688e40
// > EditorUI::onUpdateDeleteFilter @ 0x688e54
// > EditorUI::onUpdateDeleteFilter @ 0x688e7c
// > EditorUI::onUpdateDeleteFilter @ 0x688ea0
// > EditorUI::setupCreateMenu @ 0x6b3714
// > EditorUI::setupCreateMenu @ 0x6b3730
// > EditorUI::setIDPopupClosed @ 0x6be71c
// > EditorUI::setIDPopupClosed @ 0x6be80c
// > LevelBrowserLayer::setIDPopupClosed @ 0x6ece7c
// > LevelBrowserLayer::setIDPopupClosed @ 0x6ece98
// > EditorOptionsLayer::onClose @ 0x8c298c
// > EditorOptionsLayer::onClose @ 0x8c299c
// > LevelLeaderboard::onChangeType @ 0x933970
// > LevelLeaderboard::onChangeMode @ 0x9339cc
// > ??> @ 0xb3340
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void GameManager::setIntGameVariable(GameManager *a1, const char *a2, int a3)
{
cocos2d::CCString *v5; // x0
char *CString; // x23
const char *v7; // x1
cocos2d::CCDictionary *m_valueKeeper; // x22
cocos2d::CCObject *v9; // x21
void *v10; // x0
unsigned int *v11; // x2
int v12; // w1
__int64 v13; // [xsp+50h] [xbp+50h] BYREF
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s%s", "gv_", a2);
CString = (char *)cocos2d::CCString::getCString(v5);
v7 = (const char *)(unsigned int)a3;
m_valueKeeper = a1->m_valueKeeper;
v9 = (cocos2d::CCObject *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v7);
sub_D153B8((int)&v13, CString);
cocos2d::CCDictionary::setObject((int)m_valueKeeper, v9);
v10 = (void *)(v13 - 24);
if ( (__int64 *)(v13 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v11 = (unsigned int *)(v13 - 8);
do
v12 = __ldaxr(v11);
while ( __stlxr(v12 - 1, v11) );
}
else
{
v12 = *(_DWORD *)(v13 - 8);
*(_DWORD *)(v13 - 8) = v12 - 1;
}
if ( v12 <= 0 )
operator delete(v10);
}
}