//
// DS_Dictionary::getStringForKey from 0x10015d080 to 0x10015d22f (431 bytes)
//
// 89 xrefs:
// > GJChallengeItem::dataLoaded @ 0x100056437
// > GJAccountManager::dataLoaded @ 0x1000a2c2e
// > GJAccountManager::dataLoaded @ 0x1000a2c82
// > GJAccountManager::dataLoaded @ 0x1000a2cc1
// > GameManager::dataLoaded @ 0x100372d5a
// > GameManager::dataLoaded @ 0x100372da1
// > GameManager::dataLoaded @ 0x100373b6e
// > GameManager::dataLoaded @ 0x100373bb1
// > GameManager::dataLoaded @ 0x100373bf4
// > GameManager::dataLoaded @ 0x100373c37
// > GameManager::dataLoaded @ 0x100373c7a
// > GameManager::dataLoaded @ 0x100373cba
// > GameManager::dataLoaded @ 0x100373d01
// > GameManager::dataLoaded @ 0x100373d48
// > GameManager::dataLoaded @ 0x100373d8f
// > GameManager::dataLoaded @ 0x100373dd6
// > GameManager::dataLoaded @ 0x100373e1d
// > GameManager::dataLoaded @ 0x100373e64
// > GJSmartTemplate::dataLoaded @ 0x100414d6b
// > GJSmartPrefab::createWithCoder @ 0x100415281
// > GJSmartPrefab::dataLoaded @ 0x1004152fe
// > GameLevelManager::replayPlatformerSaveJournal @ 0x10054d203
// > GameLevelManager::replayPlatformerSaveJournal @ 0x10054d21f
// > GameLevelManager::replayPlatformerSaveJournal @ 0x10054d5a8
// > GJGameLevel::dataLoaded @ 0x10058926f
// > GJGameLevel::dataLoaded @ 0x100589483
// > GJGameLevel::dataLoaded @ 0x100589516
// > GJGameLevel::dataLoaded @ 0x100589594
// > GJGameLevel::dataLoaded @ 0x1005895d3
// > GJGameLevel::dataLoaded @ 0x10058962f
// > GJGameLevel::dataLoaded @ 0x10058966e
// > GJGameLevel::dataLoaded @ 0x1005896ad
// > GJGameLevel::dataLoaded @ 0x1005896ec
// > GJGameLevel::dataLoaded @ 0x100589794
// > GJGameLevel::dataLoaded @ 0x1005897d3
// > GJGameLevel::dataLoaded @ 0x100589872
// > GJGameLevel::dataLoaded @ 0x100589a74
// > GJGameLevel::dataLoaded @ 0x100589ac8
// > GJGameLevel::dataLoaded @ 0x100589b5b
// > GJGameLevel::dataLoaded @ 0x100589b9a
// > GJGameLevel::dataLoaded @ 0x100589c25
// > GJGameLevel::dataLoaded @ 0x100589c64
// > GJGameLevel::dataLoaded @ 0x100589ca3
// > GJGameLevel::dataLoaded @ 0x100589ce2
// > GJGameLevel::dataLoaded @ 0x100589d60
// > GJGameLevel::dataLoaded @ 0x100589d9f
// > GJGameLevel::dataLoaded @ 0x10058a201
// > GJGameLevel::dataLoaded @ 0x10058a2a9
// > GJGameLevel::dataLoaded @ 0x10058a32f
// > GJGameLevel::dataLoaded @ 0x10058a36e
// > GJGameLevel::dataLoaded @ 0x10058a5c3
// > GJGameLevel::dataLoaded @ 0x10058a602
// > GJLevelList::dataLoaded @ 0x10058fddb
// > GJLevelList::dataLoaded @ 0x10058fe1a
// > GJLevelList::dataLoaded @ 0x10058fe59
// > GJLevelList::dataLoaded @ 0x100590084
// > CCAnimateFrameCache::addDict_1 @ 0x10059980d
// > CCAnimateFrameCache::addDict_1 @ 0x100599869
// > CCAnimateFrameCache::addDict_1 @ 0x1005998c1
// > SpriteDescription::initDescription_1 @ 0x100599cf0
// > SpriteDescription::initDescription_1 @ 0x100599d3a
// > SpriteDescription::initDescription_1 @ 0x100599d78
// > SpriteDescription::initDescription_1 @ 0x100599db6
// > SpriteDescription::initDescription_1 @ 0x100599e0d
// > GJKeybindManager::dataLoaded @ 0x1006191a4
// > MusicDownloadManager::dataLoaded @ 0x100657f55
// > MusicDownloadManager::dataLoaded @ 0x100657fcd
// > MusicDownloadManager::dataLoaded @ 0x10065804d
// > MusicDownloadManager::dataLoaded @ 0x1006580d1
// > MusicDownloadManager::dataLoaded @ 0x1006585c1
// > MusicDownloadManager::dataLoaded @ 0x1006585fe
// > MusicDownloadManager::dataLoaded @ 0x10065863b
// > MusicDownloadManager::dataLoaded @ 0x10065866e
// > SongInfoObject::createWithCoder @ 0x100664a87
// > SongInfoObject::createWithCoder @ 0x100664a9d
// > SongInfoObject::createWithCoder @ 0x100664aeb
// > SongInfoObject::createWithCoder @ 0x100664b13
// > SongInfoObject::createWithCoder @ 0x100664cca
// > SongInfoObject::createWithCoder @ 0x100664d05
// > SongInfoObject::createWithCoder @ 0x100664d9b
// > SongInfoObject::createWithCoder @ 0x100664ee4
// > SongInfoObject::createWithCoder @ 0x100664efa
// > SongInfoObject::createWithCoder @ 0x100664f10
// > EditorSFXManager::dataLoaded @ 0x1008ec807
// > GJEditorSoundConfig::dataLoaded @ 0x100907440
// > GJEditorSoundConfig::dataLoaded @ 0x10090747f
// > GJEditorSoundConfig::dataLoaded @ 0x100907512
// > GJEditorSoundConfig::dataLoaded @ 0x100907551
// > GJEditorSoundConfig::dataLoaded @ 0x100907662
//
// 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 12:25:06 +0000
//
_WORD *__fastcall DS_Dictionary::getStringForKey(_WORD *a1, __int64 a2, const char *a3, double a4)
{
__int64 v6; // rdi
bool v7; // zf
const char *v8; // rsi
const char *v9; // rsi
const char *v10; // rax
const char *v11; // rsi
const char *v12; // r14
size_t v13; // rax
size_t v14; // rbx
_QWORD *v15; // r13
_WORD *result; // rax
void *v17; // r15
size_t v18; // r12
__int64 v19; // [rsp+8h] [rbp-48h] BYREF
_WORD *v20; // [rsp+10h] [rbp-40h]
__int64 v21; // [rsp+18h] [rbp-38h] BYREF
_QWORD v22[6]; // [rsp+20h] [rbp-30h] BYREF
v20 = a1;
v6 = *(_QWORD *)(a2 + 216) - 8LL;
v7 = *(_BYTE *)(a2 + 232) == 0;
v8 = "k";
if ( !v7 )
v8 = "key";
v22[0] = sub_100718180(v6, v8);
if ( !sub_100718020(v22) )
{
LABEL_16:
result = v20;
*v20 = 0;
return result;
}
while ( 1 )
{
v10 = (const char *)sub_1007184B0(v22);
if ( !strcmp(v10, a3) )
{
v21 = sub_1007183B0(v22);
v11 = "s";
if ( *(_BYTE *)(a2 + 232) )
v11 = "string";
v19 = sub_100718360(v22, v11);
if ( (unsigned __int8)sub_100718220(&v21, &v19, a4) )
break;
}
v9 = "k";
if ( *(_BYTE *)(a2 + 232) )
v9 = "key";
v22[0] = sub_100718360(v22, v9);
if ( !sub_100718020(v22) )
goto LABEL_16;
}
v21 = sub_1007183B0(v22);
v12 = (const char *)sub_1007184B0(&v21);
v13 = strlen(v12);
if ( v13 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v14 = v13;
v15 = v20;
if ( v13 >= 0x17 )
{
v18 = 26;
if ( (v13 | 7) != 0x17 )
v18 = (v13 | 7) + 1;
v17 = operator new(v18);
v15[2] = v17;
*v15 = v18 + 1;
v15[1] = v14;
}
else
{
*(_BYTE *)v20 = 2 * v13;
result = v15;
v17 = (char *)v15 + 1;
if ( !v14 )
goto LABEL_21;
}
memmove(v17, v12, v14);
result = v15;
LABEL_21:
*((_BYTE *)v17 + v14) = 0;
return result;
}