//
// DS_Dictionary::setRectArrayForKey from 0x1001802e0 to 0x1001806d7 (1015 bytes)
//
// 1 xrefs:
// > DS_Dictionary::setRectArrayForKey_1 @ 0x1001802d7
//
// 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::setRectArrayForKey(
DS_Dictionary *a1,
const char *a2,
std::vector *const a3,
bool a4)
{
DS_Dictionary *v6; // r14
const char *v7; // r12
bool v8; // zf
const char *v9; // rsi
char *v10; // rax
const char *v11; // rsi
__int64 v12; // rax
const char *v13; // rsi
__int64 v14; // r14
unsigned __int64 v15; // r12
const char *v16; // rsi
char *v17; // rsi
const char *v18; // rsi
_QWORD v19[2]; // [rsp+0h] [rbp-1B0h] BYREF
__int64 (__fastcall **v20)(); // [rsp+10h] [rbp-1A0h] BYREF
void *v21; // [rsp+18h] [rbp-198h] BYREF
std::locale v22; // [rsp+20h] [rbp-190h] BYREF
char v23; // [rsp+58h] [rbp-158h]
void *v24; // [rsp+68h] [rbp-148h]
__int64 (__fastcall **v25)(); // [rsp+80h] [rbp-130h] BYREF
__int64 v26; // [rsp+118h] [rbp-98h] BYREF
__int64 v27; // [rsp+120h] [rbp-90h] BYREF
__int64 (__fastcall **v28)(); // [rsp+128h] [rbp-88h]
__int64 (__fastcall **v29)(); // [rsp+130h] [rbp-80h]
__int64 (__fastcall **v30)(); // [rsp+138h] [rbp-78h]
__int64 (__fastcall **v31)(); // [rsp+140h] [rbp-70h]
void (__cdecl **v32)(std::streambuf *__hidden); // [rsp+148h] [rbp-68h]
_UNKNOWN ***v33; // [rsp+150h] [rbp-60h]
char v34; // [rsp+158h] [rbp-58h] BYREF
char v35; // [rsp+159h] [rbp-57h] BYREF
void *__p; // [rsp+168h] [rbp-48h]
__int64 v37; // [rsp+170h] [rbp-40h] BYREF
__int64 v38; // [rsp+178h] [rbp-38h] BYREF
DS_Dictionary *v39; // [rsp+180h] [rbp-30h]
LODWORD(v39) = a4;
v6 = a1;
DS_Dictionary::removeKey_1(a1, a2);
pugi::xml_node::xml_node(&v38);
pugi::xml_node::xml_node(&v37);
v7 = "k";
v8 = (_DWORD)v39 == 0;
v39 = a1;
if ( v8 )
goto LABEL_11;
v9 = "k";
if ( a1->compatible )
v9 = "key";
v19[0] = sub_10063B550(&a1->dictTree.__end_[-1], v9);
if ( !sub_10063B3F0(v19) )
{
LABEL_10:
v6 = v39;
LABEL_11:
if ( v6->compatible )
v7 = "key";
v12 = sub_10063C660(&v6->dictTree.__end_[-1], v7);
goto LABEL_14;
}
while ( 1 )
{
v10 = (char *)sub_10063B880(v19);
if ( !sub_1001796D0(v10, (char *)a2) )
break;
v11 = "key";
if ( !v39->compatible )
v11 = "k";
v19[0] = sub_10063B730(v19, v11);
if ( !sub_10063B3F0(v19) )
goto LABEL_10;
}
v6 = v39;
v18 = "k";
if ( v39->compatible )
v18 = "key";
v12 = sub_10063C8D0(&v39->dictTree.__end_[-1], v18, v19);
LABEL_14:
v38 = v12;
v19[0] = sub_10063C150(&v38, 3);
sub_10063BA40(v19, a2);
v13 = "a";
if ( v6->compatible )
v13 = "array";
v37 = sub_10063C7D0(&v6->dictTree.__end_[-1], v13, &v38);
if ( a3->__end_ != a3->__begin_ )
{
v14 = 0;
v29 = &off_1008C3D68;
v30 = off_1008C3DB8;
v28 = off_1008C3D90;
v31 = &off_1008C3F58;
v32 = &`vtable for'std::streambuf.~basic_streambuf;
v33 = off_1008C3DD0;
v15 = 0;
do
{
sub_10017F730((__int64)v19);
sub_100183CF0(&v20, "{{", 2);
std::ostream::operator<<(&v20, a3->__begin_[v14].origin.x);
sub_100183CF0(&v20, ",", 1);
std::ostream::operator<<(&v20, a3->__begin_[v14].origin.y);
sub_100183CF0(&v20, "},{", 3);
std::ostream::operator<<(&v20, a3->__begin_[v14].size.width);
sub_100183CF0(&v20, ",", 1);
std::ostream::operator<<(&v20, a3->__begin_[v14].size.height);
sub_100183CF0(&v20, "}}", 2);
v16 = "s";
if ( v39->compatible )
v16 = "string";
v27 = sub_10063C660(&v37, v16);
v26 = sub_10063C150(&v27, 3);
sub_1001837B0(&v34, &v21);
v17 = &v35;
if ( (v34 & 1) != 0 )
v17 = (char *)__p;
sub_10063BA40(&v26, v17);
if ( (v34 & 1) != 0 )
operator delete(__p);
v19[0] = v29;
v25 = v30;
v20 = v28;
v21 = v31;
if ( (v23 & 1) != 0 )
operator delete(v24);
v21 = v32;
std::locale::~locale(&v22);
std::iostream::~iostream(v19, v33);
std::ios::~ios(&v25);
++v15;
++v14;
}
while ( a3->__end_ - a3->__begin_ > v15 );
}
}