//
// DS_Dictionary::removeKey from 0xdb639c to 0xdb64a4 (264 bytes)
//
// 12 xrefs:
// > GJGameLevel::getExportSaveString @ 0x806618
// > GameLevelManager::prunePlatformerJournalKeys @ 0x82ffec
// > sub_833644 @ 0x8337b8
// > GameLevelManager::writePlatformerSaveJournal @ 0x83ce30
// > GameLevelManager::replayPlatformerSaveJournal @ 0x845154
// > DS_Dictionary::setStringArrayForKey @ 0xdb6e68
// > DS_Dictionary::getArrayForKey @ 0xdbbe20
// > DS_Dictionary::setVec2ForKey @ 0xdbcd84
// > DS_Dictionary::setRectForKey @ 0xdbd144
// > DS_Dictionary::setVec2ArrayForKey @ 0xdbd3bc
// > DS_Dictionary::setRectArrayForKey @ 0xdbd7f4
// > ??> @ 0x6e6e0
//
// 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
//
__int64 __fastcall DS_Dictionary::removeKey(DS_Dictionary *this, const char *a2)
{
int v4; // w1
pugi::xml_node *v5; // x0
const char *v6; // x1
const char *v7; // x0
const char *v8; // x1
__int64 v10; // x21
__int64 i; // [xsp+48h] [xbp+48h] BYREF
__int64 sibling; // [xsp+50h] [xbp+50h] BYREF
v4 = *((unsigned __int8 *)this + 232);
v5 = (pugi::xml_node *)(*((_QWORD *)this + 27) - 8LL);
if ( v4 )
v6 = "key";
else
v6 = "k";
for ( i = pugi::xml_node::child(v5, v6);
pugi::xml_node::operator void (*)(pugi::xml_node***)(&i);
i = pugi::xml_node::next_sibling((pugi::xml_node *)&i, v8) )
{
v7 = (const char *)pugi::xml_node::child_value((pugi::xml_node *)&i);
if ( !strcmp(v7, a2) )
{
v10 = *((_QWORD *)this + 27);
sibling = pugi::xml_node::next_sibling((pugi::xml_node *)&i);
pugi::xml_node::remove_child((pugi::xml_node *)(v10 - 8), (const pugi::xml_node *)&sibling);
pugi::xml_node::remove_child((pugi::xml_node *)(*((_QWORD *)this + 27) - 8LL), (const pugi::xml_node *)&i);
return _stack_chk_guard;
}
if ( *((_BYTE *)this + 232) )
v8 = "key";
else
v8 = "k";
}
return _stack_chk_guard;
}