//
// DS_Dictionary::getAllKeys from 0xdb7934 to 0xdb7ad0 (412 bytes)
//
// 4 xrefs:
// > GameLevelManager::collectPlatformerJournalKeys @ 0x82fc8c
// > sub_833644 @ 0x833730
// > GameLevelManager::replayPlatformerSaveJournal @ 0x845034
// > ??> @ 0xd2f88
//
// This function is hookable on this platform (idp: arm, 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 13:08:42 +0000
//
void ***__usercall DS_Dictionary::getAllKeys@(void ***__return_ptr a1@, DS_Dictionary *this@)
{
__int64 v3; // x1
char *v4; // x3
void **v5; // x0
void *v6; // x3
const char *v7; // x0
const char *v8; // x26
size_t v9; // x0
size_t v10; // x20
unsigned __int64 v11; // x0
__int64 v12; // x22
char *v13; // x0
__int64 i; // [xsp+50h] [xbp+50h] BYREF
__int64 sibling; // [xsp+58h] [xbp+58h] BYREF
__int64 v17; // [xsp+60h] [xbp+60h] BYREF
size_t v18; // [xsp+68h] [xbp+68h]
void *v19; // [xsp+70h] [xbp+70h]
__int64 v20; // [xsp+78h] [xbp+78h]
a1[1] = nullptr;
v3 = _stack_chk_guard;
a1[2] = nullptr;
*a1 = nullptr;
v20 = v3;
for ( i = pugi::xml_node::first_child((pugi::xml_node *)(*((_QWORD *)this + 27) - 8LL));
pugi::xml_node::operator void (*)(pugi::xml_node***)(&i);
i = pugi::xml_node::next_sibling((pugi::xml_node *)&sibling) )
{
v7 = (const char *)pugi::xml_node::child_value((pugi::xml_node *)&i);
v17 = 0;
v8 = v7;
v18 = 0;
v19 = nullptr;
v9 = strlen(v7);
v10 = v9;
if ( v9 <= 0x16 )
{
LOBYTE(v17) = 2 * v9;
v4 = (char *)&v17 + 1;
if ( !v9 )
{
BYTE1(v17) = 0;
v5 = a1[1];
if ( v5 >= a1[2] )
goto LABEL_12;
goto LABEL_4;
}
}
else
{
v11 = (v9 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v12 = v11 | 1;
v13 = (char *)operator new(v11);
v17 = v12;
v4 = v13;
v19 = v13;
v18 = v10;
}
*((_BYTE *)memcpy(v4, v8, v10) + v10) = 0;
v5 = a1[1];
if ( v5 >= a1[2] )
{
LABEL_12:
std::vector::__push_back_slow_path(a1, &v17);
if ( (v17 & 1) == 0 )
goto LABEL_7;
LABEL_13:
operator delete(v19);
goto LABEL_7;
}
LABEL_4:
if ( v5 )
{
v6 = (void *)v18;
*v5 = (void *)v17;
v5[1] = v6;
v5[2] = v19;
v17 = 0;
v5 = a1[1];
v18 = 0;
v19 = nullptr;
}
a1[1] = v5 + 3;
if ( (v17 & 1) != 0 )
goto LABEL_13;
LABEL_7:
sibling = pugi::xml_node::next_sibling((pugi::xml_node *)&i);
}
return a1;
}