//
// EmotePickerPopup::toggle from 0x100902ab0 to 0x100902b5e (174 bytes)
//
// 7 xrefs:
// > EditLevelLayer::onEmotes @ 0x1001de471
// > sub_10029B7B0 @ 0x10029b7e3
// > ShareCommentLayer::onEmotes @ 0x1006b30b8
// > sub_1008FAD30 @ 0x1008fad73
// > sub_10092F6B0 @ 0x10092f6f3
// > sub_100946B90 @ 0x100946bed
// > sub_100953320 @ 0x100953363
//
// 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 12:38:03 +0000
//
_QWORD *__fastcall EmotePickerPopup::toggle(
__int64 a1,
__int64 a2,
__int64 *a3,
__int64 a4,
unsigned int a5,
unsigned int a6)
{
_QWORD *v6; // rbx
__int64 v7; // rax
__int64 v11; // r15
unsigned int *v12; // rax
__int64 v14; // [rsp+0h] [rbp-40h] BYREF
__int64 v15; // [rsp+8h] [rbp-38h]
unsigned int v16; // [rsp+14h] [rbp-2Ch]
if ( a1 )
{
v6 = nullptr;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1368LL))(a1, 0);
}
else if ( a3 == nullptr || a4 == 0 )
{
return nullptr;
}
else
{
v7 = *a3;
v15 = a2;
v16 = a6;
v11 = (*(__int64 (__fastcall **)(__int64 *))(v7 + 512))(a3);
v12 = (unsigned int *)(*(__int64 (__fastcall **)(__int64 *))(*a3 + 192))(a3);
cocos2d::CCNode::convertToWorldSpace((double *)&v14, v11, v12);
v6 = EmotePickerPopup::create(a4, &v14, a5, v16);
EmotePickerPopup::openAt(v6, v15, a3);
}
return v6;
}