//
// EditorUI::setIDPopupClosed from 0x100010270 to 0x10001039a (298 bytes)
//
// 2 xrefs:
// > sub_1000103C0 @ 0x1000103cc
// > ??> @ 0x100ab50a8
//
// 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 12:18:52 +0000
//
void __fastcall EditorUI::setIDPopupClosed(__int64 a1, __int64 a2, unsigned int a3, double a4)
{
__int64 v5; // rdx
__int64 v6; // rax
__int64 v7; // rbx
__int64 v8; // rax
__int64 CString; // rax
__int64 v10; // rdx
__int64 v11; // rax
const std::string::value_type *v12; // rax
__int64 v13; // rdi
std::string::pointer data; // rsi
char v15; // [rsp+0h] [rbp-50h]
std::string v16; // [rsp+8h] [rbp-48h] BYREF
std::string v17; // [rsp+20h] [rbp-30h] BYREF
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 1 )
{
v6 = GameManager::sharedState(a2, a2, v5);
*(float *)&a4 = GameManager::setIntGameVariable(v6, "0133", a3);
v7 = *(_QWORD *)(a1 + 1312);
v8 = sub_10088E820("%i", v15);
CString = cocos2d::CCString::getCString(v8);
ButtonSprite::setString(v7, CString, a4);
return;
}
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 2 )
{
v11 = GameManager::sharedState(a2, a2, v10);
*(float *)&a4 = GameManager::setIntGameVariable(v11, "0139", a3);
*(_WORD *)&v17.__r_.__value_.__l.0 = 0;
if ( (int)a3 < 1000 )
{
GameToolbox::intToString(&v16, a3);
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v17.__r_.__value_.__l.__data_);
v17 = v16;
a4 = *(double *)v16.__r_.__value_.__r.__words;
v13 = *(_QWORD *)(a1 + 1320);
if ( (*(_BYTE *)&v16.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_6;
}
else
{
v12 = (const std::string::value_type *)GJSpecialColorSelect::textForColorIdx(a3);
std::string::assign(&v17, v12);
v13 = *(_QWORD *)(a1 + 1320);
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) != 0 )
{
LABEL_6:
data = v17.__r_.__value_.__l.__data_;
goto LABEL_11;
}
}
data = v17.__r_.__value_.__s.__data_;
LABEL_11:
ButtonSprite::setString(v13, data, a4);
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v17.__r_.__value_.__l.__data_);
}
}