//
// ColorAction::setupFromMap from 0x140363da0 to 0x14036474f (2479 bytes)
//
// 2 xrefs:
// > ColorAction::setupFromString @ 0x140363d49
// > ??> @ 0x1409215a8
//
// 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 11:30:54 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall ColorAction::setupFromMap(__int64 a1, _QWORD *a2, __int64 a3)
{
__m128i si128; // xmm6
__int64 v6; // rax
__int64 v7; // r8
char v8; // r15
void *v9; // r8
__int64 v10; // rax
__int64 v11; // r8
char v12; // r14
void *v13; // r8
__int64 v14; // rax
char v15; // si
__int64 v16; // r8
void *v17; // r8
__m128i v18; // xmm7
__int64 v19; // rax
__int64 v20; // r8
char v21; // r15
void *v22; // r8
__int64 v23; // rax
__int64 v24; // r8
char v25; // r14
void *v26; // r8
__int64 v27; // rax
char v28; // si
__int64 v29; // r8
void *v30; // r8
__int64 v31; // rax
__int64 v32; // r8
void *v33; // rcx
__int64 v34; // rax
__int64 v35; // r8
float v36; // xmm1_4
void *v37; // rcx
__int64 v38; // rax
void *v39; // rcx
__int64 v40; // rax
__int64 v41; // r8
void *v42; // rcx
__int64 v43; // rax
__int64 v44; // r8
__int64 v45; // rax
int v46; // esi
__int64 v47; // r8
void *v48; // r8
__int64 v49; // rax
float v50; // xmm1_4
__int64 v51; // rax
__int64 v52; // r8
float v53; // xmm1_4
void *v54; // rcx
__int64 v55; // rax
__int64 v56; // r8
void *v57; // rcx
__int64 *v58; // rax
__int64 v59; // r8
void *v60; // rcx
__int64 v61; // rax
__int64 v62; // r8
float v63; // xmm1_4
void *v64; // rcx
__int64 v65; // rax
void *Block[2]; // [rsp+38h] [rbp-39h] BYREF
__m128i v67; // [rsp+48h] [rbp-29h]
void *v68[2]; // [rsp+58h] [rbp-19h] BYREF
__m128i v69; // [rsp+68h] [rbp-9h]
*(_OWORD *)Block = 0;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836520);
v67 = si128;
LOWORD(Block[0]) = 49;
v6 = sub_140355610(a2, (__int64)Block, a3);
if ( *(_QWORD *)(v6 + 24) > 0xFu )
v6 = *(_QWORD *)v6;
v8 = atoi((const char *)v6);
if ( v67.m128i_i64[1] > 0xFuLL )
{
v9 = Block[0];
if ( (unsigned __int64)(v67.m128i_i64[1] + 1) >= 0x1000 )
{
v9 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v9);
}
*(_OWORD *)Block = 0;
v67 = si128;
LOWORD(Block[0]) = 50;
v10 = sub_140355610(a2, (__int64)Block, v7);
if ( *(_QWORD *)(v10 + 24) > 0xFu )
v10 = *(_QWORD *)v10;
v12 = atoi((const char *)v10);
if ( v67.m128i_i64[1] > 0xFuLL )
{
v13 = Block[0];
if ( (unsigned __int64)(v67.m128i_i64[1] + 1) >= 0x1000 )
{
v13 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v13 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v13);
}
*(_OWORD *)Block = 0;
v67 = si128;
LOWORD(Block[0]) = 51;
v14 = sub_140355610(a2, (__int64)Block, v11);
if ( *(_QWORD *)(v14 + 24) > 0xFu )
v14 = *(_QWORD *)v14;
v15 = atoi((const char *)v14);
if ( v67.m128i_i64[1] > 0xFuLL )
{
v17 = Block[0];
if ( (unsigned __int64)(v67.m128i_i64[1] + 1) >= 0x1000 )
{
v17 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v17 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v17);
}
*(_BYTE *)(a1 + 72) = v8;
*(_BYTE *)(a1 + 73) = v12;
*(_BYTE *)(a1 + 74) = v15;
*(_OWORD *)Block = 0;
v18 = _mm_load_si128((const __m128i *)&xmmword_140836530);
v67 = v18;
strcpy((char *)Block, "11");
v19 = sub_140355610(a2, (__int64)Block, v16);
if ( *(_QWORD *)(v19 + 24) > 0xFu )
v19 = *(_QWORD *)v19;
v21 = atoi((const char *)v19);
if ( v67.m128i_i64[1] > 0xFuLL )
{
v22 = Block[0];
if ( (unsigned __int64)(v67.m128i_i64[1] + 1) >= 0x1000 )
{
v22 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v22 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v22);
}
*(_OWORD *)Block = 0;
v67 = v18;
strcpy((char *)Block, "12");
v23 = sub_140355610(a2, (__int64)Block, v20);
if ( *(_QWORD *)(v23 + 24) > 0xFu )
v23 = *(_QWORD *)v23;
v25 = atoi((const char *)v23);
if ( v67.m128i_i64[1] > 0xFuLL )
{
v26 = Block[0];
if ( (unsigned __int64)(v67.m128i_i64[1] + 1) >= 0x1000 )
{
v26 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v26 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v26);
}
*(_OWORD *)Block = 0;
v67 = v18;
strcpy((char *)Block, "13");
v27 = sub_140355610(a2, (__int64)Block, v24);
if ( *(_QWORD *)(v27 + 24) > 0xFu )
v27 = *(_QWORD *)v27;
v28 = atoi((const char *)v27);
if ( v67.m128i_i64[1] > 0xFuLL )
{
v30 = Block[0];
if ( (unsigned __int64)(v67.m128i_i64[1] + 1) >= 0x1000 )
{
v30 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v30 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v30);
}
*(_BYTE *)(a1 + 75) = v21;
*(_BYTE *)(a1 + 76) = v25;
*(_BYTE *)(a1 + 77) = v28;
*(_OWORD *)Block = 0;
v67 = si128;
LOWORD(Block[0]) = 52;
v31 = sub_140355610(a2, (__int64)Block, v29);
if ( *(_QWORD *)(v31 + 24) > 0xFu )
v31 = *(_QWORD *)v31;
*(_DWORD *)(a1 + 88) = atoi((const char *)v31);
if ( v67.m128i_i64[1] > 0xFuLL )
{
v33 = Block[0];
if ( (unsigned __int64)(v67.m128i_i64[1] + 1) >= 0x1000 )
{
v33 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v33 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v33);
}
*(_OWORD *)Block = 0;
v67 = v18;
strcpy((char *)Block, "16");
v34 = sub_140355610(a2, (__int64)Block, v32);
if ( *(_QWORD *)(v34 + 24) > 0xFu )
v34 = *(_QWORD *)v34;
v36 = atof((const char *)v34);
*(float *)(a1 + 80) = v36;
if ( v67.m128i_i64[1] > 0xFuLL )
{
v37 = Block[0];
if ( (unsigned __int64)(v67.m128i_i64[1] + 1) >= 0x1000 )
{
v37 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v37 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v37);
}
if ( !*(_DWORD *)(a1 + 92) )
{
*(_OWORD *)Block = 0;
v67 = si128;
LOWORD(Block[0]) = 54;
v38 = sub_140355610(a2, (__int64)Block, v35);
if ( *(_QWORD *)(v38 + 24) > 0xFu )
v38 = *(_QWORD *)v38;
*(_DWORD *)(a1 + 92) = atoi((const char *)v38);
if ( v67.m128i_i64[1] > 0xFuLL )
{
v39 = Block[0];
if ( (unsigned __int64)(v67.m128i_i64[1] + 1) >= 0x1000 )
{
v39 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v39 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v39);
}
}
*(_OWORD *)Block = 0;
v67 = si128;
LOWORD(Block[0]) = 53;
v40 = sub_140355610(a2, (__int64)Block, v35);
if ( *(_QWORD *)(v40 + 24) > 0xFu )
v40 = *(_QWORD *)v40;
*(_BYTE *)(a1 + 84) = atof((const char *)v40) != 0.0;
if ( v67.m128i_i64[1] > 0xFuLL )
{
v42 = Block[0];
if ( (unsigned __int64)(v67.m128i_i64[1] + 1) >= 0x1000 )
{
v42 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v42 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v42);
}
*(_OWORD *)v68 = 0;
v69 = v18;
strcpy((char *)v68, "17");
v43 = sub_140355610(a2, (__int64)v68, v41);
if ( *(_QWORD *)(v43 + 24) > 0xFu )
v43 = *(_QWORD *)v43;
*(_BYTE *)(a1 + 125) = atoi((const char *)v43) != 0;
sub_14003D310((__int64)v68);
*(_DWORD *)(a1 + 96) = 1065353216;
*(_OWORD *)Block = 0;
v67 = si128;
LOWORD(Block[0]) = 56;
v45 = sub_140355610(a2, (__int64)Block, v44);
if ( *(_QWORD *)(v45 + 24) > 0xFu )
v45 = *(_QWORD *)v45;
v46 = atoi((const char *)v45);
if ( v67.m128i_i64[1] > 0xFuLL )
{
v48 = Block[0];
if ( (unsigned __int64)(v67.m128i_i64[1] + 1) >= 0x1000 )
{
v48 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v48 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v48);
}
if ( v46 >= 1 )
{
*(_OWORD *)v68 = 0;
v69 = si128;
LOWORD(v68[0]) = 55;
v49 = sub_140355610(a2, (__int64)v68, v47);
if ( *(_QWORD *)(v49 + 24) > 0xFu )
v49 = *(_QWORD *)v49;
v50 = atof((const char *)v49);
*(float *)(a1 + 96) = v50;
sub_14003D310((__int64)v68);
}
*(_OWORD *)Block = 0;
v67 = v18;
strcpy((char *)Block, "15");
v51 = sub_140355610(a2, (__int64)Block, v47);
if ( *(_QWORD *)(v51 + 24) > 0xFu )
v51 = *(_QWORD *)v51;
v53 = atof((const char *)v51);
*(float *)(a1 + 100) = v53;
if ( v67.m128i_i64[1] > 0xFuLL )
{
v54 = Block[0];
if ( (unsigned __int64)(v67.m128i_i64[1] + 1) >= 0x1000 )
{
v54 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v54 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v54);
}
*(_OWORD *)Block = 0;
v67 = si128;
LOWORD(Block[0]) = 57;
v55 = sub_140355610(a2, (__int64)Block, v52);
if ( *(_QWORD *)(v55 + 24) > 0xFu )
v55 = *(_QWORD *)v55;
*(_DWORD *)(a1 + 120) = atoi((const char *)v55);
if ( v67.m128i_i64[1] > 0xFuLL )
{
v57 = Block[0];
if ( (unsigned __int64)(v67.m128i_i64[1] + 1) >= 0x1000 )
{
v57 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v57 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v57);
}
*(_OWORD *)v68 = 0;
v69 = v18;
strcpy((char *)v68, "10");
v58 = (__int64 *)sub_140355610(a2, (__int64)v68, v56);
*(_OWORD *)(a1 + 104) = *GameToolbox::hsvFromString((__int128 *)Block, v58);
if ( v69.m128i_i64[1] > 0xFuLL )
{
v60 = v68[0];
if ( (unsigned __int64)(v69.m128i_i64[1] + 1) >= 0x1000 )
{
v60 = *((void **)v68[0] - 1);
if ( (unsigned __int64)((char *)v68[0] - (char *)v60 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v60);
}
*(_OWORD *)v68 = 0;
v69 = v18;
strcpy((char *)v68, "14");
v61 = sub_140355610(a2, (__int64)v68, v59);
if ( *(_QWORD *)(v61 + 24) > 0xFu )
v61 = *(_QWORD *)v61;
v63 = atof((const char *)v61);
*(float *)(a1 + 68) = v63;
if ( v69.m128i_i64[1] > 0xFuLL )
{
v64 = v68[0];
if ( (unsigned __int64)(v69.m128i_i64[1] + 1) >= 0x1000 )
{
v64 = *((void **)v68[0] - 1);
if ( (unsigned __int64)((char *)v68[0] - (char *)v64 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v64);
}
*(_OWORD *)v68 = 0;
v69 = v18;
strcpy((char *)v68, "19");
v65 = sub_140355610(a2, (__int64)v68, v62);
if ( *(_QWORD *)(v65 + 24) > 0xFu )
v65 = *(_QWORD *)v65;
*(_BYTE *)(a1 + 57) = atoi((const char *)v65) != 0;
sub_14003D310((__int64)v68);
}