//
// DS_Dictionary::setStringArrayForKey from 0x10015f070 to 0x10015f2a6 (566 bytes)
//
// 1 xrefs:
// > DS_Dictionary::setStringArrayForKey_1 @ 0x10015f067
//
// 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:07 +0000
//
unsigned __int64 __fastcall DS_Dictionary::setStringArrayForKey(__int64 a1, char *a2, __int64 *a3, int a4)
{
const char *v7; // r12
const char *v8; // rsi
char *v9; // rax
const char *v10; // rsi
__int64 v11; // rax
const char *v12; // rsi
unsigned __int64 result; // rax
__int64 v14; // r15
unsigned __int64 v15; // r12
__int64 v16; // rsi
const char *v17; // rsi
__int64 v18; // rax
const char *v19; // rsi
__int64 v20; // [rsp+8h] [rbp-48h] BYREF
__int64 v21; // [rsp+10h] [rbp-40h] BYREF
__int64 v22; // [rsp+18h] [rbp-38h] BYREF
_QWORD v23[6]; // [rsp+20h] [rbp-30h] BYREF
DS_Dictionary::removeKey_1(a1, a2);
pugi::xml_node::xml_node(&v22);
pugi::xml_node::xml_node(&v21);
v7 = "k";
if ( !a4 )
goto LABEL_10;
v8 = "k";
if ( *(_BYTE *)(a1 + 232) )
v8 = "key";
v23[0] = sub_100718180(*(_QWORD *)(a1 + 216) - 8LL, v8);
if ( sub_100718020(v23) )
{
while ( 1 )
{
v9 = (char *)sub_1007184B0(v23);
if ( !sub_100158A80(v9, a2) )
break;
v10 = "key";
if ( !*(_BYTE *)(a1 + 232) )
v10 = "k";
v23[0] = sub_100718360(v23, v10);
if ( !sub_100718020(v23) )
goto LABEL_10;
}
v19 = "k";
if ( *(_BYTE *)(a1 + 232) )
v19 = "key";
v11 = sub_100719500(*(_QWORD *)(a1 + 216) - 8LL, v19, v23);
}
else
{
LABEL_10:
if ( *(_BYTE *)(a1 + 232) )
v7 = "key";
v11 = sub_100719290(*(_QWORD *)(a1 + 216) - 8LL, v7);
}
v22 = v11;
v23[0] = sub_100718D80(&v22, 3);
sub_100718670(v23, a2);
v12 = "a";
if ( *(_BYTE *)(a1 + 232) )
v12 = "array";
v21 = sub_100719400(*(_QWORD *)(a1 + 216) - 8LL, v12, &v22);
result = a3[1];
if ( result != *a3 )
{
v14 = 16;
v15 = 0;
do
{
v17 = "string";
if ( !*(_BYTE *)(a1 + 232) )
v17 = "s";
v20 = sub_100719290(&v21, v17);
v23[0] = sub_100718D80(&v20, 3);
v18 = *a3;
if ( (*(_BYTE *)(*a3 + v14 - 16) & 1) != 0 )
v16 = *(_QWORD *)(v18 + v14);
else
v16 = v18 + v14 - 15;
sub_100718670(v23, v16);
++v15;
result = 0xAAAAAAAAAAAAAAABLL * ((a3[1] - *a3) >> 3);
v14 += 24;
}
while ( result > v15 );
}
return result;
}