//
// TriggerControlGameObject::updateTriggerControlFrame from 0x140664340 to 0x14066452f (495 bytes)
//
// 3 xrefs:
// > SetupStopTriggerPopup::onClose @ 0x14060992e
// > TriggerControlGameObject::customObjectSetup @ 0x140664305
// > ??> @ 0x140931c94
//
// 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:35:49 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall TriggerControlGameObject::updateTriggerControlFrame(__int64 *a1)
{
char *v2; // rdi
size_t v3; // rbx
unsigned __int64 v4; // rbp
const char *v5; // rsi
char *v6; // rdx
const char *v7; // rcx
size_t v8; // r14
size_t v9; // r8
__int64 v10; // rdx
__int64 v11; // rcx
char *v12; // rdx
__int64 v13; // rbx
cocos2d::CCSpriteFrameCache *v14; // rax
struct cocos2d::CCSpriteFrame *v15; // rax
char *v16; // rax
__int128 v17; // [rsp+30h] [rbp-48h] BYREF
__int64 v18; // [rsp+40h] [rbp-38h]
__int64 v19; // [rsp+48h] [rbp-30h]
v17 = 0;
v2 = (char *)sub_14003D460(0x20u);
*(_QWORD *)&v17 = v2;
v3 = 26;
v18 = 26;
v4 = 31;
v19 = 31;
strcpy(v2, "edit_eStopMoverBtn_001.png");
if ( *((_DWORD *)a1 + 472) == 1 )
{
v18 = 22;
memmove(v2, "edit_ePauseBtn_001.png", 0x16u);
v2[22] = 0;
}
else
{
if ( *((_DWORD *)a1 + 472) != 2 )
goto LABEL_6;
v18 = 23;
memmove(v2, "edit_eResumeBtn_001.png", 0x17u);
v2[23] = 0;
}
v2 = (char *)v17;
v3 = v18;
v4 = v19;
LABEL_6:
v5 = (const char *)(a1 + 232);
v6 = (char *)&v17;
if ( v4 > 0xF )
v6 = v2;
v7 = (const char *)(a1 + 232);
if ( (unsigned __int64)a1[235] > 0xF )
v7 = *(const char **)v5;
v8 = a1[234];
v9 = v8;
if ( v3 < v8 )
v9 = v3;
if ( memcmp(v7, v6, v9) || v8 < v3 || v8 > v3 )
{
if ( v5 != (const char *)&v17 )
{
v12 = (char *)&v17;
if ( v4 > 0xF )
v12 = v2;
sub_1400405A0((void **)a1 + 232, v12, v3);
v4 = v19;
v2 = (char *)v17;
}
if ( (unsigned __int64)a1[235] > 0xF )
v5 = *(const char **)v5;
v13 = *a1;
v14 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v11, v10);
v15 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v14, v5);
(*(void (__fastcall **)(__int64 *, struct cocos2d::CCSpriteFrame *))(v13 + 1008))(a1, v15);
}
if ( v4 > 0xF )
{
v16 = v2;
if ( v4 + 1 >= 0x1000 )
{
v2 = *((char **)v2 - 1);
if ( (unsigned __int64)(v16 - v2 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v2);
}
}