//
// SoundPackDescPopup::onEmotes from 0x14019a110 to 0x14019a231 (289 bytes)
//
// 3 xrefs:
// > SoundPackDescPopup::init @ 0x140199a93
// > ??> @ 0x140919670
// > ??> @ 0x14091967c
//
// 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:27:46 +0000
//
void __fastcall SoundPackDescPopup::onEmotes(__int64 a1, __int64 a2, __int64 a3, double a4)
{
__int64 v6; // rbp
int v7; // r15d
__int64 v8; // r14
__int64 v9; // rcx
const struct cocos2d::CCPoint *v10; // r12
void *v11; // rbx
cocos2d::CCObject *v12; // rbx
float *v13; // rax
char v14; // [rsp+70h] [rbp+8h] BYREF
void *v15; // [rsp+80h] [rbp+18h] BYREF
v6 = a1 + 1000;
if ( !a1 )
v6 = 0;
ensureEmotesAreLoaded(a1, a2, a3, a4);
v7 = dword_1408FE3A4;
v8 = *(_QWORD *)(a1 + 1016);
v9 = *(_QWORD *)(a1 + 1080);
if ( v9 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v9 + 1104LL))(v9, 0);
LABEL_5:
*(_QWORD *)(a1 + 1080) = 0;
return;
}
if ( !a2 || !v8 )
goto LABEL_5;
v10 = (const struct cocos2d::CCPoint *)EmotePickerPopup::buttonAnchor((__int64)&v14, a2);
v11 = operator new(0x4C8u);
v15 = v11;
memset(v11, 0, 0x4C8u);
v12 = (cocos2d::CCObject *)EmotePickerPopup::EmotePickerPopup((__int64)v11);
if ( !v12 )
goto LABEL_12;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, v10);
if ( !EmotePickerPopup::init((__int64)v12, v8, v13, v7, 140) )
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v12 + 8LL))(v12, 1);
LABEL_12:
v12 = nullptr;
goto LABEL_13;
}
cocos2d::CCObject::autorelease(v12);
LABEL_13:
*(_QWORD *)(a1 + 1080) = EmotePickerPopup::openAt(v12, v6, a2);
}