//
// cocos2d::extension::CCControlButton::setTitleLabelForState from 0x1800066a0 to 0x18000677b (219 bytes)
//
// 4 xrefs:
// > ??> @ 0x1800241c0
// > ??> @ 0x180028008
// > ??> @ 0x18002fdf8
// > ??> @ 0x18004966c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall cocos2d::extension::CCControlButton::setTitleLabelForState(
cocos2d::CCDictionary **this,
struct cocos2d::CCNode *a2,
unsigned int a3)
{
__int64 v6; // rbx
struct cocos2d::CCObject *v7; // rax
__int64 v8; // r8
__int64 v9; // rbx
__int64 v10; // rax
char v11; // [rsp+30h] [rbp+8h] BYREF
v6 = a3;
v7 = cocos2d::CCDictionary::objectForKey(*(this + 68), a3);
if ( v7 )
{
LOBYTE(v8) = 1;
(*((void (__fastcall **)(cocos2d::CCDictionary **, struct cocos2d::CCObject *, __int64))*this + 65))(this, v7, v8);
cocos2d::CCDictionary::removeObjectForKey(*(this + 68), (unsigned int)v6);
}
cocos2d::CCDictionary::setObject(*(this + 68), a2, v6);
(*(void (__fastcall **)(struct cocos2d::CCNode *, _QWORD))(*(_QWORD *)a2 + 320LL))(a2, 0);
v9 = *(_QWORD *)a2;
v10 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v11, 0.5, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCNode *, __int64))(v9 + 272))(a2, v10);
(*((void (__fastcall **)(cocos2d::CCDictionary **, struct cocos2d::CCNode *, __int64))*this + 55))(this, a2, 1);
if ( *((_DWORD *)this + 109) == a3 )
(*((void (__fastcall **)(cocos2d::CCDictionary **))*this + 133))(this);
}