//
// EditorSoundConfigInfoLayer::refreshLikeState from 0x785058 to 0x785132 (218 bytes)
//
// 2 xrefs:
// > EditorSoundConfigInfoLayer::likedItem @ 0x7851a6
// > EditorSoundConfigInfoLayer::init @ 0x787ee6
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:59:32 +0000
//
_DWORD *__fastcall EditorSoundConfigInfoLayer::refreshLikeState(_DWORD *this, int a2, char *a3, int a4)
{
_DWORD *v4; // r6
int v5; // r2
GameLevelManager *v6; // r0
int v7; // r0
int v8; // r4
const char *v9; // r7
cocos2d::CCSpriteFrameCache *v10; // r4
int (__fastcall *v11)(cocos2d::CCSpriteFrameCache *, int); // r8
cocos2d::CCSpriteFrameCache *v12; // r0
int v13; // r0
int v14; // r7
void (__fastcall *v15)(int, char *); // r8
char *v16; // r1
_DWORD v17[2]; // [sp+0h] [bp-10h] BYREF
char *v18; // [sp+8h] [bp-8h]
int v19; // [sp+Ch] [bp-4h]
v17[0] = this;
v17[1] = a2;
v18 = a3;
v19 = a4;
v4 = this;
v5 = *(this + 187);
if ( v5 )
{
if ( *(_BYTE *)(v5 + 385) )
{
v8 = 1;
}
else
{
v6 = (GameLevelManager *)GameLevelManager::sharedState((GameLevelManager *)this);
if ( v6 )
{
v7 = GameLevelManager::sharedState(v6);
v6 = (GameLevelManager *)GameLevelManager::hasLikedItemFullCheck(v7, &byte_5);
}
v8 = (int)v6;
}
this = (_DWORD *)v4[192];
if ( this )
{
(*(void (__fastcall **)(_DWORD *, int))(*this + 528))(this, (unsigned __int8)v8 ^ 1);
if ( v8 )
v9 = "GJ_like2Btn2_001.png";
else
v9 = "GJ_like2Btn_001.png";
v10 = (cocos2d::CCSpriteFrameCache *)(*(int (__fastcall **)(_DWORD))(*(_DWORD *)v4[192] + 536))(v4[192]);
v11 = *(int (__fastcall **)(cocos2d::CCSpriteFrameCache *, int))(*(_DWORD *)v10 + 580);
v12 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v10);
v13 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v12, v9);
this = (_DWORD *)v11(v10, v13);
}
v14 = v4[193];
if ( v14 )
{
v15 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v14 + 464);
GameToolbox::intToShortString((GameToolbox *)v17, *(_DWORD *)(v4[187] + 296), 0);
if ( (v17[0] & 1) != 0 )
v16 = v18;
else
v16 = (char *)v17 + 1;
v15(v14, v16);
return (_DWORD *)std::string::~string((int)v17);
}
}
return this;
}