//
// NewThreadPopup::onPickIcon from 0x1400f0780 to 0x1400f0873 (243 bytes)
//
// 2 xrefs:
// > NewThreadPopup::init @ 0x1400efa11
// > ??> @ 0x140915098
//
// 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:26:36 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall NewThreadPopup::onPickIcon(__int64 a1, __int64 a2)
{
__int64 v4; // rcx
__int64 v5; // rbx
const struct cocos2d::CCPoint *v6; // r15
void *v7; // rbx
cocos2d::CCObject *v8; // rdi
int v9; // eax
char v10; // [rsp+60h] [rbp+8h] BYREF
void *v11; // [rsp+70h] [rbp+18h] BYREF
if ( !*(_BYTE *)(a1 + 744) )
{
v4 = *(_QWORD *)(a1 + 760);
if ( v4 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 1104LL))(v4, 0);
LABEL_4:
v5 = 0;
LABEL_12:
*(_QWORD *)(a1 + 760) = v5;
return;
}
if ( !a2 )
goto LABEL_4;
v6 = (const struct cocos2d::CCPoint *)EmotePickerPopup::buttonAnchor(&v10, a2);
v7 = operator new(0x4C8u);
v11 = v7;
memset(v7, 0, 0x4C8u);
v8 = (cocos2d::CCObject *)EmotePickerPopup::EmotePickerPopup(v7);
if ( v8 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v11, v6);
if ( (unsigned __int8)EmotePickerPopup::init((_DWORD)v8, 0, v9, 0, 0) )
{
cocos2d::CCObject::autorelease(v8);
LABEL_11:
v5 = EmotePickerPopup::openAt(v8, a1 + 688, a2);
goto LABEL_12;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v8 + 8LL))(v8, 1);
}
v8 = nullptr;
goto LABEL_11;
}
}