//
// DS_Dictionary::setStringForKey from 0x18001ffe0 to 0x180020199 (441 bytes)
//
// 7 xrefs:
// > DS_Dictionary::setObjectForKey @ 0x18001f3d8
// > DS_Dictionary::setStringForKey @ 0x18001ffd3
// > ??> @ 0x180133378
// > ??> @ 0x180133388
// > ??> @ 0x1801333a0
// > ??> @ 0x1801438a8
// > ??> @ 0x1801aed1c
//
// 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 __fastcall DS_Dictionary::setStringForKey(__int64 a1, char *a2, _QWORD *a3, char a4)
{
_QWORD *v5; // rsi
const char *v8; // rdi
const char *v9; // r8
char *v10; // rax
const char *v11; // r8
__int64 *v12; // rax
__int64 v13; // rax
const char *v14; // r8
__int64 v15; // rax
__int64 v16; // rax
__int64 v17; // [rsp+20h] [rbp-28h] BYREF
_BYTE v18[32]; // [rsp+28h] [rbp-20h] BYREF
__int64 v19; // [rsp+60h] [rbp+18h] BYREF
v5 = a3;
if ( a3[2] )
{
pugi::xml_node::xml_node((cocos2d::CCThread *)&v17);
v8 = "k";
if ( !a4 )
goto LABEL_10;
v9 = "k";
if ( *(_BYTE *)(a1 + 232) )
v9 = "key";
sub_18007FB10(*(_QWORD *)(a1 + 216) - 8LL, &v19, v9);
if ( sub_18007F4E0(&v19) )
{
while ( 1 )
{
v10 = (char *)sub_18007FB70(&v19);
if ( !sub_1800190E0(v10, a2) )
break;
v11 = "k";
if ( *(_BYTE *)(a1 + 232) )
v11 = "key";
v19 = *(_QWORD *)sub_180081A50(&v19, v18, v11);
if ( !sub_18007F4E0(&v19) )
goto LABEL_10;
}
if ( *(_BYTE *)(a1 + 232) )
v8 = "key";
v12 = (__int64 *)sub_180081070(*(_QWORD *)(a1 + 216) - 8LL, v18, v8, &v19);
}
else
{
LABEL_10:
if ( *(_BYTE *)(a1 + 232) )
v8 = "key";
v12 = (__int64 *)sub_18007F870(*(_QWORD *)(a1 + 216) - 8LL, v18, v8);
}
v17 = *v12;
v13 = sub_18007F910(&v17, &v19, 3);
sub_180085410(v13, a2);
if ( v5[3] > 0xFu )
v5 = (_QWORD *)*v5;
v14 = "s";
if ( *(_BYTE *)(a1 + 232) )
v14 = "string";
v15 = sub_180080EE0(*(_QWORD *)(a1 + 216) - 8LL, &v19, v14, &v17);
v16 = sub_18007F910(v15, v18, 3);
sub_180085410(v16, v5);
}
}