//
// ColorAction::setupFromMap from 0xa0fcb8 to 0xa1061c (2404 bytes)
//
// 2 xrefs:
// > ColorAction::setupFromString @ 0xa10670
// > ??> @ 0x8aa48
//
// This function is hookable on this platform (idp: arm, 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:59:29 +0000
//
__int64 __fastcall ColorAction::setupFromMap(__int64 a1, __int64 a2)
{
__int64 *v4; // x0
const char *v5; // x1
char v6; // w27
__int64 *v7; // x0
const char *v8; // x1
char v9; // w26
__int64 *v10; // x0
const char *v11; // x1
char v12; // w28
__int64 *v13; // x0
const char *v14; // x1
char v15; // w27
__int64 *v16; // x0
const char *v17; // x1
char v18; // w26
__int64 *v19; // x0
const char *v20; // x1
char v21; // w28
__int64 *v22; // x0
const char *v23; // x1
__int64 *v24; // x0
const char *v25; // x1
float v26; // s0
char v27; // w0
__int64 *v28; // x0
const char *v29; // x1
__int64 *v30; // x0
const char *v31; // x1
double v32; // d0
char v33; // w0
__int64 *v34; // x0
const char *v35; // x1
int v36; // w0
char v37; // w1
__int64 *v38; // x0
const char *v39; // x1
int v40; // w26
__int64 *v41; // x0
float v42; // s0
char v43; // w0
__int64 *v44; // x0
const char *v45; // x1
float v46; // s0
char v47; // w0
__int64 *v48; // x0
const char *v49; // x1
__int64 *v50; // x0
__int64 v51; // x0
char v52; // w2
__int64 v53; // x1
__int64 *v54; // x0
const char *v55; // x1
float v56; // s0
char v57; // w0
__int64 *v58; // x0
const char *v59; // x1
int v60; // w0
char v61; // w1
float v63; // s0
char v64; // w0
__int64 *v65; // [xsp+68h] [xbp+68h] BYREF
__int64 v66; // [xsp+70h] [xbp+70h] BYREF
__int64 v67; // [xsp+78h] [xbp+78h]
void *v68; // [xsp+80h] [xbp+80h]
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, "1", 1u);
v65 = &v66;
v4 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v5 = (char *)v4 + 57;
if ( (v4[7] & 1) != 0 )
v5 = (const char *)v4[9];
v6 = atoi(v5);
if ( (v66 & 1) != 0 )
operator delete(v68);
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, &byte_120A098, 1u);
v65 = &v66;
v7 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v8 = (char *)v7 + 57;
if ( (v7[7] & 1) != 0 )
v8 = (const char *)v7[9];
v9 = atoi(v8);
if ( (v66 & 1) != 0 )
operator delete(v68);
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, "3", 1u);
v65 = &v66;
v10 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v11 = (char *)v10 + 57;
if ( (v10[7] & 1) != 0 )
v11 = (const char *)v10[9];
v12 = atoi(v11);
if ( (v66 & 1) != 0 )
operator delete(v68);
*(_BYTE *)(a1 + 72) = v6;
*(_BYTE *)(a1 + 73) = v9;
*(_BYTE *)(a1 + 74) = v12;
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, "11", 2u);
v65 = &v66;
v13 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v14 = (char *)v13 + 57;
if ( (v13[7] & 1) != 0 )
v14 = (const char *)v13[9];
v15 = atoi(v14);
if ( (v66 & 1) != 0 )
operator delete(v68);
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, &word_120A570, 2u);
v65 = &v66;
v16 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v17 = (char *)v16 + 57;
if ( (v16[7] & 1) != 0 )
v17 = (const char *)v16[9];
v18 = atoi(v17);
if ( (v66 & 1) != 0 )
operator delete(v68);
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, "13", 2u);
v65 = &v66;
v19 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v20 = (char *)v19 + 57;
if ( (v19[7] & 1) != 0 )
v20 = (const char *)v19[9];
v21 = atoi(v20);
if ( (v66 & 1) != 0 )
operator delete(v68);
*(_BYTE *)(a1 + 75) = v15;
*(_BYTE *)(a1 + 76) = v18;
*(_BYTE *)(a1 + 77) = v21;
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, &byte_11BCA00, 1u);
v65 = &v66;
v22 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v23 = (char *)v22 + 57;
if ( (v22[7] & 1) != 0 )
v23 = (const char *)v22[9];
*(_DWORD *)(a1 + 88) = atoi(v23);
if ( (v66 & 1) != 0 )
operator delete(v68);
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, "16", 2u);
v65 = &v66;
v24 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v25 = (char *)v24 + 57;
if ( (v24[7] & 1) != 0 )
v25 = (const char *)v24[9];
v26 = atof(v25);
v27 = v66;
*(float *)(a1 + 80) = v26;
if ( (v27 & 1) != 0 )
operator delete(v68);
if ( !*(_DWORD *)(a1 + 92) )
{
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, "6", 1u);
v65 = &v66;
v28 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v29 = (char *)v28 + 57;
if ( (v28[7] & 1) != 0 )
v29 = (const char *)v28[9];
*(_DWORD *)(a1 + 92) = atoi(v29);
if ( (v66 & 1) != 0 )
operator delete(v68);
}
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, "5", 1u);
v65 = &v66;
v30 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v31 = (char *)v30 + 57;
if ( (v30[7] & 1) != 0 )
v31 = (const char *)v30[9];
v32 = atof(v31);
v33 = v66;
*(_BYTE *)(a1 + 84) = v32 != 0.0;
if ( (v33 & 1) != 0 )
operator delete(v68);
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, "17", 2u);
v65 = &v66;
v34 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v35 = (char *)v34 + 57;
if ( (v34[7] & 1) != 0 )
v35 = (const char *)v34[9];
v36 = atoi(v35);
v37 = v66;
*(_BYTE *)(a1 + 125) = v36 != 0;
if ( (v37 & 1) != 0 )
operator delete(v68);
v66 = 0;
v67 = 0;
*(float *)(a1 + 96) = 1.0;
v68 = nullptr;
std::string::__init(&v66, "8", 1u);
v65 = &v66;
v38 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v39 = (char *)v38 + 57;
if ( (v38[7] & 1) != 0 )
v39 = (const char *)v38[9];
v40 = atoi(v39);
if ( (v66 & 1) != 0 )
operator delete(v68);
if ( v40 > 0 )
{
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, "7", 1u);
v65 = &v66;
v41 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
if ( (v41[7] & 1) != 0 )
{
v63 = atof((const char *)v41[9]);
v64 = v66;
*(float *)(a1 + 96) = v63;
if ( (v64 & 1) == 0 )
goto LABEL_53;
}
else
{
v42 = atof((const char *)v41 + 57);
v43 = v66;
*(float *)(a1 + 96) = v42;
if ( (v43 & 1) == 0 )
goto LABEL_53;
}
operator delete(v68);
}
LABEL_53:
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, "15", 2u);
v65 = &v66;
v44 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v45 = (char *)v44 + 57;
if ( (v44[7] & 1) != 0 )
v45 = (const char *)v44[9];
v46 = atof(v45);
v47 = v66;
*(float *)(a1 + 100) = v46;
if ( (v47 & 1) != 0 )
operator delete(v68);
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, "9", 1u);
v65 = &v66;
v48 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v49 = (char *)v48 + 57;
if ( (v48[7] & 1) != 0 )
v49 = (const char *)v48[9];
*(_DWORD *)(a1 + 120) = atoi(v49);
if ( (v66 & 1) != 0 )
operator delete(v68);
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, "10", 2u);
v65 = &v66;
v50 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v51 = GameToolbox::hsvFromString((__int64)(v50 + 7), &byte_120B870);
v52 = v66;
*(_QWORD *)(a1 + 104) = v51;
*(_QWORD *)(a1 + 112) = v53;
if ( (v52 & 1) != 0 )
operator delete(v68);
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, &word_1217DE8, 2u);
v65 = &v66;
v54 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v55 = (char *)v54 + 57;
if ( (v54[7] & 1) != 0 )
v55 = (const char *)v54[9];
v56 = atof(v55);
v57 = v66;
*(float *)(a1 + 68) = v56;
if ( (v57 & 1) != 0 )
operator delete(v68);
v66 = 0;
v67 = 0;
v68 = nullptr;
std::string::__init(&v66, "19", 2u);
v65 = &v66;
v58 = std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
a2,
(__int64)&v66,
(__int64)algn_116D748,
&v65);
v59 = (char *)v58 + 57;
if ( (v58[7] & 1) != 0 )
v59 = (const char *)v58[9];
v60 = atoi(v59);
v61 = v66;
*(_BYTE *)(a1 + 57) = v60 != 0;
if ( (v61 & 1) != 0 )
operator delete(v68);
return _stack_chk_guard;
}