//
// TriggerControlGameObject::updateTriggerControlFrame from 0x1001d1e20 to 0x1001d1f59 (313 bytes)
//
// 2 xrefs:
// > TriggerControlGameObject::customObjectSetup @ 0x1001d1e10
// > SetupStopTriggerPopup::onClose @ 0x1005b294e
//
// 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:26:22 +0000
//
void __fastcall TriggerControlGameObject::updateTriggerControlFrame(__int64 a1)
{
int v2; // eax
const std::string::value_type *v3; // rsi
unsigned int v4; // r12d
__int64 v5; // r14
size_t v6; // r12
const void *v7; // rdi
std::string::size_type size; // r13
char v9; // r15
std::string::pointer data; // rsi
size_t v11; // rdx
__int64 v12; // rax
__int64 v13; // rax
std::string __str; // [rsp+0h] [rbp-40h] BYREF
__str.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x20u);
__str.__r_.__value_.__r.__words[0] = 33;
__str.__r_.__value_.__l.__size_ = 26;
strcpy(__str.__r_.__value_.__l.__data_, "edit_eStopMoverBtn_001.png");
v2 = *(_DWORD *)(a1 + 1864);
if ( v2 == 2 )
{
v3 = "edit_eResumeBtn_001.png";
}
else
{
if ( v2 != 1 )
goto LABEL_6;
v3 = "edit_ePauseBtn_001.png";
}
std::string::assign(&__str, v3);
LABEL_6:
v4 = *(unsigned __int8 *)(a1 + 1840);
v5 = a1 + 1841;
if ( (v4 & 1) != 0 )
{
v6 = *(_QWORD *)(a1 + 1848);
v7 = *(const void **)(a1 + 1856);
}
else
{
v6 = v4 >> 1;
v7 = (const void *)(a1 + 1841);
}
size = *(_BYTE *)&__str.__r_.__value_.__l.0 >> 1;
v9 = *(_BYTE *)&__str.__r_.__value_.__s.0 & 1;
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
size = __str.__r_.__value_.__l.__size_;
data = __str.__r_.__value_.__s.__data_;
if ( v9 )
data = __str.__r_.__value_.__l.__data_;
v11 = v6;
if ( size < v6 )
v11 = size;
if ( memcmp(v7, data, v11) || size != v6 )
{
std::string::operator=((std::string *)(a1 + 1840), &__str);
v12 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
if ( (*(_BYTE *)(a1 + 1840) & 1) != 0 )
v5 = *(_QWORD *)(a1 + 1856);
v13 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v12, v5);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1160LL))(a1, v13);
v9 = *(_BYTE *)&__str.__r_.__value_.__s.0 & 1;
}
if ( v9 )
operator delete(__str.__r_.__value_.__l.__data_);
}