//
// DS_Dictionary::addBoolValuesToMapForKeySpecial from 0x100181440 to 0x10018177c (828 bytes)
//
// 1 xrefs:
// > GameLevelManager::dataLoaded @ 0x10053c0bd
//
// 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::addBoolValuesToMapForKeySpecial(
DS_Dictionary *a1,
std::map
*a2,
const char *a3,
bool a4)
{
double v4; // xmm0_8
char *v6; // rbx
const char *v7; // r15
size_t v8; // rax
size_t v9; // rbx
char *v10; // r12
size_t v11; // r14
unsigned int v12; // r12d
char v13; // r14
unsigned __int64 v14; // rdx
char *v15; // r15
char *v16; // rax
char *v17; // rax
unsigned __int8 v18; // r12
char *v19; // r15
__int64 v20; // rbx
char *v21; // r12
__int64 v22; // rdx
char *v23; // rax
char *v24; // rax
char *v25; // rax
char *v26; // rax
__int64 *p_dst; // [rsp+0h] [rbp-70h] BYREF
std::map *v28; // [rsp+8h] [rbp-68h]
DS_Dictionary *v29; // [rsp+10h] [rbp-60h]
const char *v30; // [rsp+18h] [rbp-58h]
__int64 v31; // [rsp+20h] [rbp-50h] BYREF
__int64 __dst; // [rsp+28h] [rbp-48h] BYREF
__int64 v33; // [rsp+30h] [rbp-40h]
char *v34; // [rsp+38h] [rbp-38h]
char v35[41]; // [rsp+47h] [rbp-29h] BYREF
v28 = a2;
if ( a4 || a3 == nullptr || DS_Dictionary::stepIntoSubDictWithKey(a1, a3) )
{
v30 = a3;
v29 = a1;
v31 = sub_10063B9B0(&a1->dictTree.__end_[-1]);
if ( sub_10063B3F0(&v31) )
{
while ( 1 )
{
v7 = (const char *)sub_10063B880(&v31);
v8 = strlen(v7);
if ( v8 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v4);
v9 = v8;
if ( v8 >= 0x17 )
break;
LOBYTE(__dst) = 2 * v8;
v10 = (char *)&__dst + 1;
if ( v8 )
goto LABEL_15;
LABEL_16:
v10[v9] = 0;
v12 = (unsigned __int8)__dst;
v13 = __dst & 1;
if ( (__dst & 1) == 0 )
{
if ( atoi((const char *)&__dst + 1) > 0 )
goto LABEL_7;
v14 = v12 >> 1;
v6 = (char *)&__dst + 1;
if ( v14 < 4 )
goto LABEL_27;
LABEL_21:
v15 = &v6[v14];
v16 = v6;
do
{
v17 = (char *)memchr(v16, 82, v14 - 3);
if ( !v17 )
break;
if ( *(_DWORD *)v17 == 1702125906 )
{
if ( v17 != v15 && v17 - v6 != -1 )
goto LABEL_46;
break;
}
v16 = v17 + 1;
v14 = v15 - v16;
}
while ( v15 - v16 >= 4 );
LABEL_27:
v18 = (unsigned __int8)v12 >> 1;
v19 = v34;
if ( !v13 )
v19 = (char *)&__dst + 1;
v20 = v18;
if ( v13 )
v20 = v33;
if ( v20 >= 4 )
{
v21 = &v19[v20];
v22 = v20;
v23 = v19;
do
{
v24 = (char *)memchr(v23, 108, v22 - 3);
if ( !v24 )
break;
if ( *(_DWORD *)v24 == 1701538156 )
{
if ( v24 != v21 && v24 - v19 != -1 )
goto LABEL_46;
break;
}
v23 = v24 + 1;
v22 = v21 - v23;
}
while ( v21 - v23 >= 4 );
if ( v20 >= 6 )
{
v25 = v19;
do
{
v26 = (char *)memchr(v25, 114, v20 - 5);
if ( !v26 )
break;
if ( !(*(_DWORD *)v26 ^ 0x6F706572 | *((unsigned __int16 *)v26 + 2) ^ 0x7472) )
{
if ( v26 != v21 && v26 - v19 != -1 )
goto LABEL_46;
break;
}
v25 = v26 + 1;
v20 = v21 - v25;
}
while ( v21 - v25 >= 6 );
}
}
p_dst = &__dst;
*(_BYTE *)(sub_100183FA0(v28, &__dst, &unk_100816FC8, &p_dst, v35) + 56) = 1;
v13 = __dst & 1;
LABEL_46:
if ( !v13 )
goto LABEL_7;
goto LABEL_6;
}
v6 = v34;
if ( atoi(v34) <= 0 )
{
v14 = v33;
if ( v33 >= 4 )
goto LABEL_21;
goto LABEL_27;
}
LABEL_6:
operator delete(v34);
LABEL_7:
__dst = sub_10063B780(&v31);
v31 = sub_10063B780(&__dst);
if ( !sub_10063B3F0(&v31) )
goto LABEL_48;
}
v11 = (v8 | 7) + 1;
if ( (v8 | 7) == 0x17 )
v11 = 26;
v10 = (char *)operator new(v11);
v34 = v10;
__dst = v11 + 1;
v33 = v9;
LABEL_15:
memmove(v10, v7, v9);
goto LABEL_16;
}
LABEL_48:
if ( v30 )
{
if ( (std::__vector_base::pointer)((char *)v29->dictTree.__end_ - (char *)v29->dictTree.__begin_) >= (std::__vector_base::pointer)9 )
--v29->dictTree.__end_;
}
}
}