//
// SoundPackDescPopup::refreshIconSlot from 0x785c70 to 0x785d6a (250 bytes)
//
// 2 xrefs:
// > SoundPackDescPopup::emotePicked @ 0x786386
// > SoundPackDescPopup::init @ 0x786b2a
//
// 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
//
int __fastcall SoundPackDescPopup::refreshIconSlot(SoundPackDescPopup *this)
{
int result; // r0
int v3; // r3
int v4; // r3
int v5; // r1
int v6; // r2
int v7; // r3
cocos2d::CCSprite *v8; // r4
void (__fastcall *v9)(cocos2d::CCSprite *, _BYTE *); // r8
float v10; // s16
int v11; // r0
_BYTE v12[8]; // [sp+0h] [bp-18h] BYREF
int v13[3]; // [sp+8h] [bp-10h] BYREF
result = *((_DWORD *)this + 185);
if ( result )
{
(*(void (__fastcall **)(int, int, int))(*(_DWORD *)result + 284))(result, 1, 1);
v3 = *((unsigned __int8 *)this + 728);
if ( (v3 & 1) != 0 )
v4 = *((_DWORD *)this + 183);
else
v4 = v3 >> 1;
if ( v4 )
{
std::string::basic_string(v13, (int)this + 728);
}
else
{
memset(v13, 0, sizeof(v13));
std::string::__init(v13, "music", 5u);
}
v8 = EmoteSprite::createWithName((int)v13, v5, v6, v7);
result = std::string::~string((int)v13);
if ( v8 )
{
EmoteSprite::fitToHeight(v8, 20.0, 0.0);
v9 = *(void (__fastcall **)(cocos2d::CCSprite *, _BYTE *))(*(_DWORD *)v8 + 92);
v10 = *(float *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 185) + 164))(*((_DWORD *)this + 185));
v11 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 185) + 164))(*((_DWORD *)this + 185));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, v10 * 0.5, *(float *)(v11 + 4) * 0.5);
v9(v8, v12);
(*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v8 + 36))(v8, 1);
return (*(int (__fastcall **)(_DWORD, cocos2d::CCSprite *, int))(**((_DWORD **)this + 185) + 232))(
*((_DWORD *)this + 185),
v8,
1);
}
}
return result;
}