//
// DS_Dictionary::setStringArrayForKey from 0x10017fc80 to 0x10017feb6 (566 bytes)
//
// 1 xrefs:
// > DS_Dictionary::setStringArrayForKey_1 @ 0x10017fc77
//
// 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::setStringArrayForKey(
DS_Dictionary *a1,
const char *a2,
std::vector *const a3,
bool a4)
{
_BOOL4 v4; // r13d
const char *v7; // r12
const char *v8; // rsi
char *v9; // rax
const char *v10; // rsi
__int64 v11; // rax
const char *v12; // rsi
__int64 v13; // r15
unsigned __int64 v14; // r12
__int64 v15; // rsi
const char *v16; // rsi
std::__vector_base::pointer begin; // rax
const char *v18; // rsi
__int64 v19; // [rsp+8h] [rbp-48h] BYREF
__int64 v20; // [rsp+10h] [rbp-40h] BYREF
__int64 v21; // [rsp+18h] [rbp-38h] BYREF
_QWORD v22[6]; // [rsp+20h] [rbp-30h] BYREF
v4 = a4;
DS_Dictionary::removeKey_1(a1, a2);
pugi::xml_node::xml_node(&v21);
pugi::xml_node::xml_node(&v20);
v7 = "k";
if ( !v4 )
goto LABEL_10;
v8 = "k";
if ( a1->compatible )
v8 = "key";
v22[0] = sub_10063B550(&a1->dictTree.__end_[-1], v8);
if ( sub_10063B3F0(v22) )
{
while ( 1 )
{
v9 = (char *)sub_10063B880(v22);
if ( !sub_1001796D0(v9, (char *)a2) )
break;
v10 = "key";
if ( !a1->compatible )
v10 = "k";
v22[0] = sub_10063B730(v22, v10);
if ( !sub_10063B3F0(v22) )
goto LABEL_10;
}
v18 = "k";
if ( a1->compatible )
v18 = "key";
v11 = sub_10063C8D0(&a1->dictTree.__end_[-1], v18, v22);
}
else
{
LABEL_10:
if ( a1->compatible )
v7 = "key";
v11 = sub_10063C660(&a1->dictTree.__end_[-1], v7);
}
v21 = v11;
v22[0] = sub_10063C150(&v21, 3);
sub_10063BA40(v22, a2);
v12 = "a";
if ( a1->compatible )
v12 = "array";
v20 = sub_10063C7D0(&a1->dictTree.__end_[-1], v12, &v21);
if ( a3->__end_ != a3->__begin_ )
{
v13 = 16;
v14 = 0;
do
{
v16 = "string";
if ( !a1->compatible )
v16 = "s";
v19 = sub_10063C660(&v20, v16);
v22[0] = sub_10063C150(&v19, 3);
begin = a3->__begin_;
if ( (*((_BYTE *)a3->__begin_ + v13 - 16) & 1) != 0 )
v15 = *(std::size_t *)((char *)&begin->m_data.m_long.capacitym1 + v13);
else
v15 = (__int64)begin + v13 - 15;
sub_10063BA40(v22, v15);
++v14;
v13 += 24;
}
while ( 0xAAAAAAAAAAAAAAABLL * (((char *)a3->__end_ - (char *)a3->__begin_) >> 3) > v14 );
}
}