//
// SetTextPopup::onEmotes from 0x1403a8470 to 0x1403a8592 (290 bytes)
//
// 2 xrefs:
// > SetTextPopup::init @ 0x1403a7b1e
// > ??> @ 0x14092387c
//
// 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:31:19 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall SetTextPopup::onEmotes(__int64 a1)
{
__int64 v2; // rbp
int v3; // r15d
int v4; // r12d
__int64 v5; // r14
__int64 v6; // rsi
__int64 v7; // rcx
const struct cocos2d::CCPoint *v8; // r13
void *v9; // rbx
cocos2d::CCObject *v10; // rbx
float *v11; // rax
char v12; // [rsp+70h] [rbp+8h] BYREF
void *v13; // [rsp+80h] [rbp+18h] BYREF
v2 = a1 + 664;
if ( !a1 )
v2 = 0;
v3 = *(_DWORD *)(a1 + 728);
v4 = *(_DWORD *)(a1 + 732);
v5 = *(_QWORD *)(a1 + 672);
v6 = *(_QWORD *)(a1 + 736);
v7 = *(_QWORD *)(a1 + 744);
if ( v7 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 1104LL))(v7, 0);
LABEL_5:
*(_QWORD *)(a1 + 744) = 0;
return;
}
if ( !v6 || !v5 )
goto LABEL_5;
v8 = (const struct cocos2d::CCPoint *)EmotePickerPopup::buttonAnchor((__int64)&v12, v6);
v9 = operator new(0x4C8u);
v13 = v9;
memset(v9, 0, 0x4C8u);
v10 = (cocos2d::CCObject *)EmotePickerPopup::EmotePickerPopup((__int64)v9);
if ( !v10 )
goto LABEL_12;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v13, v8);
if ( !EmotePickerPopup::init((__int64)v10, v5, v11, v4, v3) )
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v10 + 8LL))(v10, 1);
LABEL_12:
v10 = nullptr;
goto LABEL_13;
}
cocos2d::CCObject::autorelease(v10);
LABEL_13:
*(_QWORD *)(a1 + 744) = EmotePickerPopup::openAt(v10, v2, v6);
}